@jobber/components-native 0.101.7 → 0.101.8
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/docs/InputDate/InputDate.md +1 -4
- package/dist/docs/Select/Select.md +22 -16
- package/dist/docs/usage-guidelines/usage-guidelines.md +9 -13
- package/dist/package.json +3 -3
- package/dist/tsconfig.build.json +8 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/tsconfig.json +1 -0
- package/package.json +3 -3
- package/src/ActionItem/ActionItem.stories.tsx +16 -95
- package/src/ActionItem/ActionItemGroup.stories.tsx +7 -84
- package/src/ActionItem/docs/ActionItemActionAlignmentExample.tsx +23 -0
- package/src/ActionItem/docs/ActionItemBasicExample.tsx +12 -0
- package/src/ActionItem/docs/ActionItemGroupBasicExample.tsx +39 -0
- package/src/ActionItem/docs/ActionItemGroupMixedComponentsExample.tsx +52 -0
- package/src/ActionItem/docs/ActionItemInACardExample.tsx +27 -0
- package/src/ActionItem/docs/ActionItemInteractiveChildrenExample.tsx +30 -0
- package/src/ActionItem/docs/ActionItemMixedComponentsExample.tsx +36 -0
- package/src/ActionItem/docs/ActionItemNoActionExample.tsx +15 -0
- package/src/ActionItem/docs/ActionItemTitleOnlyExample.tsx +18 -0
- package/src/ActionItem/docs/index.ts +9 -0
- package/src/ActionLabel/ActionLabel.stories.tsx +10 -11
- package/src/ActionLabel/docs/ActionLabelBasicExample.tsx +15 -0
- package/src/ActionLabel/docs/ActionLabelColorExample.tsx +15 -0
- package/src/ActionLabel/docs/ActionLabelDarkBackgroundExample.tsx +25 -0
- package/src/ActionLabel/docs/ActionLabelDisabledExample.tsx +15 -0
- package/src/ActionLabel/docs/index.ts +4 -0
- package/src/ActivityIndicator/ActivityIndicator.stories.tsx +3 -18
- package/src/ActivityIndicator/docs/ActivityIndicatorBasicExample.tsx +22 -0
- package/src/ActivityIndicator/docs/index.ts +1 -0
- package/src/AtlantisThemeContext/AtlantisThemeContext.stories.tsx +7 -70
- package/src/AtlantisThemeContext/docs/AtlantisThemeContextBasicExample.tsx +41 -0
- package/src/AtlantisThemeContext/docs/AtlantisThemeContextForceThemeForProviderExample.tsx +56 -0
- package/src/AtlantisThemeContext/docs/index.ts +2 -0
- package/src/AutoLink/AutoLink.stories.tsx +3 -0
- package/src/AutoLink/docs/AutoLinkBasicExample.tsx +14 -0
- package/src/AutoLink/docs/AutoLinkSkipPhoneNumberExample.tsx +14 -0
- package/src/AutoLink/docs/index.ts +2 -0
- package/src/Banner/Banner.stories.tsx +11 -45
- package/src/Banner/docs/BannerActionsInBannersExample.tsx +18 -0
- package/src/Banner/docs/BannerBasicExample.tsx +21 -0
- package/src/Banner/docs/BannerErrorDetailsExample.tsx +19 -0
- package/src/Banner/docs/BannerErrorExample.tsx +13 -0
- package/src/Banner/docs/index.ts +4 -0
- package/src/BottomSheet/BottomSheet.stories.tsx +6 -111
- package/src/BottomSheet/docs/BottomSheetBasicExample.tsx +63 -0
- package/src/BottomSheet/docs/BottomSheetHeaderFooterExample.tsx +65 -0
- package/src/BottomSheet/docs/index.ts +2 -0
- package/src/Button/Button.stories.tsx +3 -5
- package/src/Button/docs/ButtonBasicExample.tsx +14 -0
- package/src/Button/docs/ButtonCancelExample.tsx +15 -0
- package/src/Button/docs/index.ts +2 -0
- package/src/ButtonGroup/ButtonGroup.stories.tsx +9 -64
- package/src/ButtonGroup/docs/ButtonGroupBasicExample.tsx +34 -0
- package/src/ButtonGroup/docs/ButtonGroupPrimaryExample.tsx +37 -0
- package/src/ButtonGroup/docs/ButtonGroupSecondaryExample.tsx +35 -0
- package/src/ButtonGroup/docs/index.ts +3 -0
- package/src/Card/Card.stories.tsx +9 -43
- package/src/Card/docs/CardBasicExample.tsx +20 -0
- package/src/Card/docs/CardElevationExample.tsx +30 -0
- package/src/Card/docs/CardPressableExample.tsx +34 -0
- package/src/Card/docs/index.ts +3 -0
- package/src/Checkbox/Checkbox.stories.tsx +16 -56
- package/src/Checkbox/docs/CheckboxBasicExample.tsx +9 -0
- package/src/Checkbox/docs/CheckboxControlledExample.tsx +18 -0
- package/src/Checkbox/docs/CheckboxGroupBasicExample.tsx +15 -0
- package/src/Checkbox/docs/CheckboxGroupControlledExample.tsx +32 -0
- package/src/Checkbox/docs/CheckboxGroupLabelledExample.tsx +15 -0
- package/src/Checkbox/docs/index.ts +5 -0
- package/src/Chip/Chip.stories.tsx +11 -62
- package/src/Chip/docs/ChipAccentExample.tsx +62 -0
- package/src/Chip/docs/ChipBasicExample.tsx +19 -0
- package/src/Chip/docs/ChipDismissableExample.tsx +23 -0
- package/src/Chip/docs/ChipInactiveBackgroundColorExample.tsx +23 -0
- package/src/Chip/docs/index.ts +4 -0
- package/src/Content/Content.stories.tsx +4 -19
- package/src/Content/docs/ContentHorizontal.tsx +22 -0
- package/src/Content/docs/ContentVertical.tsx +22 -0
- package/src/Content/docs/index.ts +2 -0
- package/src/ContentOverlay/ContentOverlay.stories.tsx +6 -52
- package/src/ContentOverlay/docs/ContentOverlayBasic.tsx +54 -0
- package/src/ContentOverlay/docs/index.ts +1 -0
- package/src/Disclosure/Disclosure.stories.tsx +4 -20
- package/src/Disclosure/docs/DisclosureBasic.tsx +23 -0
- package/src/Disclosure/docs/index.ts +1 -0
- package/src/Divider/Divider.stories.tsx +6 -50
- package/src/Divider/docs/DividerHorizontal.tsx +21 -0
- package/src/Divider/docs/DividerVertical.tsx +39 -0
- package/src/Divider/docs/index.ts +2 -0
- package/src/EmptyState/EmptyState.stories.tsx +2 -0
- package/src/EmptyState/docs/EmptyStateBasic.tsx +27 -0
- package/src/EmptyState/docs/index.ts +1 -0
- package/src/Flex/Flex.stories.tsx +6 -57
- package/src/Flex/docs/FlexMultiRow.tsx +25 -0
- package/src/Flex/docs/FlexNested.tsx +22 -0
- package/src/Flex/docs/index.ts +2 -0
- package/src/Form/Form.stories.tsx +6 -50
- package/src/Form/docs/FormBasic.tsx +63 -0
- package/src/Form/docs/index.ts +1 -0
- package/src/FormField/FormField.stories.tsx +4 -46
- package/src/FormField/docs/FormFieldBasic.tsx +15 -0
- package/src/FormField/docs/FormFieldWithValidations.tsx +38 -0
- package/src/FormField/docs/index.ts +2 -0
- package/src/FormatFile/FormatFile.stories.tsx +8 -36
- package/src/FormatFile/docs/FormatFileBasic.tsx +25 -0
- package/src/FormatFile/docs/index.ts +1 -0
- package/src/Glimmer/Glimmer.stories.tsx +6 -31
- package/src/Glimmer/docs/GlimmerBasic.tsx +9 -0
- package/src/Glimmer/docs/GlimmerInDepth.tsx +32 -0
- package/src/Glimmer/docs/index.ts +2 -0
- package/src/Heading/Heading.stories.tsx +5 -18
- package/src/Heading/docs/HeadingLevels.tsx +21 -0
- package/src/Heading/docs/index.ts +1 -0
- package/src/Icon/Icon.stories.tsx +4 -7
- package/src/Icon/docs/IconBasic.tsx +7 -0
- package/src/Icon/docs/index.ts +1 -0
- package/src/IconButton/IconButton.stories.tsx +2 -0
- package/src/IconButton/docs/IconButtonBasic.tsx +17 -0
- package/src/IconButton/docs/index.ts +1 -0
- package/src/InputCurrency/InputCurrency.stories.tsx +2 -0
- package/src/InputCurrency/docs/InputCurrencyBasic.tsx +9 -0
- package/src/InputCurrency/docs/index.ts +1 -0
- package/src/InputDate/InputDate.stories.tsx +10 -11
- package/src/InputDate/docs/InputDateBasic.tsx +9 -0
- package/src/InputDate/docs/InputDateEmptyValueLabel.tsx +17 -0
- package/src/InputDate/docs/InputDateInvalid.tsx +17 -0
- package/src/InputDate/docs/index.ts +3 -0
- package/src/InputEmail/InputEmail.stories.tsx +4 -7
- package/src/InputEmail/docs/InputEmailBasic.tsx +9 -0
- package/src/InputEmail/docs/index.ts +1 -0
- package/src/InputFieldWrapper/InputFieldWrapper.stories.tsx +15 -23
- package/src/InputFieldWrapper/docs/InputFieldWrapperBasic.tsx +15 -0
- package/src/InputFieldWrapper/docs/InputFieldWrapperClearable.tsx +24 -0
- package/src/InputFieldWrapper/docs/InputFieldWrapperDisabled.tsx +18 -0
- package/src/InputFieldWrapper/docs/InputFieldWrapperInvalid.tsx +18 -0
- package/src/InputFieldWrapper/docs/InputFieldWrapperPrefixAndSuffix.tsx +18 -0
- package/src/InputFieldWrapper/docs/index.ts +5 -0
- package/src/InputNumber/InputNumber.stories.tsx +5 -6
- package/src/InputNumber/docs/InputNumberBasic.tsx +7 -0
- package/src/InputNumber/docs/InputNumberInvalid.tsx +15 -0
- package/src/InputNumber/docs/index.ts +2 -0
- package/src/InputPassword/InputPassword.stories.tsx +4 -5
- package/src/InputPassword/docs/InputPasswordBasic.tsx +9 -0
- package/src/InputPassword/docs/index.ts +1 -0
- package/src/InputPressable/InputPressable.stories.tsx +14 -20
- package/src/InputPressable/docs/InputPressableBasic.tsx +17 -0
- package/src/InputPressable/docs/InputPressableClearable.tsx +23 -0
- package/src/InputPressable/docs/InputPressableClickableSuffix.tsx +14 -0
- package/src/InputPressable/docs/InputPressableDisabled.tsx +16 -0
- package/src/InputPressable/docs/InputPressableInvalid.tsx +16 -0
- package/src/InputPressable/docs/InputPressablePrefixOrSuffix.tsx +20 -0
- package/src/InputPressable/docs/index.ts +6 -0
- package/src/InputSearch/InputSearch.stories.tsx +4 -18
- package/src/InputSearch/docs/InputSearchBasic.tsx +20 -0
- package/src/InputSearch/docs/index.ts +1 -0
- package/src/InputText/InputText.stories.tsx +7 -29
- package/src/InputText/docs/InputTextBasic.tsx +7 -0
- package/src/InputText/docs/InputTextInvalid.tsx +14 -0
- package/src/InputText/docs/InputTextToolbar.tsx +31 -0
- package/src/InputText/docs/index.ts +3 -0
- package/src/InputTime/InputTime.stories.tsx +10 -72
- package/src/InputTime/docs/InputTimeBasic.tsx +29 -0
- package/src/InputTime/docs/InputTimeEmptyValue.tsx +27 -0
- package/src/InputTime/docs/InputTimeFormControlled.tsx +46 -0
- package/src/InputTime/docs/index.ts +3 -0
- package/src/ProgressBar/ProgressBar.stories.tsx +6 -46
- package/src/ProgressBar/docs/ProgressBarBasic.tsx +22 -0
- package/src/ProgressBar/docs/ProgressBarWithHeader.tsx +45 -0
- package/src/ProgressBar/docs/index.ts +2 -0
- package/src/Select/Select.stories.tsx +6 -18
- package/src/Select/docs/SelectBasic.tsx +14 -0
- package/src/Select/docs/SelectInitialValue.tsx +18 -0
- package/src/Select/docs/index.ts +2 -0
- package/src/StatusLabel/StatusLabel.stories.tsx +2 -0
- package/src/StatusLabel/docs/StatusLabelBasic.tsx +9 -0
- package/src/StatusLabel/docs/index.ts +1 -0
- package/src/Switch/Switch.stories.tsx +6 -18
- package/src/Switch/docs/SwitchBasic.tsx +9 -0
- package/src/Switch/docs/SwitchControlled.tsx +21 -0
- package/src/Switch/docs/index.ts +2 -0
- package/src/Text/Text.stories.tsx +14 -33
- package/src/Text/docs/TextBasic.tsx +17 -0
- package/src/Text/docs/TextMultiLevelNesting.tsx +14 -0
- package/src/Text/docs/TextNestedBold.tsx +10 -0
- package/src/Text/docs/TextNestedMixedStyles.tsx +11 -0
- package/src/Text/docs/index.ts +4 -0
- package/src/TextList/TextList.stories.tsx +12 -0
- package/src/TextList/docs/TextListBasic.tsx +9 -0
- package/src/TextList/docs/TextListChildSpacing.tsx +19 -0
- package/src/TextList/docs/TextListEmphasis.tsx +19 -0
- package/src/TextList/docs/TextListLevels.tsx +19 -0
- package/src/TextList/docs/TextListSpacing.tsx +19 -0
- package/src/TextList/docs/index.ts +5 -0
- package/src/ThumbnailList/ThumbnailList.stories.tsx +3 -61
- package/src/ThumbnailList/docs/ThumbnailListBasic.tsx +62 -0
- package/src/ThumbnailList/docs/index.ts +1 -0
- package/src/Toast/Toast.stories.tsx +10 -21
- package/src/Toast/docs/ToastBasic.tsx +23 -0
- package/src/Toast/docs/index.ts +1 -0
- package/src/Typography/Typography.stories.tsx +5 -11
- package/src/Typography/docs/TypographyBasic.tsx +9 -0
- package/src/Typography/docs/index.ts +1 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Text } from "@jobber/components-native";
|
|
3
|
+
|
|
4
|
+
export function TextMultiLevelNesting() {
|
|
5
|
+
return (
|
|
6
|
+
<Text>
|
|
7
|
+
Level 1{" "}
|
|
8
|
+
<Text>
|
|
9
|
+
contains <Text emphasis="strong">Level 2</Text>
|
|
10
|
+
</Text>{" "}
|
|
11
|
+
done.
|
|
12
|
+
</Text>
|
|
13
|
+
);
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Text } from "@jobber/components-native";
|
|
3
|
+
|
|
4
|
+
export function TextNestedMixedStyles() {
|
|
5
|
+
return (
|
|
6
|
+
<Text>
|
|
7
|
+
Start, <Text italic>italic segment</Text>, and a
|
|
8
|
+
<Text emphasis="strong"> bold segment</Text>.
|
|
9
|
+
</Text>
|
|
10
|
+
);
|
|
11
|
+
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
2
|
import { TextList } from "@jobber/components-native";
|
|
3
|
+
import {
|
|
4
|
+
TextListBasic,
|
|
5
|
+
TextListChildSpacing,
|
|
6
|
+
TextListEmphasis,
|
|
7
|
+
TextListLevels,
|
|
8
|
+
TextListSpacing,
|
|
9
|
+
} from "./docs";
|
|
3
10
|
|
|
4
11
|
const meta = {
|
|
5
12
|
title: "Components/Lists and Tables/TextList",
|
|
@@ -12,12 +19,14 @@ export default meta;
|
|
|
12
19
|
type Story = StoryObj<typeof meta>;
|
|
13
20
|
|
|
14
21
|
export const Basic: Story = {
|
|
22
|
+
render: TextListBasic,
|
|
15
23
|
args: {
|
|
16
24
|
items: ["Item uno", "Item dos", "Item tres"],
|
|
17
25
|
},
|
|
18
26
|
};
|
|
19
27
|
|
|
20
28
|
export const Levels: Story = {
|
|
29
|
+
render: TextListLevels,
|
|
21
30
|
args: {
|
|
22
31
|
items: [
|
|
23
32
|
"This is the first item",
|
|
@@ -29,6 +38,7 @@ export const Levels: Story = {
|
|
|
29
38
|
};
|
|
30
39
|
|
|
31
40
|
export const Emphasis: Story = {
|
|
41
|
+
render: TextListEmphasis,
|
|
32
42
|
args: {
|
|
33
43
|
items: [
|
|
34
44
|
"This is the first item",
|
|
@@ -40,6 +50,7 @@ export const Emphasis: Story = {
|
|
|
40
50
|
};
|
|
41
51
|
|
|
42
52
|
export const Spacing: Story = {
|
|
53
|
+
render: TextListSpacing,
|
|
43
54
|
args: {
|
|
44
55
|
items: [
|
|
45
56
|
"This is the first item",
|
|
@@ -51,6 +62,7 @@ export const Spacing: Story = {
|
|
|
51
62
|
};
|
|
52
63
|
|
|
53
64
|
export const ChildSpacing: Story = {
|
|
65
|
+
render: TextListChildSpacing,
|
|
54
66
|
args: {
|
|
55
67
|
items: [
|
|
56
68
|
"This is the first item",
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
import { TextList } from "@jobber/components-native";
|
|
4
|
+
|
|
5
|
+
type TextListProps = ComponentProps<typeof TextList>;
|
|
6
|
+
|
|
7
|
+
export function TextListBasic(props: Partial<TextListProps>) {
|
|
8
|
+
return <TextList items={["Item uno", "Item dos", "Item tres"]} {...props} />;
|
|
9
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
import { TextList } from "@jobber/components-native";
|
|
4
|
+
|
|
5
|
+
type TextListProps = ComponentProps<typeof TextList>;
|
|
6
|
+
|
|
7
|
+
export function TextListChildSpacing(props: Partial<TextListProps>) {
|
|
8
|
+
return (
|
|
9
|
+
<TextList
|
|
10
|
+
items={[
|
|
11
|
+
"This is the first item",
|
|
12
|
+
"This is the second item",
|
|
13
|
+
"This is the third item",
|
|
14
|
+
]}
|
|
15
|
+
childSpacing="large"
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
import { TextList } from "@jobber/components-native";
|
|
4
|
+
|
|
5
|
+
type TextListProps = ComponentProps<typeof TextList>;
|
|
6
|
+
|
|
7
|
+
export function TextListEmphasis(props: Partial<TextListProps>) {
|
|
8
|
+
return (
|
|
9
|
+
<TextList
|
|
10
|
+
items={[
|
|
11
|
+
"This is the first item",
|
|
12
|
+
"This is the second item",
|
|
13
|
+
"This is the third item",
|
|
14
|
+
]}
|
|
15
|
+
emphasis="strong"
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
import { TextList } from "@jobber/components-native";
|
|
4
|
+
|
|
5
|
+
type TextListProps = ComponentProps<typeof TextList>;
|
|
6
|
+
|
|
7
|
+
export function TextListLevels(props: Partial<TextListProps>) {
|
|
8
|
+
return (
|
|
9
|
+
<TextList
|
|
10
|
+
items={[
|
|
11
|
+
"This is the first item",
|
|
12
|
+
"This is the second item",
|
|
13
|
+
"This is the third item",
|
|
14
|
+
]}
|
|
15
|
+
level="textSupporting"
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
import { TextList } from "@jobber/components-native";
|
|
4
|
+
|
|
5
|
+
type TextListProps = ComponentProps<typeof TextList>;
|
|
6
|
+
|
|
7
|
+
export function TextListSpacing(props: Partial<TextListProps>) {
|
|
8
|
+
return (
|
|
9
|
+
<TextList
|
|
10
|
+
items={[
|
|
11
|
+
"This is the first item",
|
|
12
|
+
"This is the second item",
|
|
13
|
+
"This is the third item",
|
|
14
|
+
]}
|
|
15
|
+
spacing="large"
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { TextListBasic } from "./TextListBasic";
|
|
2
|
+
export { TextListLevels } from "./TextListLevels";
|
|
3
|
+
export { TextListEmphasis } from "./TextListEmphasis";
|
|
4
|
+
export { TextListSpacing } from "./TextListSpacing";
|
|
5
|
+
export { TextListChildSpacing } from "./TextListChildSpacing";
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
AtlantisOverlayProvider,
|
|
6
|
-
ThumbnailList,
|
|
7
|
-
} from "@jobber/components-native";
|
|
2
|
+
import { ThumbnailList } from "@jobber/components-native";
|
|
3
|
+
import { ThumbnailListBasic } from "./docs";
|
|
8
4
|
|
|
9
5
|
const meta = {
|
|
10
6
|
title: "Components/Images and Icons/ThumbnailList",
|
|
@@ -17,63 +13,9 @@ const meta = {
|
|
|
17
13
|
export default meta;
|
|
18
14
|
type Story = StoryObj<typeof meta>;
|
|
19
15
|
|
|
20
|
-
const BasicTemplate = (args: Story["args"]) => (
|
|
21
|
-
<SafeAreaProvider>
|
|
22
|
-
<AtlantisOverlayProvider>
|
|
23
|
-
<ThumbnailList {...args} />
|
|
24
|
-
</AtlantisOverlayProvider>
|
|
25
|
-
</SafeAreaProvider>
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
const files = [
|
|
29
|
-
{
|
|
30
|
-
contentType: "image/png",
|
|
31
|
-
fileName: "image.png",
|
|
32
|
-
thumbnailUrl: "https://picsum.photos/250",
|
|
33
|
-
url: "https://picsum.photos/250",
|
|
34
|
-
fileSize: 1024,
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
contentType: "image/png",
|
|
38
|
-
fileName: "atlantis.png",
|
|
39
|
-
thumbnailUrl: "https://picsum.photos/250",
|
|
40
|
-
url: "https://picsum.photos/250",
|
|
41
|
-
fileSize: 1024,
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
contentType: "image/png",
|
|
45
|
-
fileName: "components.png",
|
|
46
|
-
thumbnailUrl: "https://picsum.photos/250",
|
|
47
|
-
url: "https://picsum.photos/250",
|
|
48
|
-
fileSize: 1024,
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
contentType: "image/png",
|
|
52
|
-
fileName: "storybook.png",
|
|
53
|
-
thumbnailUrl: "https://picsum.photos/250",
|
|
54
|
-
url: "https://picsum.photos/250",
|
|
55
|
-
fileSize: 1024,
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
contentType: "image/png",
|
|
59
|
-
fileName: "storybook2.png",
|
|
60
|
-
thumbnailUrl: "https://picsum.photos/250",
|
|
61
|
-
url: "https://picsum.photos/250",
|
|
62
|
-
fileSize: 1024,
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
contentType: "image/png",
|
|
66
|
-
fileName: "components2.png",
|
|
67
|
-
thumbnailUrl: "https://picsum.photos/250",
|
|
68
|
-
url: "https://picsum.photos/250",
|
|
69
|
-
fileSize: 1024,
|
|
70
|
-
},
|
|
71
|
-
];
|
|
72
|
-
|
|
73
16
|
export const Basic: Story = {
|
|
74
|
-
render:
|
|
17
|
+
render: ThumbnailListBasic,
|
|
75
18
|
args: {
|
|
76
|
-
files,
|
|
77
19
|
rowCount: 2,
|
|
78
20
|
},
|
|
79
21
|
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SafeAreaProvider } from "react-native-safe-area-context";
|
|
3
|
+
import {
|
|
4
|
+
AtlantisOverlayProvider,
|
|
5
|
+
ThumbnailList,
|
|
6
|
+
} from "@jobber/components-native";
|
|
7
|
+
import type { ThumbnailListProps } from "@jobber/components-native";
|
|
8
|
+
|
|
9
|
+
const files = [
|
|
10
|
+
{
|
|
11
|
+
contentType: "image/png",
|
|
12
|
+
fileName: "image.png",
|
|
13
|
+
thumbnailUrl: "https://picsum.photos/250",
|
|
14
|
+
url: "https://picsum.photos/250",
|
|
15
|
+
fileSize: 1024,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
contentType: "image/png",
|
|
19
|
+
fileName: "atlantis.png",
|
|
20
|
+
thumbnailUrl: "https://picsum.photos/250",
|
|
21
|
+
url: "https://picsum.photos/250",
|
|
22
|
+
fileSize: 1024,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
contentType: "image/png",
|
|
26
|
+
fileName: "components.png",
|
|
27
|
+
thumbnailUrl: "https://picsum.photos/250",
|
|
28
|
+
url: "https://picsum.photos/250",
|
|
29
|
+
fileSize: 1024,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
contentType: "image/png",
|
|
33
|
+
fileName: "storybook.png",
|
|
34
|
+
thumbnailUrl: "https://picsum.photos/250",
|
|
35
|
+
url: "https://picsum.photos/250",
|
|
36
|
+
fileSize: 1024,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
contentType: "image/png",
|
|
40
|
+
fileName: "storybook2.png",
|
|
41
|
+
thumbnailUrl: "https://picsum.photos/250",
|
|
42
|
+
url: "https://picsum.photos/250",
|
|
43
|
+
fileSize: 1024,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
contentType: "image/png",
|
|
47
|
+
fileName: "components2.png",
|
|
48
|
+
thumbnailUrl: "https://picsum.photos/250",
|
|
49
|
+
url: "https://picsum.photos/250",
|
|
50
|
+
fileSize: 1024,
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
export function ThumbnailListBasic(props: Partial<ThumbnailListProps>) {
|
|
55
|
+
return (
|
|
56
|
+
<SafeAreaProvider>
|
|
57
|
+
<AtlantisOverlayProvider>
|
|
58
|
+
<ThumbnailList files={files} rowCount={2} {...props} />
|
|
59
|
+
</AtlantisOverlayProvider>
|
|
60
|
+
</SafeAreaProvider>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ThumbnailListBasic } from "./ThumbnailListBasic";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
3
|
-
import {
|
|
3
|
+
import { SafeAreaProvider } from "react-native-safe-area-context";
|
|
4
|
+
import { ToastBasic } from "./docs";
|
|
4
5
|
|
|
5
6
|
interface ToastStoryArgs {
|
|
6
7
|
message: string;
|
|
@@ -15,10 +16,13 @@ const meta = {
|
|
|
15
16
|
decorators: [
|
|
16
17
|
Story => {
|
|
17
18
|
return (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
<SafeAreaProvider>
|
|
20
|
+
{/* eslint-disable-next-line react/forbid-elements -- This is a
|
|
21
|
+
storybook decorator so it doesn't affect react-native stuff */}
|
|
22
|
+
<div style={{ height: "90vh" }}>
|
|
23
|
+
<Story />
|
|
24
|
+
</div>
|
|
25
|
+
</SafeAreaProvider>
|
|
22
26
|
);
|
|
23
27
|
},
|
|
24
28
|
],
|
|
@@ -28,23 +32,8 @@ export default meta;
|
|
|
28
32
|
|
|
29
33
|
type Story = StoryObj<ToastStoryArgs>;
|
|
30
34
|
|
|
31
|
-
const Template = (args: Story["args"]) => (
|
|
32
|
-
<>
|
|
33
|
-
<Button
|
|
34
|
-
label="Show toast"
|
|
35
|
-
onPress={() =>
|
|
36
|
-
showToast({
|
|
37
|
-
message: args?.message ?? "Showed toast",
|
|
38
|
-
bottomTabsVisible: false,
|
|
39
|
-
})
|
|
40
|
-
}
|
|
41
|
-
/>
|
|
42
|
-
<Toast />
|
|
43
|
-
</>
|
|
44
|
-
);
|
|
45
|
-
|
|
46
35
|
export const Basic: Story = {
|
|
47
|
-
render:
|
|
36
|
+
render: ToastBasic,
|
|
48
37
|
args: {
|
|
49
38
|
message: "Showed toast",
|
|
50
39
|
},
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Button, Toast, showToast } from "@jobber/components-native";
|
|
3
|
+
|
|
4
|
+
interface ToastStoryArgs {
|
|
5
|
+
message?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function ToastBasic(props: Partial<ToastStoryArgs>) {
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<Button
|
|
12
|
+
label="Show toast"
|
|
13
|
+
onPress={() =>
|
|
14
|
+
showToast({
|
|
15
|
+
message: props.message ?? "Showed toast",
|
|
16
|
+
bottomTabsVisible: false,
|
|
17
|
+
})
|
|
18
|
+
}
|
|
19
|
+
/>
|
|
20
|
+
<Toast />
|
|
21
|
+
</>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ToastBasic } from "./ToastBasic";
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
3
3
|
import { Typography } from "@jobber/components-native";
|
|
4
|
+
import { TypographyBasic } from "./docs";
|
|
4
5
|
|
|
5
|
-
type TypographyStoryArgs = Pick<
|
|
6
|
-
React.ComponentProps<typeof Typography>,
|
|
7
|
-
"transform"
|
|
8
|
-
>;
|
|
6
|
+
type TypographyStoryArgs = Pick<ComponentProps<typeof Typography>, "transform">;
|
|
9
7
|
|
|
10
8
|
const meta = {
|
|
11
9
|
title: "Components/Text and Typography/Typography",
|
|
@@ -20,16 +18,12 @@ export default meta;
|
|
|
20
18
|
|
|
21
19
|
type Story = StoryObj<TypographyStoryArgs>;
|
|
22
20
|
|
|
23
|
-
const BasicTemplate = (args: Story["args"]) => (
|
|
24
|
-
<Typography transform={args?.transform}>Some type here</Typography>
|
|
25
|
-
);
|
|
26
|
-
|
|
27
21
|
export const Basic: Story = {
|
|
28
|
-
render:
|
|
22
|
+
render: TypographyBasic,
|
|
29
23
|
};
|
|
30
24
|
|
|
31
25
|
export const Transform: Story = {
|
|
32
|
-
render:
|
|
26
|
+
render: TypographyBasic,
|
|
33
27
|
args: {
|
|
34
28
|
transform: "uppercase",
|
|
35
29
|
},
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
import { Typography } from "@jobber/components-native";
|
|
4
|
+
|
|
5
|
+
type TypographyStoryArgs = Pick<ComponentProps<typeof Typography>, "transform">;
|
|
6
|
+
|
|
7
|
+
export function TypographyBasic(props: Partial<TypographyStoryArgs>) {
|
|
8
|
+
return <Typography transform={props.transform}>Some type here</Typography>;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TypographyBasic } from "./TypographyBasic";
|