@jobber/components-native 0.91.0 → 0.91.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/dist/package.json +2 -2
- package/dist/src/ActionItem/ActionItemGroup.js +1 -1
- package/dist/src/AutoLink/components/Link/Link.js +1 -1
- package/dist/src/ErrorMessageWrapper/context/ErrorMessageProvider.js +1 -1
- package/dist/src/Form/components/FormMessageBanner/FormMessageBanner.js +1 -1
- package/dist/src/FormatFile/components/MediaView/MediaView.js +22 -5
- package/dist/src/Select/components/SelectPressable/SelectPressable.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/src/ActionItem/ActionItem.d.ts +2 -1
- package/dist/types/src/ActionItem/ActionItemGroup.d.ts +2 -1
- package/dist/types/src/ActionItem/components/ActionItemContainer.d.ts +2 -1
- package/dist/types/src/ActionLabel/ActionLabel.d.ts +1 -1
- package/dist/types/src/ActivityIndicator/ActivityIndicator.d.ts +2 -1
- package/dist/types/src/AutoLink/AutoLink.d.ts +2 -1
- package/dist/types/src/AutoLink/components/ComposeTextWithLinks/ComposeTextWithLinks.d.ts +2 -1
- package/dist/types/src/AutoLink/components/Link/Link.d.ts +2 -1
- package/dist/types/src/Banner/Banner.d.ts +2 -1
- package/dist/types/src/Banner/components/BannerIcon/BannerIcon.d.ts +2 -1
- package/dist/types/src/BottomSheet/components/BottomSheetOption/BottomSheetOption.d.ts +2 -1
- package/dist/types/src/Button/Button.d.ts +2 -1
- package/dist/types/src/Button/components/InternalButtonLoading/InternalButtonLoading.d.ts +1 -1
- package/dist/types/src/ButtonGroup/ButtonGroup.d.ts +2 -1
- package/dist/types/src/ButtonGroup/ButtonGroupAction.d.ts +4 -3
- package/dist/types/src/ButtonGroup/components/SecondaryActionSheet/SecondaryActionSheet.d.ts +2 -1
- package/dist/types/src/Card/Card.d.ts +2 -1
- package/dist/types/src/Card/components/InternalCardHeader.d.ts +2 -1
- package/dist/types/src/Checkbox/Checkbox.d.ts +2 -1
- package/dist/types/src/Checkbox/CheckboxGroup.d.ts +2 -1
- package/dist/types/src/Chip/Chip.d.ts +2 -1
- package/dist/types/src/Content/Content.d.ts +2 -1
- package/dist/types/src/Disclosure/Disclosure.d.ts +1 -1
- package/dist/types/src/Divider/Divider.d.ts +2 -1
- package/dist/types/src/EmptyState/EmptyState.d.ts +2 -1
- package/dist/types/src/ErrorMessageWrapper/ErrorMessageWrapper.d.ts +2 -1
- package/dist/types/src/ErrorMessageWrapper/context/ErrorMessageProvider.d.ts +2 -1
- package/dist/types/src/Flex/Flex.d.ts +2 -1
- package/dist/types/src/Form/Form.d.ts +2 -1
- package/dist/types/src/Form/components/FormActionBar/FormActionBar.d.ts +3 -2
- package/dist/types/src/Form/components/FormBody/FormBody.d.ts +3 -2
- package/dist/types/src/Form/components/FormCache/FormCache.d.ts +2 -1
- package/dist/types/src/Form/components/FormErrorBanner/FormErrorBanner.d.ts +2 -1
- package/dist/types/src/Form/components/FormMask/FormMask.d.ts +2 -1
- package/dist/types/src/Form/components/FormMessage/FormMessage.d.ts +2 -1
- package/dist/types/src/Form/components/FormMessage/components/InternalFormMessage/InternalFormMessage.d.ts +2 -1
- package/dist/types/src/Form/components/FormMessageBanner/FormMessageBanner.d.ts +2 -1
- package/dist/types/src/Form/components/FormSaveButton/FormSaveButton.d.ts +2 -1
- package/dist/types/src/Form/types.d.ts +2 -2
- package/dist/types/src/FormField/FormField.d.ts +1 -1
- package/dist/types/src/FormatFile/FormatFile.d.ts +2 -1
- package/dist/types/src/FormatFile/components/ErrorIcon/ErrorIcon.d.ts +2 -1
- package/dist/types/src/FormatFile/components/FileView/FileView.d.ts +2 -1
- package/dist/types/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.d.ts +2 -1
- package/dist/types/src/FormatFile/components/MediaView/MediaView.d.ts +2 -1
- package/dist/types/src/FormatFile/components/ProgressBar/ProgressBar.d.ts +2 -1
- package/dist/types/src/Heading/Heading.d.ts +1 -1
- package/dist/types/src/Icon/Icon.d.ts +2 -1
- package/dist/types/src/IconButton/IconButton.d.ts +1 -1
- package/dist/types/src/InputCurrency/InputCurrency.d.ts +2 -1
- package/dist/types/src/InputDate/InputDate.d.ts +2 -1
- package/dist/types/src/InputFieldWrapper/InputFieldWrapper.d.ts +1 -1
- package/dist/types/src/InputFieldWrapper/components/ClearAction/ClearAction.d.ts +2 -1
- package/dist/types/src/InputFieldWrapper/components/Prefix/Prefix.d.ts +3 -2
- package/dist/types/src/InputFieldWrapper/components/Suffix/Suffix.d.ts +3 -2
- package/dist/types/src/InputPressable/InputPressable.d.ts +1 -1
- package/dist/types/src/InputSearch/components/FilterButton.d.ts +2 -1
- package/dist/types/src/InputText/context/InputAccessoriesProvider.d.ts +2 -1
- package/dist/types/src/InputTime/InputTime.d.ts +2 -1
- package/dist/types/src/Menu/Menu.d.ts +2 -1
- package/dist/types/src/Menu/components/MenuOption/MenuOption.d.ts +2 -1
- package/dist/types/src/Menu/components/Overlay/Overlay.d.ts +2 -1
- package/dist/types/src/Menu/types.d.ts +2 -1
- package/dist/types/src/ProgressBar/ProgressBar.d.ts +2 -1
- package/dist/types/src/ProgressBar/ProgressBarInner.d.ts +2 -1
- package/dist/types/src/Select/Select.d.ts +3 -2
- package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.d.ts +2 -1
- package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.d.ts +2 -1
- package/dist/types/src/Select/components/SelectInternalPicker/SelectInternalPicker.d.ts +2 -1
- package/dist/types/src/Select/components/SelectPressable/SelectPressable.d.ts +2 -1
- package/dist/types/src/StatusLabel/StatusLabel.d.ts +2 -1
- package/dist/types/src/Switch/Switch.d.ts +2 -1
- package/dist/types/src/Switch/components/BaseSwitch/BaseSwitch.d.ts +2 -1
- package/dist/types/src/Text/Text.d.ts +1 -1
- package/dist/types/src/TextList/TextList.d.ts +2 -1
- package/dist/types/src/ThumbnailList/ThumbnailList.d.ts +2 -1
- package/dist/types/src/Toast/Toast.d.ts +2 -1
- package/dist/types/src/Typography/Typography.d.ts +1 -1
- package/dist/types/src/Typography/TypographyGestureDetector.d.ts +2 -1
- package/dist/types/src/utils/test/MockSafeAreaProvider.d.ts +1 -1
- package/package.json +2 -2
- package/src/ActionItem/ActionItem.tsx +1 -1
- package/src/ActionItem/ActionItemGroup.tsx +1 -3
- package/src/ActionItem/components/ActionItemContainer.tsx +1 -1
- package/src/ActionLabel/ActionLabel.tsx +1 -1
- package/src/ActivityIndicator/ActivityIndicator.tsx +1 -3
- package/src/AutoLink/AutoLink.tsx +1 -1
- package/src/AutoLink/components/ComposeTextWithLinks/ComposeTextWithLinks.tsx +1 -1
- package/src/AutoLink/components/Link/Link.tsx +1 -5
- package/src/Banner/Banner.tsx +2 -2
- package/src/Banner/components/BannerIcon/BannerIcon.tsx +1 -1
- package/src/BottomSheet/components/BottomSheetOption/BottomSheetOption.tsx +1 -1
- package/src/Button/Button.tsx +1 -1
- package/src/Button/components/InternalButtonLoading/InternalButtonLoading.tsx +1 -1
- package/src/ButtonGroup/ButtonGroup.tsx +1 -1
- package/src/ButtonGroup/ButtonGroupAction.tsx +4 -4
- package/src/ButtonGroup/components/SecondaryActionSheet/SecondaryActionSheet.tsx +1 -1
- package/src/Card/Card.tsx +1 -1
- package/src/Card/components/InternalCardHeader.tsx +1 -1
- package/src/Checkbox/Checkbox.tsx +2 -2
- package/src/Checkbox/CheckboxGroup.test.tsx +1 -1
- package/src/Checkbox/CheckboxGroup.tsx +2 -2
- package/src/Chip/Chip.tsx +1 -1
- package/src/Content/Content.tsx +1 -1
- package/src/ContentOverlay/ContentOverlay.tsx +1 -1
- package/src/Disclosure/Disclosure.tsx +1 -1
- package/src/Divider/Divider.tsx +1 -1
- package/src/EmptyState/EmptyState.tsx +1 -1
- package/src/ErrorMessageWrapper/ErrorMessageWrapper.tsx +1 -1
- package/src/ErrorMessageWrapper/context/ErrorMessageProvider.tsx +1 -3
- package/src/Flex/Flex.tsx +2 -2
- package/src/Form/Form.test.tsx +2 -2
- package/src/Form/Form.tsx +1 -1
- package/src/Form/components/FormActionBar/FormActionBar.tsx +3 -3
- package/src/Form/components/FormBody/FormBody.tsx +3 -3
- package/src/Form/components/FormCache/FormCache.tsx +1 -1
- package/src/Form/components/FormErrorBanner/FormErrorBanner.tsx +1 -1
- package/src/Form/components/FormMask/FormMask.tsx +1 -1
- package/src/Form/components/FormMessage/FormMessage.tsx +1 -1
- package/src/Form/components/FormMessage/components/InternalFormMessage/InternalFormMessage.tsx +1 -1
- package/src/Form/components/FormMessageBanner/FormMessageBanner.tsx +1 -3
- package/src/Form/components/FormSaveButton/FormSaveButton.tsx +1 -1
- package/src/Form/types.ts +2 -2
- package/src/FormField/FormField.tsx +1 -1
- package/src/FormatFile/FormatFile.tsx +3 -3
- package/src/FormatFile/components/ErrorIcon/ErrorIcon.tsx +1 -1
- package/src/FormatFile/components/FileView/FileView.tsx +1 -1
- package/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.tsx +1 -1
- package/src/FormatFile/components/MediaView/MediaView.test.tsx +283 -0
- package/src/FormatFile/components/MediaView/MediaView.tsx +28 -7
- package/src/FormatFile/components/ProgressBar/ProgressBar.tsx +1 -1
- package/src/Heading/Heading.tsx +1 -1
- package/src/Icon/Icon.tsx +1 -1
- package/src/IconButton/IconButton.tsx +1 -1
- package/src/InputCurrency/InputCurrency.tsx +1 -1
- package/src/InputDate/InputDate.tsx +2 -2
- package/src/InputFieldWrapper/InputFieldWrapper.tsx +1 -1
- package/src/InputFieldWrapper/components/ClearAction/ClearAction.tsx +1 -1
- package/src/InputFieldWrapper/components/Prefix/Prefix.tsx +2 -2
- package/src/InputFieldWrapper/components/Suffix/Suffix.tsx +2 -2
- package/src/InputPassword/InputPassword.tsx +1 -1
- package/src/InputPressable/InputPressable.tsx +1 -1
- package/src/InputSearch/components/FilterButton.tsx +1 -1
- package/src/InputText/context/InputAccessoriesProvider.tsx +1 -1
- package/src/InputTime/InputTime.tsx +2 -2
- package/src/Menu/Menu.tsx +1 -1
- package/src/Menu/components/MenuOption/MenuOption.tsx +1 -1
- package/src/Menu/components/Overlay/Overlay.tsx +1 -1
- package/src/Menu/types.ts +2 -1
- package/src/ProgressBar/ProgressBar.tsx +1 -1
- package/src/ProgressBar/ProgressBarInner.tsx +1 -1
- package/src/Select/Select.tsx +2 -2
- package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.tsx +1 -1
- package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.tsx +1 -1
- package/src/Select/components/SelectInternalPicker/SelectInternalPicker.tsx +1 -1
- package/src/Select/components/SelectPressable/SelectPressable.tsx +1 -4
- package/src/StatusLabel/StatusLabel.tsx +1 -1
- package/src/Switch/Switch.tsx +1 -1
- package/src/Switch/components/BaseSwitch/BaseSwitch.tsx +1 -1
- package/src/Text/Text.tsx +1 -1
- package/src/TextList/TextList.tsx +1 -1
- package/src/ThumbnailList/ThumbnailList.tsx +1 -1
- package/src/Toast/Toast.tsx +2 -2
- package/src/Typography/Typography.tsx +1 -1
- package/src/Typography/TypographyGestureDetector.tsx +1 -3
- package/src/utils/test/MockSafeAreaProvider.tsx +1 -1
|
@@ -130,7 +130,7 @@ const computeDisplayFromNumericInput = (
|
|
|
130
130
|
}
|
|
131
131
|
};
|
|
132
132
|
|
|
133
|
-
export function InputCurrency(props: InputCurrencyProps)
|
|
133
|
+
export function InputCurrency(props: InputCurrencyProps) {
|
|
134
134
|
const {
|
|
135
135
|
showCurrencySymbol = true,
|
|
136
136
|
maxDecimalPlaces = 5,
|
|
@@ -111,7 +111,7 @@ const display = Platform.OS === "ios" ? "inline" : "default";
|
|
|
111
111
|
/**
|
|
112
112
|
* Allow users to select a date using the device date picker.
|
|
113
113
|
*/
|
|
114
|
-
export function InputDate(props: InputDateProps)
|
|
114
|
+
export function InputDate(props: InputDateProps) {
|
|
115
115
|
if (props.name) {
|
|
116
116
|
return (
|
|
117
117
|
<FormField<Date>
|
|
@@ -152,7 +152,7 @@ function InternalInputDate({
|
|
|
152
152
|
onChange,
|
|
153
153
|
accessibilityLabel,
|
|
154
154
|
accessibilityHint,
|
|
155
|
-
}: InputDateProps)
|
|
155
|
+
}: InputDateProps) {
|
|
156
156
|
const [showPicker, setShowPicker] = useState(false);
|
|
157
157
|
const { t, locale, formatDate } = useAtlantisI18n();
|
|
158
158
|
|
|
@@ -138,7 +138,7 @@ export function InputFieldWrapper({
|
|
|
138
138
|
toolbarVisibility = "while-editing",
|
|
139
139
|
loading = false,
|
|
140
140
|
loadingType = "spinner",
|
|
141
|
-
}: InputFieldWrapperProps)
|
|
141
|
+
}: InputFieldWrapperProps) {
|
|
142
142
|
fieldAffixRequiredPropsCheck([prefix, suffix]);
|
|
143
143
|
const handleClear = onClear ?? noopClear;
|
|
144
144
|
warnIfClearActionWithNoOnClear(onClear, showClearAction);
|
|
@@ -27,7 +27,7 @@ export function PrefixLabel({
|
|
|
27
27
|
inputInvalid,
|
|
28
28
|
label,
|
|
29
29
|
styleOverride,
|
|
30
|
-
}: PrefixLabelProps)
|
|
30
|
+
}: PrefixLabelProps) {
|
|
31
31
|
const styles = useStyles();
|
|
32
32
|
const typographyStyles = useTypographyStyles();
|
|
33
33
|
|
|
@@ -80,7 +80,7 @@ export function PrefixIcon({
|
|
|
80
80
|
disabled,
|
|
81
81
|
inputInvalid,
|
|
82
82
|
icon,
|
|
83
|
-
}: PrefixIconProps)
|
|
83
|
+
}: PrefixIconProps) {
|
|
84
84
|
const styles = useStyles();
|
|
85
85
|
const { tokens } = useAtlantisTheme();
|
|
86
86
|
|
|
@@ -29,7 +29,7 @@ export function SuffixLabel({
|
|
|
29
29
|
label,
|
|
30
30
|
hasLeftMargin = true,
|
|
31
31
|
styleOverride,
|
|
32
|
-
}: SuffixLabelProps)
|
|
32
|
+
}: SuffixLabelProps) {
|
|
33
33
|
const styles = useStyles();
|
|
34
34
|
const typographyStyles = useTypographyStyles();
|
|
35
35
|
|
|
@@ -86,7 +86,7 @@ export function SuffixIcon({
|
|
|
86
86
|
icon,
|
|
87
87
|
hasLeftMargin = false,
|
|
88
88
|
onPress,
|
|
89
|
-
}: SuffixIconProps)
|
|
89
|
+
}: SuffixIconProps) {
|
|
90
90
|
const styles = useStyles();
|
|
91
91
|
const { tokens } = useAtlantisTheme();
|
|
92
92
|
|
|
@@ -23,7 +23,7 @@ export interface InputPasswordProps
|
|
|
23
23
|
function InputPasswordInternal(
|
|
24
24
|
{ usePrivacyEye = true, ...props }: InputPasswordProps,
|
|
25
25
|
ref: Ref<InputTextRef>,
|
|
26
|
-
)
|
|
26
|
+
) {
|
|
27
27
|
const { t } = useAtlantisI18n();
|
|
28
28
|
const [passwordHidden, setPasswordHidden] = useState(true);
|
|
29
29
|
const [privacyEye, setPrivacyEye] = useState<IconNames>("eye");
|
|
@@ -99,7 +99,7 @@ function formatInvalidState(
|
|
|
99
99
|
return Boolean(error);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
export function InputTime(props: InputTimeProps)
|
|
102
|
+
export function InputTime(props: InputTimeProps) {
|
|
103
103
|
if (props.name) {
|
|
104
104
|
return (
|
|
105
105
|
<FormField name={props.name} validations={props.validations}>
|
|
@@ -134,7 +134,7 @@ function InternalInputTime({
|
|
|
134
134
|
showMiniLabel = true,
|
|
135
135
|
onChange,
|
|
136
136
|
showIcon = true,
|
|
137
|
-
}: InputTimeProps)
|
|
137
|
+
}: InputTimeProps) {
|
|
138
138
|
const [showPicker, setShowPicker] = useState(false);
|
|
139
139
|
const { t, formatTime } = useAtlantisI18n();
|
|
140
140
|
const { timeZone, timeFormat } = useAtlantisContext();
|
package/src/Menu/Menu.tsx
CHANGED
|
@@ -20,7 +20,7 @@ import { useAtlantisContext } from "../AtlantisContext";
|
|
|
20
20
|
import { useAtlantisI18n } from "../hooks/useAtlantisI18n";
|
|
21
21
|
import { useAtlantisTheme } from "../AtlantisThemeContext";
|
|
22
22
|
|
|
23
|
-
export function Menu({ menuOptions, customActivator }: MenuProps)
|
|
23
|
+
export function Menu({ menuOptions, customActivator }: MenuProps) {
|
|
24
24
|
const [open, setOpen] = useState<boolean>(false);
|
|
25
25
|
const [menuPosition, setMenuPosition] = useState<object>();
|
|
26
26
|
const activatorLayout = useRef<LayoutRectangle>();
|
|
@@ -17,7 +17,7 @@ export function MenuOption({
|
|
|
17
17
|
textTransform = "capitalize",
|
|
18
18
|
onPress,
|
|
19
19
|
setOpen,
|
|
20
|
-
}: MenuOptionInternalProps)
|
|
20
|
+
}: MenuOptionInternalProps) {
|
|
21
21
|
const destructiveColor = "destructive";
|
|
22
22
|
const textVariation = destructive ? destructiveColor : "heading";
|
|
23
23
|
const styles = useStyles();
|
|
@@ -3,7 +3,7 @@ import { Pressable, View } from "react-native";
|
|
|
3
3
|
import { useStyles } from "./Overlay.style";
|
|
4
4
|
import type { OverlayProp } from "../../types";
|
|
5
5
|
|
|
6
|
-
export function Overlay({ setOpen }: OverlayProp)
|
|
6
|
+
export function Overlay({ setOpen }: OverlayProp) {
|
|
7
7
|
const styles = useStyles();
|
|
8
8
|
|
|
9
9
|
return (
|
package/src/Menu/types.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IconColorNames, IconNames } from "@jobber/design";
|
|
2
|
+
import type { ReactElement } from "react";
|
|
2
3
|
import type { TextAlign } from "../Typography";
|
|
3
4
|
|
|
4
5
|
export interface MenuOptionProps {
|
|
@@ -17,7 +18,7 @@ export interface MenuOptionInternalProps extends MenuOptionProps {
|
|
|
17
18
|
|
|
18
19
|
export interface MenuProps {
|
|
19
20
|
readonly menuOptions?: MenuOptionProps[];
|
|
20
|
-
readonly customActivator?:
|
|
21
|
+
readonly customActivator?: ReactElement;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
export interface OverlayProp {
|
|
@@ -14,7 +14,7 @@ export function ProgressBarInner({
|
|
|
14
14
|
width,
|
|
15
15
|
// animationDuration = 0,
|
|
16
16
|
color,
|
|
17
|
-
}: ProgressBarInnerProps)
|
|
17
|
+
}: ProgressBarInnerProps) {
|
|
18
18
|
// Animation breaking on Android
|
|
19
19
|
// const [animatedOpacity] = useTiming({
|
|
20
20
|
// duration: animationDuration,
|
package/src/Select/Select.tsx
CHANGED
|
@@ -110,7 +110,7 @@ export function Select({
|
|
|
110
110
|
accessibilityLabel,
|
|
111
111
|
name,
|
|
112
112
|
testID,
|
|
113
|
-
}: SelectProps)
|
|
113
|
+
}: SelectProps) {
|
|
114
114
|
const { field, error } = useFormController({
|
|
115
115
|
name,
|
|
116
116
|
validations,
|
|
@@ -243,6 +243,6 @@ function getTestID(testID?: string): string {
|
|
|
243
243
|
return "ATL-Select";
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
export function Option({ children }: SelectOption)
|
|
246
|
+
export function Option({ children }: SelectOption) {
|
|
247
247
|
return <>{children}</>;
|
|
248
248
|
}
|
|
@@ -19,7 +19,7 @@ export function SelectDefaultPicker({
|
|
|
19
19
|
children,
|
|
20
20
|
options,
|
|
21
21
|
onChange,
|
|
22
|
-
}: SelectDefaultPickerProps)
|
|
22
|
+
}: SelectDefaultPickerProps) {
|
|
23
23
|
const [show, setShow] = useState(false);
|
|
24
24
|
const { t } = useAtlantisI18n();
|
|
25
25
|
const selectedLanguage = options.find(option => option.isActive);
|
|
@@ -12,7 +12,7 @@ export function SelectDefaultPicker({
|
|
|
12
12
|
options,
|
|
13
13
|
disabled,
|
|
14
14
|
onChange,
|
|
15
|
-
}: SelectDefaultPickerProps)
|
|
15
|
+
}: SelectDefaultPickerProps) {
|
|
16
16
|
const selectedItem = options.find(option => option.isActive);
|
|
17
17
|
const pickerRef = useRef<Picker<string>>(null);
|
|
18
18
|
const { tokens } = useAtlantisTheme();
|
|
@@ -13,10 +13,7 @@ type SelectPressableProps = Pick<SelectInternalPickerProps, "children"> &
|
|
|
13
13
|
* screen-reader is being used to avoid screen-readers from ignoring the press
|
|
14
14
|
* on the MenuView
|
|
15
15
|
*/
|
|
16
|
-
export function SelectPressable({
|
|
17
|
-
children,
|
|
18
|
-
onPress,
|
|
19
|
-
}: SelectPressableProps): JSX.Element {
|
|
16
|
+
export function SelectPressable({ children, onPress }: SelectPressableProps) {
|
|
20
17
|
const isScreenReaderEnabled = useIsScreenReaderEnabled();
|
|
21
18
|
const styles = useStyles();
|
|
22
19
|
if (isScreenReaderEnabled) return <>{children}</>;
|
package/src/Switch/Switch.tsx
CHANGED
|
@@ -20,7 +20,7 @@ interface WithLabelProps extends BaseSwitchProps {
|
|
|
20
20
|
|
|
21
21
|
export type SwitchProps = XOR<BaseSwitchProps, WithLabelProps>;
|
|
22
22
|
|
|
23
|
-
export function Switch(props: SwitchProps)
|
|
23
|
+
export function Switch(props: SwitchProps) {
|
|
24
24
|
const switchProps: SwitchProps = {
|
|
25
25
|
...props,
|
|
26
26
|
accessibilityLabel: props.accessibilityLabel || props.label,
|
package/src/Text/Text.tsx
CHANGED
package/src/Toast/Toast.tsx
CHANGED
|
@@ -17,7 +17,7 @@ import { tokens as staticTokens } from "../utils/design";
|
|
|
17
17
|
const MAX_TOAST_MESSAGE_LENGTH = 60;
|
|
18
18
|
const ANNOUNCEMENT_DELAY = 100;
|
|
19
19
|
|
|
20
|
-
function DefaultToast({ text1 }: ToastConfigParams<string>)
|
|
20
|
+
function DefaultToast({ text1 }: ToastConfigParams<string>) {
|
|
21
21
|
const { bottom } = useSafeAreaInsets();
|
|
22
22
|
const { t } = useAtlantisI18n();
|
|
23
23
|
const styles = useStyles();
|
|
@@ -56,7 +56,7 @@ export interface JobberToastProps {
|
|
|
56
56
|
readonly bottomOffset?: number;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
export function JobberToast({ bottomOffset }: JobberToastProps)
|
|
59
|
+
export function JobberToast({ bottomOffset }: JobberToastProps) {
|
|
60
60
|
return <Toast bottomOffset={bottomOffset} config={toastConfig} />;
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -174,7 +174,7 @@ function InternalTypography<T extends FontFamily = "base">({
|
|
|
174
174
|
UNSAFE_style,
|
|
175
175
|
selectable = true,
|
|
176
176
|
onTextLayout,
|
|
177
|
-
}: TypographyProps<T>)
|
|
177
|
+
}: TypographyProps<T>) {
|
|
178
178
|
const styles = useTypographyStyles();
|
|
179
179
|
const sizeAndHeight = getSizeAndHeightStyle(size, styles, lineHeight);
|
|
180
180
|
const style: StyleProp<ViewStyle>[] = [
|
|
@@ -7,8 +7,6 @@ import { Gesture, GestureDetector } from "react-native-gesture-handler";
|
|
|
7
7
|
* accidental highlighting of text in Android devices
|
|
8
8
|
* https://github.com/software-mansion/react-native-gesture-handler/issues/1372
|
|
9
9
|
*/
|
|
10
|
-
export function TypographyGestureDetector(
|
|
11
|
-
props: PropsWithChildren<unknown>,
|
|
12
|
-
): JSX.Element {
|
|
10
|
+
export function TypographyGestureDetector(props: PropsWithChildren<unknown>) {
|
|
13
11
|
return <GestureDetector {...props} gesture={Gesture.Native()} />;
|
|
14
12
|
}
|
|
@@ -12,7 +12,7 @@ export function MockSafeAreaProvider({
|
|
|
12
12
|
frame,
|
|
13
13
|
insets,
|
|
14
14
|
children,
|
|
15
|
-
}: MockSafeAreaProviderProps)
|
|
15
|
+
}: MockSafeAreaProviderProps) {
|
|
16
16
|
const initialFrame: Rect = { x: 0, y: 0, width: 0, height: 0 };
|
|
17
17
|
const initialInsets: EdgeInsets = { bottom: 50, top: 50, left: 0, right: 0 };
|
|
18
18
|
|