@pagopa/io-app-design-system 1.3.2 → 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 +11 -0
- package/lib/commonjs/components/accordion/AccordionItem.js +137 -0
- package/lib/commonjs/components/accordion/AccordionItem.js.map +1 -0
- package/lib/commonjs/components/accordion/index.js +4 -4
- package/lib/commonjs/components/accordion/index.js.map +1 -1
- 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/common/LogoPaymentWithFallback.js +49 -0
- package/lib/commonjs/components/common/LogoPaymentWithFallback.js.map +1 -0
- package/lib/commonjs/components/index.js +22 -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/ListItemTransaction.js +47 -29
- package/lib/commonjs/components/listitems/ListItemTransaction.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/{accordion/IOAccordion.js → textInput/TextInput.js} +5 -27
- package/lib/commonjs/components/textInput/TextInput.js.map +1 -0
- package/lib/commonjs/components/textInput/TextInputBase.js +233 -0
- package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -0
- package/lib/commonjs/components/textInput/TextInputPassword.js +36 -0
- package/lib/commonjs/components/textInput/TextInputPassword.js.map +1 -0
- package/lib/commonjs/components/textInput/TextInputValidation.js +57 -0
- package/lib/commonjs/components/textInput/TextInputValidation.js.map +1 -0
- package/lib/commonjs/components/textInput/index.js +39 -0
- package/lib/commonjs/components/textInput/index.js.map +1 -0
- package/lib/commonjs/core/IOAnimations.js +5 -0
- package/lib/commonjs/core/IOAnimations.js.map +1 -1
- package/lib/commonjs/core/IOShapes.js +3 -1
- package/lib/commonjs/core/IOShapes.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/accessibility.js +19 -0
- package/lib/commonjs/utils/accessibility.js.map +1 -0
- package/lib/commonjs/utils/fonts.js +13 -4
- package/lib/commonjs/utils/fonts.js.map +1 -1
- package/lib/commonjs/utils/object.js +16 -0
- package/lib/commonjs/utils/object.js.map +1 -0
- package/lib/commonjs/utils/textInput/index.js +24 -0
- package/lib/commonjs/utils/textInput/index.js.map +1 -0
- package/lib/commonjs/utils/url.js +14 -0
- package/lib/commonjs/utils/url.js.map +1 -0
- package/lib/module/components/accordion/AccordionItem.js +126 -0
- package/lib/module/components/accordion/AccordionItem.js.map +1 -0
- package/lib/module/components/accordion/index.js +1 -1
- package/lib/module/components/accordion/index.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/common/LogoPaymentWithFallback.js +40 -0
- package/lib/module/components/common/LogoPaymentWithFallback.js.map +1 -0
- package/lib/module/components/index.js +2 -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/ListItemTransaction.js +48 -30
- package/lib/module/components/listitems/ListItemTransaction.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/TextInput.js +4 -0
- package/lib/module/components/textInput/TextInput.js.map +1 -0
- package/lib/module/components/textInput/TextInputBase.js +225 -0
- package/lib/module/components/textInput/TextInputBase.js.map +1 -0
- package/lib/module/components/textInput/TextInputPassword.js +27 -0
- package/lib/module/components/textInput/TextInputPassword.js.map +1 -0
- package/lib/module/components/textInput/TextInputValidation.js +47 -0
- package/lib/module/components/textInput/TextInputValidation.js.map +1 -0
- package/lib/module/components/textInput/index.js +4 -0
- package/lib/module/components/textInput/index.js.map +1 -0
- package/lib/module/core/IOAnimations.js +5 -0
- package/lib/module/core/IOAnimations.js.map +1 -1
- package/lib/module/core/IOShapes.js +1 -0
- package/lib/module/core/IOShapes.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/accessibility.js +10 -0
- package/lib/module/utils/accessibility.js.map +1 -0
- package/lib/module/utils/fonts.js +13 -4
- package/lib/module/utils/fonts.js.map +1 -1
- package/lib/module/utils/object.js +7 -0
- package/lib/module/utils/object.js.map +1 -0
- package/lib/module/utils/textInput/index.js +17 -0
- package/lib/module/utils/textInput/index.js.map +1 -0
- package/lib/module/utils/url.js +7 -0
- package/lib/module/utils/url.js.map +1 -0
- package/lib/typescript/components/accordion/AccordionItem.d.ts +14 -0
- package/lib/typescript/components/accordion/AccordionItem.d.ts.map +1 -0
- package/lib/typescript/components/accordion/index.d.ts +1 -1
- package/lib/typescript/components/accordion/index.d.ts.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/common/LogoPaymentWithFallback.d.ts +27 -0
- package/lib/typescript/components/common/LogoPaymentWithFallback.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +2 -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/listitems/ListItemTransaction.d.ts +13 -5
- package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
- package/lib/typescript/components/textInput/TextInput.d.ts +6 -0
- package/lib/typescript/components/textInput/TextInput.d.ts.map +1 -0
- package/lib/typescript/components/textInput/TextInputBase.d.ts +28 -0
- package/lib/typescript/components/textInput/TextInputBase.d.ts.map +1 -0
- package/lib/typescript/components/textInput/TextInputPassword.d.ts +6 -0
- package/lib/typescript/components/textInput/TextInputPassword.d.ts.map +1 -0
- package/lib/typescript/components/textInput/TextInputValidation.d.ts +9 -0
- package/lib/typescript/components/textInput/TextInputValidation.d.ts.map +1 -0
- package/lib/typescript/components/textInput/index.d.ts +4 -0
- package/lib/typescript/components/textInput/index.d.ts.map +1 -0
- package/lib/typescript/core/IOAnimations.d.ts +5 -0
- package/lib/typescript/core/IOAnimations.d.ts.map +1 -1
- package/lib/typescript/core/IOShapes.d.ts +1 -0
- package/lib/typescript/core/IOShapes.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/accessibility.d.ts +6 -0
- package/lib/typescript/utils/accessibility.d.ts.map +1 -0
- package/lib/typescript/utils/fonts.d.ts.map +1 -1
- package/lib/typescript/utils/object.d.ts +5 -0
- package/lib/typescript/utils/object.d.ts.map +1 -0
- package/lib/typescript/utils/textInput/index.d.ts +9 -0
- package/lib/typescript/utils/textInput/index.d.ts.map +1 -0
- package/lib/typescript/utils/types.d.ts +1 -0
- package/lib/typescript/utils/types.d.ts.map +1 -1
- package/lib/typescript/utils/url.d.ts +8 -0
- package/lib/typescript/utils/url.d.ts.map +1 -0
- package/package.json +25 -4
- package/src/components/accordion/AccordionItem.tsx +165 -0
- package/src/components/accordion/index.tsx +1 -1
- package/src/components/buttons/ButtonSolid.tsx +16 -0
- package/src/components/common/LogoPaymentWithFallback.tsx +60 -0
- package/src/components/index.tsx +2 -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/listitems/ListItemTransaction.tsx +86 -39
- package/src/components/textInput/TextInput.tsx +15 -0
- package/src/components/textInput/TextInputBase.tsx +327 -0
- package/src/components/textInput/TextInputPassword.tsx +36 -0
- package/src/components/textInput/TextInputValidation.tsx +71 -0
- package/src/components/textInput/index.tsx +3 -0
- package/src/core/IOAnimations.ts +5 -0
- package/src/core/IOShapes.ts +1 -0
- 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/accessibility.ts +17 -0
- package/src/utils/fonts.ts +12 -5
- package/src/utils/object.ts +12 -0
- package/src/utils/textInput/index.ts +29 -0
- package/src/utils/types.ts +2 -0
- package/src/utils/url.ts +9 -0
- package/lib/commonjs/components/accordion/IOAccordion.js.map +0 -1
- package/lib/module/components/accordion/IOAccordion.js +0 -26
- package/lib/module/components/accordion/IOAccordion.js.map +0 -1
- package/lib/typescript/components/accordion/IOAccordion.d.ts +0 -13
- package/lib/typescript/components/accordion/IOAccordion.d.ts.map +0 -1
- package/src/components/accordion/IOAccordion.tsx +0 -35
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
import { Alert } from "react-native";
|
|
4
|
+
import { LabelSmall } 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/LabelSmall",
|
|
9
|
+
component: LabelSmall,
|
|
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 LabelSmall>;
|
|
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 { Link } 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/Link",
|
|
9
|
+
component: Link,
|
|
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 Link>;
|
|
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 { Monospace } 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/Monospace",
|
|
9
|
+
component: Monospace,
|
|
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 Monospace>;
|
|
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,17 @@
|
|
|
1
|
+
import { pipe } from "fp-ts/lib/function";
|
|
2
|
+
import * as O from "fp-ts/lib/Option";
|
|
3
|
+
import I18n from "i18n-js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* This function is used to get the text that will be read by the screen reader
|
|
7
|
+
* with the correct minus symbol pronunciation.
|
|
8
|
+
*/
|
|
9
|
+
export const getAccessibleAmountText = (amount?: string) =>
|
|
10
|
+
pipe(
|
|
11
|
+
amount,
|
|
12
|
+
O.fromNullable,
|
|
13
|
+
O.map(amount =>
|
|
14
|
+
amount.replace("-", I18n.t("global.accessibility.minusSymbol"))
|
|
15
|
+
),
|
|
16
|
+
O.getOrElseW(() => undefined)
|
|
17
|
+
);
|
package/src/utils/fonts.ts
CHANGED
|
@@ -20,14 +20,17 @@ export type FontWeightValue = (typeof weightValues)[number];
|
|
|
20
20
|
const fonts = {
|
|
21
21
|
TitilliumWeb: Platform.select({
|
|
22
22
|
android: "TitilliumWeb",
|
|
23
|
+
web: "TitilliumWeb",
|
|
23
24
|
ios: "Titillium Web"
|
|
24
25
|
}),
|
|
25
26
|
ReadexPro: Platform.select({
|
|
26
27
|
android: "ReadexPro",
|
|
28
|
+
web: "ReadexPro",
|
|
27
29
|
ios: "Readex Pro"
|
|
28
30
|
}),
|
|
29
31
|
RobotoMono: Platform.select({
|
|
30
32
|
android: "RobotoMono",
|
|
33
|
+
web: "RobotoMono",
|
|
31
34
|
ios: "Roboto Mono"
|
|
32
35
|
})
|
|
33
36
|
};
|
|
@@ -80,9 +83,10 @@ export const makeFontFamilyName = (
|
|
|
80
83
|
isItalic: boolean = false
|
|
81
84
|
): string =>
|
|
82
85
|
Platform.select({
|
|
83
|
-
|
|
86
|
+
web: fonts[font],
|
|
84
87
|
android: `${fonts[font]}-${weight || "Regular"}${isItalic ? "Italic" : ""}`,
|
|
85
|
-
ios: fonts[font]
|
|
88
|
+
ios: fonts[font],
|
|
89
|
+
default: "undefined"
|
|
86
90
|
});
|
|
87
91
|
|
|
88
92
|
/**
|
|
@@ -97,8 +101,10 @@ export const makeFontStyleObject = (
|
|
|
97
101
|
font: FontFamily | undefined = "TitilliumWeb"
|
|
98
102
|
): FontStyleObject =>
|
|
99
103
|
Platform.select({
|
|
100
|
-
|
|
101
|
-
fontFamily:
|
|
104
|
+
web: {
|
|
105
|
+
fontFamily: makeFontFamilyName(font, weight, isItalic),
|
|
106
|
+
fontWeight: weight !== undefined ? fontWeightsMap[weight] : weight,
|
|
107
|
+
fontStyle: isItalic ? FontStyle.italic : FontStyle.normal
|
|
102
108
|
},
|
|
103
109
|
android: {
|
|
104
110
|
fontFamily: makeFontFamilyName(font, weight, isItalic)
|
|
@@ -107,5 +113,6 @@ export const makeFontStyleObject = (
|
|
|
107
113
|
fontFamily: makeFontFamilyName(font, weight, isItalic),
|
|
108
114
|
fontWeight: weight !== undefined ? fontWeightsMap[weight] : weight,
|
|
109
115
|
fontStyle: isItalic ? FontStyle.italic : FontStyle.normal
|
|
110
|
-
}
|
|
116
|
+
},
|
|
117
|
+
default: { fontFamily: "undefined" }
|
|
111
118
|
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as A from "fp-ts/Array";
|
|
2
|
+
import * as O from "fp-ts/Option";
|
|
3
|
+
import { pipe } from "fp-ts/lib/function";
|
|
4
|
+
|
|
5
|
+
export const findFirstCaseInsensitive =
|
|
6
|
+
<T>(obj: { [key: string]: T }) =>
|
|
7
|
+
(key: string): O.Option<[string, T]> =>
|
|
8
|
+
pipe(
|
|
9
|
+
obj,
|
|
10
|
+
Object.entries,
|
|
11
|
+
A.findFirst(([k, _]) => k.toLowerCase() === key.toLowerCase())
|
|
12
|
+
);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { TextInputBase } from "../../components/textInput/TextInputBase";
|
|
3
|
+
import { InputType } from "../types";
|
|
4
|
+
|
|
5
|
+
type InputProps = Pick<
|
|
6
|
+
React.ComponentProps<typeof TextInputBase>,
|
|
7
|
+
"textInputProps"
|
|
8
|
+
> & {
|
|
9
|
+
valueFormat?: (value: string) => string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const getInputPropsByType = (
|
|
13
|
+
type: InputType
|
|
14
|
+
): InputProps | undefined => {
|
|
15
|
+
switch (type) {
|
|
16
|
+
case "credit-card":
|
|
17
|
+
return {
|
|
18
|
+
valueFormat: v => v.replace(/\D/g, "").replace(/\d{4}?(?=.)/g, "$& "),
|
|
19
|
+
textInputProps: {
|
|
20
|
+
autoComplete: "cc-number",
|
|
21
|
+
keyboardType: "numeric",
|
|
22
|
+
textContentType: "creditCardNumber",
|
|
23
|
+
inputMode: "numeric"
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
default:
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
};
|
package/src/utils/types.ts
CHANGED
package/src/utils/url.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ImageURISource } from "react-native";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* type guard to check if a value is an ImageURISource
|
|
5
|
+
* @argument value the value to check, can be anything
|
|
6
|
+
* @returns boolean
|
|
7
|
+
*/
|
|
8
|
+
export const isImageUri = (value: unknown): value is ImageURISource =>
|
|
9
|
+
typeof value === "object" && value !== null && "uri" in value;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_H","_IOStyles","_RawAccordion","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","styles","StyleSheet","create","header","marginVertical","IOVisualCostants","appMarginDefault","IOAccordion","props","createElement","RawAccordion","animated","headerStyle","accessibilityLabel","title","H3","numberOfLines","style","IOStyles","flex","children","exports"],"sourceRoot":"../../../../src","sources":["components/accordion/IOAccordion.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,EAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAA8C,SAAAK,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAP,wBAAAW,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA;AAM9C,MAAMW,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;EAC/BC,MAAM,EAAE;IACNC,cAAc,EAAEC,0BAAgB,CAACC;EACnC;AACF,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACO,MAAMC,WAAW,GAAIC,KAAY,iBACtCrC,KAAA,CAAAsC,aAAA,CAAChC,aAAA,CAAAiC,YAAY;EACXC,QAAQ,EAAEH,KAAK,CAACG,QAAS;EACzBC,WAAW,EAAEZ,MAAM,CAACG,MAAO;EAC3BU,kBAAkB,EAAEL,KAAK,CAACM,KAAM;EAChCX,MAAM,eACJhC,KAAA,CAAAsC,aAAA,CAAClC,EAAA,CAAAwC,EAAE;IAACC,aAAa,EAAE,CAAE;IAACC,KAAK,EAAEC,kBAAQ,CAACC;EAAK,GACxCX,KAAK,CAACM,KACL;AACL,GAEAN,KAAK,CAACY,QACK,CACf;AAACC,OAAA,CAAAd,WAAA,GAAAA,WAAA"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { StyleSheet } from "react-native";
|
|
3
|
-
import { H3 } from "../typography/H3";
|
|
4
|
-
import { IOStyles, IOVisualCostants } from "../../core/IOStyles";
|
|
5
|
-
import { RawAccordion } from "./RawAccordion";
|
|
6
|
-
const styles = StyleSheet.create({
|
|
7
|
-
header: {
|
|
8
|
-
marginVertical: IOVisualCostants.appMarginDefault
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* A simplified accordion that accepts a title and one child and uses {@link RawAccordion}
|
|
14
|
-
* @param props
|
|
15
|
-
* @constructor
|
|
16
|
-
*/
|
|
17
|
-
export const IOAccordion = props => /*#__PURE__*/React.createElement(RawAccordion, {
|
|
18
|
-
animated: props.animated,
|
|
19
|
-
headerStyle: styles.header,
|
|
20
|
-
accessibilityLabel: props.title,
|
|
21
|
-
header: /*#__PURE__*/React.createElement(H3, {
|
|
22
|
-
numberOfLines: 1,
|
|
23
|
-
style: IOStyles.flex
|
|
24
|
-
}, props.title)
|
|
25
|
-
}, props.children);
|
|
26
|
-
//# sourceMappingURL=IOAccordion.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","H3","IOStyles","IOVisualCostants","RawAccordion","styles","create","header","marginVertical","appMarginDefault","IOAccordion","props","createElement","animated","headerStyle","accessibilityLabel","title","numberOfLines","style","flex","children"],"sourceRoot":"../../../../src","sources":["components/accordion/IOAccordion.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,EAAE,QAAQ,kBAAkB;AACrC,SAASC,QAAQ,EAAEC,gBAAgB,QAAQ,qBAAqB;AAChE,SAASC,YAAY,QAAQ,gBAAgB;AAM7C,MAAMC,MAAM,GAAGL,UAAU,CAACM,MAAM,CAAC;EAC/BC,MAAM,EAAE;IACNC,cAAc,EAAEL,gBAAgB,CAACM;EACnC;AACF,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAIC,KAAY,iBACtCZ,KAAA,CAAAa,aAAA,CAACR,YAAY;EACXS,QAAQ,EAAEF,KAAK,CAACE,QAAS;EACzBC,WAAW,EAAET,MAAM,CAACE,MAAO;EAC3BQ,kBAAkB,EAAEJ,KAAK,CAACK,KAAM;EAChCT,MAAM,eACJR,KAAA,CAAAa,aAAA,CAACX,EAAE;IAACgB,aAAa,EAAE,CAAE;IAACC,KAAK,EAAEhB,QAAQ,CAACiB;EAAK,GACxCR,KAAK,CAACK,KACL;AACL,GAEAL,KAAK,CAACS,QACK,CACf"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { RawAccordion } from "./RawAccordion";
|
|
3
|
-
type Props = Omit<React.ComponentProps<typeof RawAccordion>, "header"> & {
|
|
4
|
-
title: string;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* A simplified accordion that accepts a title and one child and uses {@link RawAccordion}
|
|
8
|
-
* @param props
|
|
9
|
-
* @constructor
|
|
10
|
-
*/
|
|
11
|
-
export declare const IOAccordion: (props: Props) => React.ReactElement;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=IOAccordion.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IOAccordion.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/IOAccordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,KAAK,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,EAAE,QAAQ,CAAC,GAAG;IACvE,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAQF;;;;GAIG;AACH,eAAO,MAAM,WAAW,UAAW,KAAK,KAAG,MAAM,YAahD,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { StyleSheet } from "react-native";
|
|
3
|
-
import { H3 } from "../typography/H3";
|
|
4
|
-
import { IOStyles, IOVisualCostants } from "../../core/IOStyles";
|
|
5
|
-
import { RawAccordion } from "./RawAccordion";
|
|
6
|
-
|
|
7
|
-
type Props = Omit<React.ComponentProps<typeof RawAccordion>, "header"> & {
|
|
8
|
-
title: string;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
const styles = StyleSheet.create({
|
|
12
|
-
header: {
|
|
13
|
-
marginVertical: IOVisualCostants.appMarginDefault
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* A simplified accordion that accepts a title and one child and uses {@link RawAccordion}
|
|
19
|
-
* @param props
|
|
20
|
-
* @constructor
|
|
21
|
-
*/
|
|
22
|
-
export const IOAccordion = (props: Props): React.ReactElement => (
|
|
23
|
-
<RawAccordion
|
|
24
|
-
animated={props.animated}
|
|
25
|
-
headerStyle={styles.header}
|
|
26
|
-
accessibilityLabel={props.title}
|
|
27
|
-
header={
|
|
28
|
-
<H3 numberOfLines={1} style={IOStyles.flex}>
|
|
29
|
-
{props.title}
|
|
30
|
-
</H3>
|
|
31
|
-
}
|
|
32
|
-
>
|
|
33
|
-
{props.children}
|
|
34
|
-
</RawAccordion>
|
|
35
|
-
);
|