@pagopa/io-app-design-system 1.4.0 → 1.5.1
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/README.md +10 -0
- package/lib/commonjs/components/alert/Alert.js +1 -1
- package/lib/commonjs/components/alert/Alert.js.map +1 -1
- package/lib/commonjs/components/banner/Banner.js +1 -1
- package/lib/commonjs/components/banner/Banner.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonExtendedOutline.js +1 -1
- package/lib/commonjs/components/buttons/ButtonExtendedOutline.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonLink.js +6 -6
- package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonOutline.js +10 -10
- package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonSolid.js +5 -5
- package/lib/commonjs/components/buttons/ButtonSolid.js.map +1 -1
- package/lib/commonjs/components/buttons/IconButton.js +4 -4
- package/lib/commonjs/components/buttons/IconButton.js.map +1 -1
- package/lib/commonjs/components/buttons/IconButtonContained.js +4 -4
- package/lib/commonjs/components/buttons/IconButtonContained.js.map +1 -1
- package/lib/commonjs/components/buttons/IconButtonSolid.js +5 -5
- package/lib/commonjs/components/buttons/IconButtonSolid.js.map +1 -1
- package/lib/commonjs/components/index.js +11 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/layout/BlockButtons.js +82 -0
- package/lib/commonjs/components/layout/BlockButtons.js.map +1 -0
- package/lib/commonjs/components/layout/FooterWithButtons.js +41 -0
- package/lib/commonjs/components/layout/FooterWithButtons.js.map +1 -0
- package/lib/commonjs/components/layout/index.js +11 -0
- package/lib/commonjs/components/layout/index.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemAction.js +1 -1
- package/lib/commonjs/components/listitems/ListItemAction.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemCheckbox.js +1 -1
- package/lib/commonjs/components/listitems/ListItemCheckbox.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemIDP.js +1 -1
- package/lib/commonjs/components/listitems/ListItemIDP.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js +1 -1
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNav.js +1 -1
- package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNavAlert.js +1 -1
- package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemRadio.js +1 -1
- package/lib/commonjs/components/listitems/ListItemRadio.js.map +1 -1
- package/lib/commonjs/components/listitems/hooks/useListItemSpringAnimation.js +1 -1
- package/lib/commonjs/components/listitems/hooks/useListItemSpringAnimation.js.map +1 -1
- package/lib/commonjs/components/tabs/TabItem.js +1 -1
- package/lib/commonjs/components/tabs/TabItem.js.map +1 -1
- package/lib/commonjs/components/tabs/TabNavigation.js +2 -2
- package/lib/commonjs/components/tabs/TabNavigation.js.map +1 -1
- package/lib/commonjs/components/textInput/TextInputBase.js +5 -5
- package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -1
- package/lib/commonjs/components/textInput/TextInputPassword.js +1 -1
- package/lib/commonjs/components/textInput/TextInputPassword.js.map +1 -1
- package/lib/commonjs/components/textInput/TextInputValidation.js +2 -2
- package/lib/commonjs/components/textInput/TextInputValidation.js.map +1 -1
- package/lib/commonjs/stories/ButtonDS.stories.js +34 -0
- package/lib/commonjs/stories/ButtonDS.stories.js.map +1 -0
- package/lib/commonjs/stories/H1.stories.js +33 -0
- package/lib/commonjs/stories/H1.stories.js.map +1 -0
- package/lib/commonjs/stories/H2.stories.js +33 -0
- package/lib/commonjs/stories/H2.stories.js.map +1 -0
- package/lib/commonjs/stories/H3.stories.js +33 -0
- package/lib/commonjs/stories/H3.stories.js.map +1 -0
- package/lib/commonjs/stories/H4.stories.js +33 -0
- package/lib/commonjs/stories/H4.stories.js.map +1 -0
- package/lib/commonjs/stories/H5.stories.js +33 -0
- package/lib/commonjs/stories/H5.stories.js.map +1 -0
- package/lib/commonjs/stories/H6.stories.js +33 -0
- package/lib/commonjs/stories/H6.stories.js.map +1 -0
- package/lib/commonjs/stories/Label.stories.js +33 -0
- package/lib/commonjs/stories/Label.stories.js.map +1 -0
- package/lib/commonjs/stories/LabelSmall.stories.js +33 -0
- package/lib/commonjs/stories/LabelSmall.stories.js.map +1 -0
- package/lib/commonjs/stories/Link.stories.js +33 -0
- package/lib/commonjs/stories/Link.stories.js.map +1 -0
- package/lib/commonjs/stories/Monospace.stories.js +33 -0
- package/lib/commonjs/stories/Monospace.stories.js.map +1 -0
- package/lib/commonjs/utils/fonts.js +13 -4
- package/lib/commonjs/utils/fonts.js.map +1 -1
- package/lib/module/components/alert/Alert.js +1 -1
- package/lib/module/components/alert/Alert.js.map +1 -1
- package/lib/module/components/banner/Banner.js +1 -1
- package/lib/module/components/banner/Banner.js.map +1 -1
- package/lib/module/components/buttons/ButtonExtendedOutline.js +1 -1
- package/lib/module/components/buttons/ButtonExtendedOutline.js.map +1 -1
- package/lib/module/components/buttons/ButtonLink.js +6 -6
- package/lib/module/components/buttons/ButtonLink.js.map +1 -1
- package/lib/module/components/buttons/ButtonOutline.js +10 -10
- package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/module/components/buttons/ButtonSolid.js +5 -5
- package/lib/module/components/buttons/ButtonSolid.js.map +1 -1
- package/lib/module/components/buttons/IconButton.js +4 -4
- package/lib/module/components/buttons/IconButton.js.map +1 -1
- package/lib/module/components/buttons/IconButtonContained.js +4 -4
- package/lib/module/components/buttons/IconButtonContained.js.map +1 -1
- package/lib/module/components/buttons/IconButtonSolid.js +5 -5
- package/lib/module/components/buttons/IconButtonSolid.js.map +1 -1
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/layout/BlockButtons.js +73 -0
- package/lib/module/components/layout/BlockButtons.js.map +1 -0
- package/lib/module/components/layout/FooterWithButtons.js +32 -0
- package/lib/module/components/layout/FooterWithButtons.js.map +1 -0
- package/lib/module/components/layout/index.js +1 -0
- package/lib/module/components/layout/index.js.map +1 -1
- package/lib/module/components/listitems/ListItemAction.js +1 -1
- package/lib/module/components/listitems/ListItemAction.js.map +1 -1
- package/lib/module/components/listitems/ListItemCheckbox.js +1 -1
- package/lib/module/components/listitems/ListItemCheckbox.js.map +1 -1
- package/lib/module/components/listitems/ListItemIDP.js +1 -1
- package/lib/module/components/listitems/ListItemIDP.js.map +1 -1
- package/lib/module/components/listitems/ListItemInfoCopy.js +1 -1
- package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/module/components/listitems/ListItemNav.js +1 -1
- package/lib/module/components/listitems/ListItemNav.js.map +1 -1
- package/lib/module/components/listitems/ListItemNavAlert.js +1 -1
- package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/module/components/listitems/ListItemRadio.js +1 -1
- package/lib/module/components/listitems/ListItemRadio.js.map +1 -1
- package/lib/module/components/listitems/hooks/useListItemSpringAnimation.js +1 -1
- package/lib/module/components/listitems/hooks/useListItemSpringAnimation.js.map +1 -1
- package/lib/module/components/tabs/TabItem.js +1 -1
- package/lib/module/components/tabs/TabItem.js.map +1 -1
- package/lib/module/components/tabs/TabNavigation.js +2 -2
- package/lib/module/components/tabs/TabNavigation.js.map +1 -1
- package/lib/module/components/textInput/TextInputBase.js +5 -5
- package/lib/module/components/textInput/TextInputBase.js.map +1 -1
- package/lib/module/components/textInput/TextInputPassword.js +1 -1
- package/lib/module/components/textInput/TextInputPassword.js.map +1 -1
- package/lib/module/components/textInput/TextInputValidation.js +2 -2
- package/lib/module/components/textInput/TextInputValidation.js.map +1 -1
- package/lib/module/stories/ButtonDS.stories.js +27 -0
- package/lib/module/stories/ButtonDS.stories.js.map +1 -0
- package/lib/module/stories/H1.stories.js +26 -0
- package/lib/module/stories/H1.stories.js.map +1 -0
- package/lib/module/stories/H2.stories.js +26 -0
- package/lib/module/stories/H2.stories.js.map +1 -0
- package/lib/module/stories/H3.stories.js +26 -0
- package/lib/module/stories/H3.stories.js.map +1 -0
- package/lib/module/stories/H4.stories.js +26 -0
- package/lib/module/stories/H4.stories.js.map +1 -0
- package/lib/module/stories/H5.stories.js +26 -0
- package/lib/module/stories/H5.stories.js.map +1 -0
- package/lib/module/stories/H6.stories.js +26 -0
- package/lib/module/stories/H6.stories.js.map +1 -0
- package/lib/module/stories/Label.stories.js +26 -0
- package/lib/module/stories/Label.stories.js.map +1 -0
- package/lib/module/stories/LabelSmall.stories.js +26 -0
- package/lib/module/stories/LabelSmall.stories.js.map +1 -0
- package/lib/module/stories/Link.stories.js +26 -0
- package/lib/module/stories/Link.stories.js.map +1 -0
- package/lib/module/stories/Monospace.stories.js +26 -0
- package/lib/module/stories/Monospace.stories.js.map +1 -0
- package/lib/module/utils/fonts.js +13 -4
- package/lib/module/utils/fonts.js.map +1 -1
- package/lib/typescript/components/buttons/ButtonSolid.d.ts +16 -0
- package/lib/typescript/components/buttons/ButtonSolid.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +1 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/components/layout/BlockButtons.d.ts +53 -0
- package/lib/typescript/components/layout/BlockButtons.d.ts.map +1 -0
- package/lib/typescript/components/layout/FooterWithButtons.d.ts +9 -0
- package/lib/typescript/components/layout/FooterWithButtons.d.ts.map +1 -0
- package/lib/typescript/components/layout/index.d.ts +1 -0
- package/lib/typescript/components/layout/index.d.ts.map +1 -1
- package/lib/typescript/components/textInput/TextInputBase.d.ts.map +1 -1
- package/lib/typescript/stories/ButtonDS.stories.d.ts +14 -0
- package/lib/typescript/stories/ButtonDS.stories.d.ts.map +1 -0
- package/lib/typescript/stories/H1.stories.d.ts +19 -0
- package/lib/typescript/stories/H1.stories.d.ts.map +1 -0
- package/lib/typescript/stories/H2.stories.d.ts +19 -0
- package/lib/typescript/stories/H2.stories.d.ts.map +1 -0
- package/lib/typescript/stories/H3.stories.d.ts +19 -0
- package/lib/typescript/stories/H3.stories.d.ts.map +1 -0
- package/lib/typescript/stories/H4.stories.d.ts +19 -0
- package/lib/typescript/stories/H4.stories.d.ts.map +1 -0
- package/lib/typescript/stories/H5.stories.d.ts +27 -0
- package/lib/typescript/stories/H5.stories.d.ts.map +1 -0
- package/lib/typescript/stories/H6.stories.d.ts +19 -0
- package/lib/typescript/stories/H6.stories.d.ts.map +1 -0
- package/lib/typescript/stories/Label.stories.d.ts +19 -0
- package/lib/typescript/stories/Label.stories.d.ts.map +1 -0
- package/lib/typescript/stories/LabelSmall.stories.d.ts +21 -0
- package/lib/typescript/stories/LabelSmall.stories.d.ts.map +1 -0
- package/lib/typescript/stories/Link.stories.d.ts +21 -0
- package/lib/typescript/stories/Link.stories.d.ts.map +1 -0
- package/lib/typescript/stories/Monospace.stories.d.ts +19 -0
- package/lib/typescript/stories/Monospace.stories.d.ts.map +1 -0
- package/lib/typescript/utils/fonts.d.ts.map +1 -1
- package/package.json +25 -4
- package/src/components/buttons/ButtonSolid.tsx +16 -0
- package/src/components/index.tsx +1 -0
- package/src/components/layout/BlockButtons.tsx +142 -0
- package/src/components/layout/FooterWithButtons.tsx +37 -0
- package/src/components/layout/index.tsx +1 -0
- package/src/components/textInput/TextInputBase.tsx +2 -2
- package/src/stories/ButtonDS.stories.ts +31 -0
- package/src/stories/H1.stories.ts +28 -0
- package/src/stories/H2.stories.ts +28 -0
- package/src/stories/H3.stories.ts +28 -0
- package/src/stories/H4.stories.ts +28 -0
- package/src/stories/H5.stories.ts +28 -0
- package/src/stories/H6.stories.ts +28 -0
- package/src/stories/Label.stories.ts +28 -0
- package/src/stories/LabelSmall.stories.ts +28 -0
- package/src/stories/Link.stories.ts +28 -0
- package/src/stories/Monospace.stories.ts +28 -0
- package/src/utils/fonts.ts +12 -5
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").FC<Omit<import("react-native").TextProps & import("react").RefAttributes<import("react-native").Text>, "style"> & import("../components").TypographyProps<"Regular" | "SemiBold" | "Bold", "grey-50" | "grey-100" | "grey-300" | "grey-450" | "grey-650" | "grey-850" | "black" | "blueIO-850" | "blueIO-600" | "blueIO-500" | "blueIO-450" | "blueIO-200" | "blueIO-150" | "blueIO-100" | "blueIO-50" | "hanPurple-850" | "hanPurple-500" | "hanPurple-250" | "hanPurple-100" | "hanPurple-50" | "turquoise-850" | "turquoise-500" | "turquoise-450" | "turquoise-150" | "turquoise-100" | "turquoise-50" | "error-850" | "error-600" | "error-500" | "error-400" | "error-100" | "warning-850" | "warning-700" | "warning-500" | "warning-400" | "warning-100" | "success-850" | "success-700" | "success-500" | "success-400" | "success-100" | "info-850" | "info-700" | "info-500" | "info-400" | "info-100" | "cobalt" | "blueItalia-850" | "blueItalia-600" | "blueItalia-500" | "blueItalia-100" | "blueItalia-50" | "blue-600" | "blue-50" | "greyUltraLight" | "greyLight" | "bluegreyLight" | "grey" | "milderGray" | "noCieButton" | "blueUltraLight" | "aqua" | "aquaUltraLight" | "antiqueFuchsia" | "yellow" | "orange" | "green" | "greenLight" | ("white" | "grey-200" | "grey-700" | "bluegrey" | "bluegreyDark" | "blue" | "red")> & {
|
|
6
|
+
style?: import("react-native").Falsy | Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily"> | import("react-native").RegisteredStyle<Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily">> | import("react-native").RecursiveArray<import("react-native").Falsy | Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily"> | import("react-native").RegisteredStyle<Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily">>>;
|
|
7
|
+
} & {
|
|
8
|
+
fontSize?: ("small" | "regular") | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: string;
|
|
12
|
+
actions: {
|
|
13
|
+
argTypesRegex: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
tags: string[];
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof meta>;
|
|
20
|
+
export declare const Primary: Story;
|
|
21
|
+
//# sourceMappingURL=LabelSmall.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LabelSmall.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/LabelSmall.stories.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMvD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;CAUyB,CAAC;AAEpC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").FunctionComponent<Omit<import("react-native").TextProps & import("react").RefAttributes<import("react-native").Text>, "style"> & import("../components").TypographyProps<"SemiBold" | "Bold", "white" | "grey-50" | "grey-100" | "grey-200" | "grey-300" | "grey-450" | "grey-650" | "grey-700" | "grey-850" | "black" | "blueIO-850" | "blueIO-600" | "blueIO-500" | "blueIO-450" | "blueIO-200" | "blueIO-150" | "blueIO-100" | "blueIO-50" | "hanPurple-850" | "hanPurple-500" | "hanPurple-250" | "hanPurple-100" | "hanPurple-50" | "turquoise-850" | "turquoise-500" | "turquoise-450" | "turquoise-150" | "turquoise-100" | "turquoise-50" | "error-850" | "error-600" | "error-500" | "error-400" | "error-100" | "warning-850" | "warning-700" | "warning-500" | "warning-400" | "warning-100" | "success-850" | "success-700" | "success-500" | "success-400" | "success-100" | "info-850" | "info-700" | "info-500" | "info-400" | "info-100" | "cobalt" | "blueItalia-850" | "blueItalia-600" | "blueItalia-500" | "blueItalia-100" | "blueItalia-50" | "blue-600" | "blue-50" | "greyUltraLight" | "greyLight" | "bluegreyLight" | "grey" | "milderGray" | "bluegrey" | "bluegreyDark" | "noCieButton" | "blue" | "blueUltraLight" | "aqua" | "aquaUltraLight" | "antiqueFuchsia" | "yellow" | "orange" | "red" | "green" | "greenLight"> & {
|
|
6
|
+
style?: import("react-native").Falsy | Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily"> | import("react-native").RegisteredStyle<Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily">> | import("react-native").RecursiveArray<import("react-native").Falsy | Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily"> | import("react-native").RegisteredStyle<Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily">>>;
|
|
7
|
+
} & {
|
|
8
|
+
fontSize?: ("small" | "regular") | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: string;
|
|
12
|
+
actions: {
|
|
13
|
+
argTypesRegex: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
tags: string[];
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof meta>;
|
|
20
|
+
export declare const Primary: Story;
|
|
21
|
+
//# sourceMappingURL=Link.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Link.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/Link.stories.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMvD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;CAUmB,CAAC;AAE9B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").FC<Omit<import("react-native").TextProps & import("react").RefAttributes<import("react-native").Text>, "style"> & import("../components").TypographyProps<"Regular" | "SemiBold" | "Bold", "bluegrey" | "bluegreyDark"> & {
|
|
6
|
+
style?: import("react-native").Falsy | Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily"> | import("react-native").RegisteredStyle<Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily">> | import("react-native").RecursiveArray<import("react-native").Falsy | Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily"> | import("react-native").RegisteredStyle<Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily">>>;
|
|
7
|
+
}>;
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
actions: {
|
|
11
|
+
argTypesRegex: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
tags: string[];
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof meta>;
|
|
18
|
+
export declare const Primary: Story;
|
|
19
|
+
//# sourceMappingURL=Monospace.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Monospace.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/Monospace.stories.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMvD,QAAA,MAAM,IAAI;;;;;;;;;;;;CAUwB,CAAC;AAEnC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../src/utils/fonts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,KAAK,CAAC;AAE9C,QAAA,MAAM,OAAO,mDAAoD,CAAC;AAClE,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpD,QAAA,MAAM,YAAY,uCAAwC,CAAC;AAC3D,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D;;GAEG;AACH,QAAA,MAAM,KAAK;;;;
|
|
1
|
+
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../src/utils/fonts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,KAAK,CAAC;AAE9C,QAAA,MAAM,OAAO,mDAAoD,CAAC;AAClE,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpD,QAAA,MAAM,YAAY,uCAAwC,CAAC;AAC3D,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D;;GAEG;AACH,QAAA,MAAM,KAAK;;;;CAgBV,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,YAAY,EAAE,eAAe,CAK7D,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,KAAK,CAAC;AAC5C,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,WAAW,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,YAAY,EAAE,eAAe,CAKhE,CAAC;AAEF,oBAAY,SAAS;IACnB,QAAQ,WAAW;IACnB,QAAQ,WAAW;CACpB;AAED,KAAK,eAAe,GAAG;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,SACvB,UAAU,WACP,YAAY,aACX,OAAO,KAChB,MAMC,CAAC;AAEL;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,YACtB,YAAY,GAAG,SAAS,aACtB,OAAO,GAAG,SAAS,SACvB,UAAU,GAAG,SAAS,KAC3B,eAgBC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pagopa/io-app-design-system",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "test",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -34,7 +34,9 @@
|
|
|
34
34
|
"prepack": "bob build",
|
|
35
35
|
"release": "release-it",
|
|
36
36
|
"example": "yarn --cwd example",
|
|
37
|
-
"bootstrap": "yarn example && yarn install"
|
|
37
|
+
"bootstrap": "yarn example && yarn install",
|
|
38
|
+
"storybook": "storybook dev -p 6006",
|
|
39
|
+
"build-storybook": "storybook build"
|
|
38
40
|
},
|
|
39
41
|
"keywords": [
|
|
40
42
|
"react-native",
|
|
@@ -49,13 +51,25 @@
|
|
|
49
51
|
},
|
|
50
52
|
"homepage": "https://github.com/pagopa/io-app-design-system#readme",
|
|
51
53
|
"devDependencies": {
|
|
54
|
+
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
|
|
52
55
|
"@commitlint/config-conventional": "^17.0.2",
|
|
53
56
|
"@evilmartians/lefthook": "^1.2.2",
|
|
54
57
|
"@react-native-community/eslint-config": "^3.0.2",
|
|
55
58
|
"@release-it/conventional-changelog": "^5.0.0",
|
|
59
|
+
"@storybook/addon-essentials": "^7.4.0",
|
|
60
|
+
"@storybook/addon-interactions": "^7.4.0",
|
|
61
|
+
"@storybook/addon-links": "^7.4.0",
|
|
62
|
+
"@storybook/addon-onboarding": "^1.0.8",
|
|
63
|
+
"@storybook/addon-react-native-web": "^0.0.21",
|
|
64
|
+
"@storybook/blocks": "^7.4.0",
|
|
65
|
+
"@storybook/react": "^7.4.0",
|
|
66
|
+
"@storybook/react-webpack5": "^7.4.0",
|
|
67
|
+
"@storybook/testing-library": "^0.2.0",
|
|
56
68
|
"@types/jest": "^28.1.2",
|
|
57
69
|
"@types/react": "~17.0.38",
|
|
58
70
|
"@types/react-native": "0.70.0",
|
|
71
|
+
"babel-loader": "^9.1.3",
|
|
72
|
+
"babel-plugin-react-native-web": "^0.19.8",
|
|
59
73
|
"commitlint": "^17.0.2",
|
|
60
74
|
"del-cli": "^5.0.0",
|
|
61
75
|
"eslint": "^8.4.1",
|
|
@@ -63,15 +77,21 @@
|
|
|
63
77
|
"eslint-plugin-functional": "^5.0.8",
|
|
64
78
|
"eslint-plugin-import": "^2.27.5",
|
|
65
79
|
"eslint-plugin-prettier": "^4.0.0",
|
|
80
|
+
"eslint-plugin-storybook": "^0.6.13",
|
|
66
81
|
"jest": "^29.5.0",
|
|
82
|
+
"metro-react-native-babel-preset": "^0.77.0",
|
|
67
83
|
"pod-install": "^0.1.0",
|
|
68
84
|
"prettier": "^2.0.5",
|
|
69
85
|
"react": "18.2.0",
|
|
86
|
+
"react-dom": "^18.2.0",
|
|
70
87
|
"react-native": "0.71.8",
|
|
71
88
|
"react-native-builder-bob": "^0.20.0",
|
|
72
89
|
"react-native-i18n": "^2.0.15",
|
|
90
|
+
"react-native-web": "^0.18.12",
|
|
91
|
+
"react-native-web-linear-gradient": "^1.1.2",
|
|
73
92
|
"react-test-renderer": "^18.2.0",
|
|
74
93
|
"release-it": "^15.0.0",
|
|
94
|
+
"storybook": "^7.4.0",
|
|
75
95
|
"typescript": "^4.9.5"
|
|
76
96
|
},
|
|
77
97
|
"resolutions": {
|
|
@@ -80,12 +100,12 @@
|
|
|
80
100
|
"peerDependencies": {
|
|
81
101
|
"react": "*",
|
|
82
102
|
"react-native": "*",
|
|
103
|
+
"react-native-gesture-handler": "*",
|
|
83
104
|
"react-native-haptic-feedback": "*",
|
|
84
105
|
"react-native-linear-gradient": "*",
|
|
85
106
|
"react-native-reanimated": "*",
|
|
86
|
-
"react-native-svg": "*",
|
|
87
107
|
"react-native-safe-area-context": "*",
|
|
88
|
-
"react-native-
|
|
108
|
+
"react-native-svg": "*"
|
|
89
109
|
},
|
|
90
110
|
"engines": {
|
|
91
111
|
"node": ">= 16.0.0"
|
|
@@ -149,6 +169,7 @@
|
|
|
149
169
|
]
|
|
150
170
|
},
|
|
151
171
|
"dependencies": {
|
|
172
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
152
173
|
"@expo/vector-icons": "^13.0.0",
|
|
153
174
|
"@pagopa/ts-commons": "^12.0.0",
|
|
154
175
|
"@testing-library/jest-native": "^5.4.2",
|
|
@@ -39,12 +39,28 @@ const styles = StyleSheet.create({
|
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
export type ButtonSolidProps = WithTestID<{
|
|
42
|
+
/**
|
|
43
|
+
* @default primary
|
|
44
|
+
*/
|
|
42
45
|
color?: ButtonSolidColor;
|
|
43
46
|
label: string;
|
|
47
|
+
/**
|
|
48
|
+
* Renders a small variant of the button. This property applies to the legacy look only
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
44
51
|
small?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
45
55
|
fullWidth?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
46
59
|
disabled?: boolean;
|
|
47
60
|
icon?: IOIcons;
|
|
61
|
+
/**
|
|
62
|
+
* @default start
|
|
63
|
+
*/
|
|
48
64
|
iconPosition?: "start" | "end";
|
|
49
65
|
accessibilityLabel: string;
|
|
50
66
|
accessibilityHint?: string;
|
package/src/components/index.tsx
CHANGED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { View, StyleSheet } from "react-native";
|
|
3
|
+
import { HSpacer } from "../spacer/Spacer";
|
|
4
|
+
import { ButtonOutline, ButtonSolid, ButtonSolidProps } from "../buttons";
|
|
5
|
+
import { IOStyles } from "../../core";
|
|
6
|
+
|
|
7
|
+
const styles = StyleSheet.create({
|
|
8
|
+
button: {
|
|
9
|
+
alignContent: "center",
|
|
10
|
+
justifyContent: "center",
|
|
11
|
+
flex: 1
|
|
12
|
+
},
|
|
13
|
+
buttonTwoThirds: {
|
|
14
|
+
alignContent: "center",
|
|
15
|
+
flex: 2
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
type CommonProps = Readonly<{
|
|
20
|
+
primary: BlockButtonProps;
|
|
21
|
+
accessible?: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
|
|
24
|
+
export type BlockButtonProps = {
|
|
25
|
+
type: "Solid" | "Outline";
|
|
26
|
+
buttonProps: ButtonSolidProps;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* | single button |
|
|
31
|
+
*/
|
|
32
|
+
export interface SingleButton extends CommonProps {
|
|
33
|
+
type: "SingleButton";
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* | left | right |
|
|
38
|
+
*/
|
|
39
|
+
export interface TwoButtonsInlineHalf extends CommonProps {
|
|
40
|
+
type: "TwoButtonsInlineHalf";
|
|
41
|
+
secondary: BlockButtonProps;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* | left | right |
|
|
46
|
+
*/
|
|
47
|
+
interface TwoButtonsInlineThird extends CommonProps {
|
|
48
|
+
type: "TwoButtonsInlineThird";
|
|
49
|
+
secondary: BlockButtonProps;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* | left | right |
|
|
54
|
+
*/
|
|
55
|
+
interface TwoButtonsInlineThirdInverted extends CommonProps {
|
|
56
|
+
type: "TwoButtonsInlineThirdInverted";
|
|
57
|
+
secondary: BlockButtonProps;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* | left | mid | right |
|
|
62
|
+
*/
|
|
63
|
+
interface ThreeButtonsInLine extends CommonProps {
|
|
64
|
+
type: "ThreeButtonsInLine";
|
|
65
|
+
secondary: BlockButtonProps;
|
|
66
|
+
third: BlockButtonProps;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
type Props =
|
|
70
|
+
| SingleButton
|
|
71
|
+
| TwoButtonsInlineHalf
|
|
72
|
+
| TwoButtonsInlineThird
|
|
73
|
+
| TwoButtonsInlineThirdInverted
|
|
74
|
+
| ThreeButtonsInLine;
|
|
75
|
+
|
|
76
|
+
export type BlockButtonsProps = Props;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Implements a component that show buttons on a line on 1, 2 or 3 buttons
|
|
80
|
+
*/
|
|
81
|
+
export const BlockButtons = (props: Props) => {
|
|
82
|
+
const renderRightButton = () => {
|
|
83
|
+
if (props.type === "SingleButton") {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const secondaryButtonStyle =
|
|
88
|
+
props.type === "TwoButtonsInlineThird"
|
|
89
|
+
? styles.buttonTwoThirds
|
|
90
|
+
: styles.button;
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<React.Fragment>
|
|
94
|
+
<HSpacer size={16} />
|
|
95
|
+
{renderButton(props.secondary, secondaryButtonStyle)}
|
|
96
|
+
</React.Fragment>
|
|
97
|
+
);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const renderMidButton = () => {
|
|
101
|
+
if (props.type !== "ThreeButtonsInLine") {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return (
|
|
106
|
+
<React.Fragment>
|
|
107
|
+
<HSpacer size={16} />
|
|
108
|
+
{renderButton(props.third, styles.button)}
|
|
109
|
+
</React.Fragment>
|
|
110
|
+
);
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const renderLeftButton = () => {
|
|
114
|
+
const primaryButtonStyle =
|
|
115
|
+
props.type === "TwoButtonsInlineThirdInverted"
|
|
116
|
+
? styles.buttonTwoThirds
|
|
117
|
+
: styles.button;
|
|
118
|
+
|
|
119
|
+
return renderButton(props.primary, primaryButtonStyle);
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
const renderButton = (
|
|
123
|
+
props: BlockButtonProps,
|
|
124
|
+
style: React.ComponentProps<typeof View>["style"]
|
|
125
|
+
) => (
|
|
126
|
+
<View style={style}>
|
|
127
|
+
{props.type === "Solid" ? (
|
|
128
|
+
<ButtonSolid {...props.buttonProps} />
|
|
129
|
+
) : (
|
|
130
|
+
<ButtonOutline {...props.buttonProps} />
|
|
131
|
+
)}
|
|
132
|
+
</View>
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
return (
|
|
136
|
+
<View style={{ ...IOStyles.flex, ...IOStyles.row }}>
|
|
137
|
+
{renderLeftButton()}
|
|
138
|
+
{renderMidButton()}
|
|
139
|
+
{renderRightButton()}
|
|
140
|
+
</View>
|
|
141
|
+
);
|
|
142
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
import { StyleSheet, View } from "react-native";
|
|
4
|
+
import { IOStyles } from "../../core";
|
|
5
|
+
import { BlockButtons, BlockButtonsProps } from "./BlockButtons";
|
|
6
|
+
|
|
7
|
+
// TODO: Refactor with an unique component like `FooterTopShadow` after bonus vacanze
|
|
8
|
+
const styles = StyleSheet.create({
|
|
9
|
+
container: {
|
|
10
|
+
overflow: "hidden",
|
|
11
|
+
width: "100%",
|
|
12
|
+
// This Magic number is an heritage of the app code-base, this component should be removed in favor of `GradientBottomAction`
|
|
13
|
+
marginTop: -50,
|
|
14
|
+
paddingTop: 50,
|
|
15
|
+
position: "absolute",
|
|
16
|
+
bottom: 0
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Implements a component that show buttons as sticky footer
|
|
22
|
+
* It can include 1, 2 or 3 buttons. If they are 2, they can have the inlineHalf or the inlineOneThird style
|
|
23
|
+
*/
|
|
24
|
+
export const FooterWithButtons = (props: BlockButtonsProps) => (
|
|
25
|
+
<View
|
|
26
|
+
style={styles.container}
|
|
27
|
+
accessible={props.accessible}
|
|
28
|
+
pointerEvents={"box-none"}
|
|
29
|
+
testID="FooterWithButtons"
|
|
30
|
+
>
|
|
31
|
+
<View style={IOStyles.footer}>
|
|
32
|
+
<BlockButtons {...props} />
|
|
33
|
+
</View>
|
|
34
|
+
</View>
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
export default FooterWithButtons;
|
|
@@ -19,6 +19,7 @@ import { HSpacer } from "../spacer";
|
|
|
19
19
|
import { LabelSmall } from "../typography";
|
|
20
20
|
import { InputType } from "../../utils/types";
|
|
21
21
|
import { getInputPropsByType } from "../../utils/textInput";
|
|
22
|
+
import { makeFontStyleObject } from "../../utils/fonts";
|
|
22
23
|
|
|
23
24
|
type InputStatus = "initial" | "focused" | "disabled" | "error";
|
|
24
25
|
|
|
@@ -57,11 +58,10 @@ const styles = StyleSheet.create({
|
|
|
57
58
|
},
|
|
58
59
|
textInputStyle: {
|
|
59
60
|
...IOStyles.flex,
|
|
61
|
+
...makeFontStyleObject("Regular", false, "ReadexPro"),
|
|
60
62
|
fontSize: 16,
|
|
61
63
|
marginTop: IOSpacingScale[2],
|
|
62
|
-
fontWeight: "400",
|
|
63
64
|
lineHeight: 24,
|
|
64
|
-
fontFamily: "Readex Pro",
|
|
65
65
|
height: "100%"
|
|
66
66
|
},
|
|
67
67
|
textInputLabelWrapper: {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { action } from "@storybook/addon-actions";
|
|
3
|
+
|
|
4
|
+
import { ButtonSolid } from "../components";
|
|
5
|
+
|
|
6
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
7
|
+
const meta = {
|
|
8
|
+
title: "Example/ButtonSolid",
|
|
9
|
+
component: ButtonSolid,
|
|
10
|
+
parameters: {
|
|
11
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
12
|
+
layout: "centered"
|
|
13
|
+
},
|
|
14
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
15
|
+
tags: ["autodocs"]
|
|
16
|
+
} satisfies Meta<typeof ButtonSolid>;
|
|
17
|
+
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof meta>;
|
|
20
|
+
|
|
21
|
+
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
22
|
+
export const Primary: Story = {
|
|
23
|
+
args: {
|
|
24
|
+
color: "primary",
|
|
25
|
+
accessibilityLabel: "Tap to trigger test alert",
|
|
26
|
+
label: "Primary button",
|
|
27
|
+
onPress: e => {
|
|
28
|
+
action("clicked")(e);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
import { Alert } from "react-native";
|
|
4
|
+
import { H1 } from "../components";
|
|
5
|
+
|
|
6
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
7
|
+
const meta = {
|
|
8
|
+
title: "Example/H1",
|
|
9
|
+
component: H1,
|
|
10
|
+
parameters: {
|
|
11
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
12
|
+
layout: "centered",
|
|
13
|
+
actions: { argTypesRegex: "^on.*" }
|
|
14
|
+
},
|
|
15
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
16
|
+
tags: ["autodocs"],
|
|
17
|
+
} satisfies Meta<typeof H1>;
|
|
18
|
+
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
|
|
22
|
+
export const Primary: Story = {
|
|
23
|
+
args: {
|
|
24
|
+
accessibilityLabel: "Tap to trigger test alert",
|
|
25
|
+
onPress: () => Alert.alert("Alert", "Action triggered"),
|
|
26
|
+
children: "Hello World"
|
|
27
|
+
}
|
|
28
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
import { Alert } from "react-native";
|
|
4
|
+
import { H2 } from "../components";
|
|
5
|
+
|
|
6
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
7
|
+
const meta = {
|
|
8
|
+
title: "Example/H2",
|
|
9
|
+
component: H2,
|
|
10
|
+
parameters: {
|
|
11
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
12
|
+
layout: "centered",
|
|
13
|
+
actions: { argTypesRegex: "^on.*" }
|
|
14
|
+
},
|
|
15
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
16
|
+
tags: ["autodocs"],
|
|
17
|
+
} satisfies Meta<typeof H2>;
|
|
18
|
+
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
|
|
22
|
+
export const Primary: Story = {
|
|
23
|
+
args: {
|
|
24
|
+
accessibilityLabel: "Tap to trigger test alert",
|
|
25
|
+
onPress: () => Alert.alert("Alert", "Action triggered"),
|
|
26
|
+
children: "Hello World"
|
|
27
|
+
}
|
|
28
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
import { Alert } from "react-native";
|
|
4
|
+
import { H3 } from "../components";
|
|
5
|
+
|
|
6
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
7
|
+
const meta = {
|
|
8
|
+
title: "Example/H3",
|
|
9
|
+
component: H3,
|
|
10
|
+
parameters: {
|
|
11
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
12
|
+
layout: "centered",
|
|
13
|
+
actions: { argTypesRegex: "^on.*" }
|
|
14
|
+
},
|
|
15
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
16
|
+
tags: ["autodocs"],
|
|
17
|
+
} satisfies Meta<typeof H3>;
|
|
18
|
+
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
|
|
22
|
+
export const Primary: Story = {
|
|
23
|
+
args: {
|
|
24
|
+
accessibilityLabel: "Tap to trigger test alert",
|
|
25
|
+
onPress: () => Alert.alert("Alert", "Action triggered"),
|
|
26
|
+
children: "Hello World"
|
|
27
|
+
}
|
|
28
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
import { Alert } from "react-native";
|
|
4
|
+
import { H4 } from "../components";
|
|
5
|
+
|
|
6
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
7
|
+
const meta = {
|
|
8
|
+
title: "Example/H4",
|
|
9
|
+
component: H4,
|
|
10
|
+
parameters: {
|
|
11
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
12
|
+
layout: "centered",
|
|
13
|
+
actions: { argTypesRegex: "^on.*" }
|
|
14
|
+
},
|
|
15
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
16
|
+
tags: ["autodocs"],
|
|
17
|
+
} satisfies Meta<typeof H4>;
|
|
18
|
+
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
|
|
22
|
+
export const Primary: Story = {
|
|
23
|
+
args: {
|
|
24
|
+
accessibilityLabel: "Tap to trigger test alert",
|
|
25
|
+
onPress: () => Alert.alert("Alert", "Action triggered"),
|
|
26
|
+
children: "Hello World"
|
|
27
|
+
}
|
|
28
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
import { Alert } from "react-native";
|
|
4
|
+
import { H5 } from "../components";
|
|
5
|
+
|
|
6
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
7
|
+
const meta = {
|
|
8
|
+
title: "Example/H5",
|
|
9
|
+
component: H5,
|
|
10
|
+
parameters: {
|
|
11
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
12
|
+
layout: "centered",
|
|
13
|
+
actions: { argTypesRegex: "^on.*" }
|
|
14
|
+
},
|
|
15
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
16
|
+
tags: ["autodocs"],
|
|
17
|
+
} satisfies Meta<typeof H5>;
|
|
18
|
+
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
|
|
22
|
+
export const Primary: Story = {
|
|
23
|
+
args: {
|
|
24
|
+
accessibilityLabel: "Tap to trigger test alert",
|
|
25
|
+
onPress: () => Alert.alert("Alert", "Action triggered"),
|
|
26
|
+
children: "Hello World"
|
|
27
|
+
}
|
|
28
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
import { Alert } from "react-native";
|
|
4
|
+
import { H6 } from "../components";
|
|
5
|
+
|
|
6
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
7
|
+
const meta = {
|
|
8
|
+
title: "Example/H6",
|
|
9
|
+
component: H6,
|
|
10
|
+
parameters: {
|
|
11
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
12
|
+
layout: "centered",
|
|
13
|
+
actions: { argTypesRegex: "^on.*" }
|
|
14
|
+
},
|
|
15
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
16
|
+
tags: ["autodocs"],
|
|
17
|
+
} satisfies Meta<typeof H6>;
|
|
18
|
+
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
|
|
22
|
+
export const Primary: Story = {
|
|
23
|
+
args: {
|
|
24
|
+
accessibilityLabel: "Tap to trigger test alert",
|
|
25
|
+
onPress: () => Alert.alert("Alert", "Action triggered"),
|
|
26
|
+
children: "Hello World"
|
|
27
|
+
}
|
|
28
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
import { Alert } from "react-native";
|
|
4
|
+
import { Label } from "../components";
|
|
5
|
+
|
|
6
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
7
|
+
const meta = {
|
|
8
|
+
title: "Example/Label",
|
|
9
|
+
component: Label,
|
|
10
|
+
parameters: {
|
|
11
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
12
|
+
layout: "centered",
|
|
13
|
+
actions: { argTypesRegex: "^on.*" }
|
|
14
|
+
},
|
|
15
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
16
|
+
tags: ["autodocs"],
|
|
17
|
+
} satisfies Meta<typeof Label>;
|
|
18
|
+
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
|
|
22
|
+
export const Primary: Story = {
|
|
23
|
+
args: {
|
|
24
|
+
accessibilityLabel: "Tap to trigger test alert",
|
|
25
|
+
onPress: () => Alert.alert("Alert", "Action triggered"),
|
|
26
|
+
children: "Hello World"
|
|
27
|
+
}
|
|
28
|
+
};
|