@fattureincloud-mobile/fic-mobile-ds 1.0.0 → 1.2.0
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/LICENSE +20 -0
- package/README.md +31 -0
- package/lib/commonjs/components/Tag/Tag.js +44 -0
- package/lib/commonjs/components/Tag/Tag.js.map +1 -0
- package/lib/commonjs/components/Tag/index.js +14 -0
- package/lib/commonjs/components/Tag/index.js.map +1 -0
- package/lib/commonjs/components/Touchable/Touchable.js +79 -0
- package/lib/commonjs/components/Touchable/Touchable.js.map +1 -0
- package/lib/commonjs/components/Touchable/index.js +14 -0
- package/lib/commonjs/components/Touchable/index.js.map +1 -0
- package/lib/commonjs/components/base/DatePicker/DatePicker.js +257 -0
- package/lib/commonjs/components/base/DatePicker/DatePicker.js.map +1 -0
- package/lib/commonjs/components/base/DatePicker/index.js +14 -0
- package/lib/commonjs/components/base/DatePicker/index.js.map +1 -0
- package/lib/commonjs/components/base/HeaderArrows/HeaderArrows.js +77 -0
- package/lib/commonjs/components/base/HeaderArrows/HeaderArrows.js.map +1 -0
- package/lib/commonjs/components/base/HeaderArrows/index.js +14 -0
- package/lib/commonjs/components/base/HeaderArrows/index.js.map +1 -0
- package/lib/commonjs/components/buttons/FicButton/FicButton.js +42 -0
- package/lib/commonjs/components/buttons/FicButton/FicButton.js.map +1 -0
- package/lib/commonjs/components/buttons/FicButton/FicButton.types.js +6 -0
- package/lib/commonjs/components/buttons/FicButton/FicButton.types.js.map +1 -0
- package/lib/commonjs/components/buttons/FicButton/FicButtonIcon.js +104 -0
- package/lib/commonjs/components/buttons/FicButton/FicButtonIcon.js.map +1 -0
- package/lib/commonjs/components/buttons/FicButton/FicButtonPrimary.js +121 -0
- package/lib/commonjs/components/buttons/FicButton/FicButtonPrimary.js.map +1 -0
- package/lib/commonjs/components/buttons/FicButton/FicButtonSecondary.js +123 -0
- package/lib/commonjs/components/buttons/FicButton/FicButtonSecondary.js.map +1 -0
- package/lib/commonjs/components/buttons/FicButton/FicButtonTertiary.js +144 -0
- package/lib/commonjs/components/buttons/FicButton/FicButtonTertiary.js.map +1 -0
- package/lib/commonjs/components/buttons/FicButton/constants.js +23 -0
- package/lib/commonjs/components/buttons/FicButton/constants.js.map +1 -0
- package/lib/commonjs/components/buttons/FicButton/index.js +14 -0
- package/lib/commonjs/components/buttons/FicButton/index.js.map +1 -0
- package/lib/commonjs/components/buttons/FicButton/themes/dark.js +291 -0
- package/lib/commonjs/components/buttons/FicButton/themes/dark.js.map +1 -0
- package/lib/commonjs/components/buttons/FicButton/themes/index.js +14 -0
- package/lib/commonjs/components/buttons/FicButton/themes/index.js.map +1 -0
- package/lib/commonjs/components/buttons/FicButton/themes/light.js +311 -0
- package/lib/commonjs/components/buttons/FicButton/themes/light.js.map +1 -0
- package/lib/commonjs/components/buttons/FicButtonGroup/FicButtonGroup.js +54 -0
- package/lib/commonjs/components/buttons/FicButtonGroup/FicButtonGroup.js.map +1 -0
- package/lib/commonjs/components/buttons/FicButtonGroup/FicButtonGroup.types.js +6 -0
- package/lib/commonjs/components/buttons/FicButtonGroup/FicButtonGroup.types.js.map +1 -0
- package/lib/commonjs/components/buttons/FicButtonGroup/index.js +14 -0
- package/lib/commonjs/components/buttons/FicButtonGroup/index.js.map +1 -0
- package/lib/commonjs/components/notifications/Banner/Banner.js +96 -0
- package/lib/commonjs/components/notifications/Banner/Banner.js.map +1 -0
- package/lib/commonjs/components/notifications/Banner/Banner.types.js +6 -0
- package/lib/commonjs/components/notifications/Banner/Banner.types.js.map +1 -0
- package/lib/commonjs/components/notifications/Banner/index.js +14 -0
- package/lib/commonjs/components/notifications/Banner/index.js.map +1 -0
- package/lib/commonjs/components/notifications/Banner/themes/dark.js +47 -0
- package/lib/commonjs/components/notifications/Banner/themes/dark.js.map +1 -0
- package/lib/commonjs/components/notifications/Banner/themes/index.js +21 -0
- package/lib/commonjs/components/notifications/Banner/themes/index.js.map +1 -0
- package/lib/commonjs/components/notifications/Banner/themes/light.js +47 -0
- package/lib/commonjs/components/notifications/Banner/themes/light.js.map +1 -0
- package/lib/commonjs/components/typographies/Body/Body.js +35 -0
- package/lib/commonjs/components/typographies/Body/Body.js.map +1 -0
- package/lib/commonjs/components/typographies/Body/index.js +14 -0
- package/lib/commonjs/components/typographies/Body/index.js.map +1 -0
- package/lib/commonjs/components/typographies/ButtonTitle/ButtonTitle.js +45 -0
- package/lib/commonjs/components/typographies/ButtonTitle/ButtonTitle.js.map +1 -0
- package/lib/commonjs/components/typographies/ButtonTitle/index.js +14 -0
- package/lib/commonjs/components/typographies/ButtonTitle/index.js.map +1 -0
- package/lib/commonjs/components/typographies/Callout/Callout.js +35 -0
- package/lib/commonjs/components/typographies/Callout/Callout.js.map +1 -0
- package/lib/commonjs/components/typographies/Callout/index.js +14 -0
- package/lib/commonjs/components/typographies/Callout/index.js.map +1 -0
- package/lib/commonjs/components/typographies/CaptionOne/CaptionOne.js +35 -0
- package/lib/commonjs/components/typographies/CaptionOne/CaptionOne.js.map +1 -0
- package/lib/commonjs/components/typographies/CaptionOne/index.js +14 -0
- package/lib/commonjs/components/typographies/CaptionOne/index.js.map +1 -0
- package/lib/commonjs/components/typographies/CaptionTwo/CaptionTwo.js +35 -0
- package/lib/commonjs/components/typographies/CaptionTwo/CaptionTwo.js.map +1 -0
- package/lib/commonjs/components/typographies/CaptionTwo/index.js +14 -0
- package/lib/commonjs/components/typographies/CaptionTwo/index.js.map +1 -0
- package/lib/commonjs/components/typographies/Footnote/Footnote.js +35 -0
- package/lib/commonjs/components/typographies/Footnote/Footnote.js.map +1 -0
- package/lib/commonjs/components/typographies/Footnote/index.js +14 -0
- package/lib/commonjs/components/typographies/Footnote/index.js.map +1 -0
- package/lib/commonjs/components/typographies/Headline/Headline.js +35 -0
- package/lib/commonjs/components/typographies/Headline/Headline.js.map +1 -0
- package/lib/commonjs/components/typographies/Headline/index.js +14 -0
- package/lib/commonjs/components/typographies/Headline/index.js.map +1 -0
- package/lib/commonjs/components/typographies/LargeTitle/LargeTitle.js +35 -0
- package/lib/commonjs/components/typographies/LargeTitle/LargeTitle.js.map +1 -0
- package/lib/commonjs/components/typographies/LargeTitle/index.js +14 -0
- package/lib/commonjs/components/typographies/LargeTitle/index.js.map +1 -0
- package/lib/commonjs/components/typographies/README.md +22 -0
- package/lib/commonjs/components/typographies/Subhead/Subhead.js +35 -0
- package/lib/commonjs/components/typographies/Subhead/Subhead.js.map +1 -0
- package/lib/commonjs/components/typographies/Subhead/index.js +14 -0
- package/lib/commonjs/components/typographies/Subhead/index.js.map +1 -0
- package/lib/commonjs/components/typographies/TitleOne/TitleOne.js +35 -0
- package/lib/commonjs/components/typographies/TitleOne/TitleOne.js.map +1 -0
- package/lib/commonjs/components/typographies/TitleOne/index.js +14 -0
- package/lib/commonjs/components/typographies/TitleOne/index.js.map +1 -0
- package/lib/commonjs/components/typographies/TitleThree/TitleThree.js +35 -0
- package/lib/commonjs/components/typographies/TitleThree/TitleThree.js.map +1 -0
- package/lib/commonjs/components/typographies/TitleThree/index.js +14 -0
- package/lib/commonjs/components/typographies/TitleThree/index.js.map +1 -0
- package/lib/commonjs/components/typographies/TitleTwo/TitleTwo.js +35 -0
- package/lib/commonjs/components/typographies/TitleTwo/TitleTwo.js.map +1 -0
- package/lib/commonjs/components/typographies/TitleTwo/index.js +14 -0
- package/lib/commonjs/components/typographies/TitleTwo/index.js.map +1 -0
- package/lib/commonjs/components/typographies/font.js +33 -0
- package/lib/commonjs/components/typographies/font.js.map +1 -0
- package/lib/commonjs/hooks/useTheme.js +24 -0
- package/lib/commonjs/hooks/useTheme.js.map +1 -0
- package/lib/commonjs/index.js +206 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/providers/DesignSystemProvider/DesignSystemProvider.js +30 -0
- package/lib/commonjs/providers/DesignSystemProvider/DesignSystemProvider.js.map +1 -0
- package/lib/commonjs/providers/DesignSystemProvider/index.js +14 -0
- package/lib/commonjs/providers/DesignSystemProvider/index.js.map +1 -0
- package/lib/commonjs/providers/IconProvider/IconProvider.js +35 -0
- package/lib/commonjs/providers/IconProvider/IconProvider.js.map +1 -0
- package/lib/commonjs/providers/IconProvider/index.js +20 -0
- package/lib/commonjs/providers/IconProvider/index.js.map +1 -0
- package/lib/commonjs/providers/ThemeProvider/ThemeProvider.js +20 -0
- package/lib/commonjs/providers/ThemeProvider/ThemeProvider.js.map +1 -0
- package/lib/commonjs/styles/calendarTheme.js +6 -0
- package/lib/commonjs/styles/calendarTheme.js.map +1 -0
- package/lib/commonjs/styles/colors.js +109 -0
- package/lib/commonjs/styles/colors.js.map +1 -0
- package/lib/commonjs/styles/globalStyles.js +41 -0
- package/lib/commonjs/styles/globalStyles.js.map +1 -0
- package/lib/commonjs/styles/space.js +34 -0
- package/lib/commonjs/styles/space.js.map +1 -0
- package/lib/commonjs/styles/theme.js +421 -0
- package/lib/commonjs/styles/theme.js.map +1 -0
- package/lib/commonjs/utils/locale.js +50 -0
- package/lib/commonjs/utils/locale.js.map +1 -0
- package/lib/module/components/Tag/Tag.js +37 -0
- package/lib/module/components/Tag/Tag.js.map +1 -0
- package/lib/module/components/Tag/index.js +3 -0
- package/lib/module/components/Tag/index.js.map +1 -0
- package/lib/module/components/Touchable/Touchable.js +72 -0
- package/lib/module/components/Touchable/Touchable.js.map +1 -0
- package/lib/module/components/Touchable/index.js +3 -0
- package/lib/module/components/Touchable/index.js.map +1 -0
- package/lib/module/components/base/DatePicker/DatePicker.js +251 -0
- package/lib/module/components/base/DatePicker/DatePicker.js.map +1 -0
- package/lib/module/components/base/DatePicker/index.js +3 -0
- package/lib/module/components/base/DatePicker/index.js.map +1 -0
- package/lib/module/components/base/HeaderArrows/HeaderArrows.js +70 -0
- package/lib/module/components/base/HeaderArrows/HeaderArrows.js.map +1 -0
- package/lib/module/components/base/HeaderArrows/index.js +3 -0
- package/lib/module/components/base/HeaderArrows/index.js.map +1 -0
- package/lib/module/components/buttons/FicButton/FicButton.js +36 -0
- package/lib/module/components/buttons/FicButton/FicButton.js.map +1 -0
- package/lib/module/components/buttons/FicButton/FicButton.types.js +2 -0
- package/lib/module/components/buttons/FicButton/FicButton.types.js.map +1 -0
- package/lib/module/components/buttons/FicButton/FicButtonIcon.js +96 -0
- package/lib/module/components/buttons/FicButton/FicButtonIcon.js.map +1 -0
- package/lib/module/components/buttons/FicButton/FicButtonPrimary.js +114 -0
- package/lib/module/components/buttons/FicButton/FicButtonPrimary.js.map +1 -0
- package/lib/module/components/buttons/FicButton/FicButtonSecondary.js +116 -0
- package/lib/module/components/buttons/FicButton/FicButtonSecondary.js.map +1 -0
- package/lib/module/components/buttons/FicButton/FicButtonTertiary.js +137 -0
- package/lib/module/components/buttons/FicButton/FicButtonTertiary.js.map +1 -0
- package/lib/module/components/buttons/FicButton/constants.js +17 -0
- package/lib/module/components/buttons/FicButton/constants.js.map +1 -0
- package/lib/module/components/buttons/FicButton/index.js +3 -0
- package/lib/module/components/buttons/FicButton/index.js.map +1 -0
- package/lib/module/components/buttons/FicButton/themes/dark.js +285 -0
- package/lib/module/components/buttons/FicButton/themes/dark.js.map +1 -0
- package/lib/module/components/buttons/FicButton/themes/index.js +3 -0
- package/lib/module/components/buttons/FicButton/themes/index.js.map +1 -0
- package/lib/module/components/buttons/FicButton/themes/light.js +305 -0
- package/lib/module/components/buttons/FicButton/themes/light.js.map +1 -0
- package/lib/module/components/buttons/FicButtonGroup/FicButtonGroup.js +47 -0
- package/lib/module/components/buttons/FicButtonGroup/FicButtonGroup.js.map +1 -0
- package/lib/module/components/buttons/FicButtonGroup/FicButtonGroup.types.js +2 -0
- package/lib/module/components/buttons/FicButtonGroup/FicButtonGroup.types.js.map +1 -0
- package/lib/module/components/buttons/FicButtonGroup/index.js +3 -0
- package/lib/module/components/buttons/FicButtonGroup/index.js.map +1 -0
- package/lib/module/components/notifications/Banner/Banner.js +89 -0
- package/lib/module/components/notifications/Banner/Banner.js.map +1 -0
- package/lib/module/components/notifications/Banner/Banner.types.js +2 -0
- package/lib/module/components/notifications/Banner/Banner.types.js.map +1 -0
- package/lib/module/components/notifications/Banner/index.js +3 -0
- package/lib/module/components/notifications/Banner/index.js.map +1 -0
- package/lib/module/components/notifications/Banner/themes/dark.js +41 -0
- package/lib/module/components/notifications/Banner/themes/dark.js.map +1 -0
- package/lib/module/components/notifications/Banner/themes/index.js +4 -0
- package/lib/module/components/notifications/Banner/themes/index.js.map +1 -0
- package/lib/module/components/notifications/Banner/themes/light.js +41 -0
- package/lib/module/components/notifications/Banner/themes/light.js.map +1 -0
- package/lib/module/components/typographies/Body/Body.js +29 -0
- package/lib/module/components/typographies/Body/Body.js.map +1 -0
- package/lib/module/components/typographies/Body/index.js +3 -0
- package/lib/module/components/typographies/Body/index.js.map +1 -0
- package/lib/module/components/typographies/ButtonTitle/ButtonTitle.js +39 -0
- package/lib/module/components/typographies/ButtonTitle/ButtonTitle.js.map +1 -0
- package/lib/module/components/typographies/ButtonTitle/index.js +3 -0
- package/lib/module/components/typographies/ButtonTitle/index.js.map +1 -0
- package/lib/module/components/typographies/Callout/Callout.js +29 -0
- package/lib/module/components/typographies/Callout/Callout.js.map +1 -0
- package/lib/module/components/typographies/Callout/index.js +3 -0
- package/lib/module/components/typographies/Callout/index.js.map +1 -0
- package/lib/module/components/typographies/CaptionOne/CaptionOne.js +29 -0
- package/lib/module/components/typographies/CaptionOne/CaptionOne.js.map +1 -0
- package/lib/module/components/typographies/CaptionOne/index.js +3 -0
- package/lib/module/components/typographies/CaptionOne/index.js.map +1 -0
- package/lib/module/components/typographies/CaptionTwo/CaptionTwo.js +29 -0
- package/lib/module/components/typographies/CaptionTwo/CaptionTwo.js.map +1 -0
- package/lib/module/components/typographies/CaptionTwo/index.js +3 -0
- package/lib/module/components/typographies/CaptionTwo/index.js.map +1 -0
- package/lib/module/components/typographies/Footnote/Footnote.js +29 -0
- package/lib/module/components/typographies/Footnote/Footnote.js.map +1 -0
- package/lib/module/components/typographies/Footnote/index.js +3 -0
- package/lib/module/components/typographies/Footnote/index.js.map +1 -0
- package/lib/module/components/typographies/Headline/Headline.js +29 -0
- package/lib/module/components/typographies/Headline/Headline.js.map +1 -0
- package/lib/module/components/typographies/Headline/index.js +3 -0
- package/lib/module/components/typographies/Headline/index.js.map +1 -0
- package/lib/module/components/typographies/LargeTitle/LargeTitle.js +29 -0
- package/lib/module/components/typographies/LargeTitle/LargeTitle.js.map +1 -0
- package/lib/module/components/typographies/LargeTitle/index.js +3 -0
- package/lib/module/components/typographies/LargeTitle/index.js.map +1 -0
- package/lib/module/components/typographies/README.md +22 -0
- package/lib/module/components/typographies/Subhead/Subhead.js +29 -0
- package/lib/module/components/typographies/Subhead/Subhead.js.map +1 -0
- package/lib/module/components/typographies/Subhead/index.js +3 -0
- package/lib/module/components/typographies/Subhead/index.js.map +1 -0
- package/lib/module/components/typographies/TitleOne/TitleOne.js +29 -0
- package/lib/module/components/typographies/TitleOne/TitleOne.js.map +1 -0
- package/lib/module/components/typographies/TitleOne/index.js +3 -0
- package/lib/module/components/typographies/TitleOne/index.js.map +1 -0
- package/lib/module/components/typographies/TitleThree/TitleThree.js +29 -0
- package/lib/module/components/typographies/TitleThree/TitleThree.js.map +1 -0
- package/lib/module/components/typographies/TitleThree/index.js +3 -0
- package/lib/module/components/typographies/TitleThree/index.js.map +1 -0
- package/lib/module/components/typographies/TitleTwo/TitleTwo.js +29 -0
- package/lib/module/components/typographies/TitleTwo/TitleTwo.js.map +1 -0
- package/lib/module/components/typographies/TitleTwo/index.js +3 -0
- package/lib/module/components/typographies/TitleTwo/index.js.map +1 -0
- package/lib/module/components/typographies/font.js +26 -0
- package/lib/module/components/typographies/font.js.map +1 -0
- package/lib/module/hooks/useTheme.js +16 -0
- package/lib/module/hooks/useTheme.js.map +1 -0
- package/lib/module/index.js +26 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/providers/DesignSystemProvider/DesignSystemProvider.js +22 -0
- package/lib/module/providers/DesignSystemProvider/DesignSystemProvider.js.map +1 -0
- package/lib/module/providers/DesignSystemProvider/index.js +3 -0
- package/lib/module/providers/DesignSystemProvider/index.js.map +1 -0
- package/lib/module/providers/IconProvider/IconProvider.js +27 -0
- package/lib/module/providers/IconProvider/IconProvider.js.map +1 -0
- package/lib/module/providers/IconProvider/index.js +3 -0
- package/lib/module/providers/IconProvider/index.js.map +1 -0
- package/lib/module/providers/ThemeProvider/ThemeProvider.js +13 -0
- package/lib/module/providers/ThemeProvider/ThemeProvider.js.map +1 -0
- package/lib/module/styles/calendarTheme.js +2 -0
- package/lib/module/styles/calendarTheme.js.map +1 -0
- package/lib/module/styles/colors.js +103 -0
- package/lib/module/styles/colors.js.map +1 -0
- package/lib/module/styles/globalStyles.js +35 -0
- package/lib/module/styles/globalStyles.js.map +1 -0
- package/lib/module/styles/space.js +28 -0
- package/lib/module/styles/space.js.map +1 -0
- package/lib/module/styles/theme.js +414 -0
- package/lib/module/styles/theme.js.map +1 -0
- package/lib/module/utils/locale.js +42 -0
- package/lib/module/utils/locale.js.map +1 -0
- package/lib/package.json +138 -0
- package/lib/typescript/components/Tag/Tag.d.ts +13 -0
- package/lib/typescript/components/Tag/Tag.d.ts.map +1 -0
- package/lib/typescript/components/Tag/index.d.ts +3 -0
- package/lib/typescript/components/Tag/index.d.ts.map +1 -0
- package/lib/typescript/components/Touchable/Touchable.d.ts +16 -0
- package/lib/typescript/components/Touchable/Touchable.d.ts.map +1 -0
- package/lib/typescript/components/Touchable/index.d.ts +3 -0
- package/lib/typescript/components/Touchable/index.d.ts.map +1 -0
- package/lib/typescript/components/base/DatePicker/DatePicker.d.ts +60 -0
- package/lib/typescript/components/base/DatePicker/DatePicker.d.ts.map +1 -0
- package/lib/typescript/components/base/DatePicker/index.d.ts +4 -0
- package/lib/typescript/components/base/DatePicker/index.d.ts.map +1 -0
- package/lib/typescript/components/base/HeaderArrows/HeaderArrows.d.ts +16 -0
- package/lib/typescript/components/base/HeaderArrows/HeaderArrows.d.ts.map +1 -0
- package/lib/typescript/components/base/HeaderArrows/index.d.ts +3 -0
- package/lib/typescript/components/base/HeaderArrows/index.d.ts.map +1 -0
- package/lib/typescript/components/buttons/FicButton/FicButton.d.ts +5 -0
- package/lib/typescript/components/buttons/FicButton/FicButton.d.ts.map +1 -0
- package/lib/typescript/components/buttons/FicButton/FicButton.types.d.ts +87 -0
- package/lib/typescript/components/buttons/FicButton/FicButton.types.d.ts.map +1 -0
- package/lib/typescript/components/buttons/FicButton/FicButtonIcon.d.ts +5 -0
- package/lib/typescript/components/buttons/FicButton/FicButtonIcon.d.ts.map +1 -0
- package/lib/typescript/components/buttons/FicButton/FicButtonPrimary.d.ts +5 -0
- package/lib/typescript/components/buttons/FicButton/FicButtonPrimary.d.ts.map +1 -0
- package/lib/typescript/components/buttons/FicButton/FicButtonSecondary.d.ts +5 -0
- package/lib/typescript/components/buttons/FicButton/FicButtonSecondary.d.ts.map +1 -0
- package/lib/typescript/components/buttons/FicButton/FicButtonTertiary.d.ts +5 -0
- package/lib/typescript/components/buttons/FicButton/FicButtonTertiary.d.ts.map +1 -0
- package/lib/typescript/components/buttons/FicButton/constants.d.ts +13 -0
- package/lib/typescript/components/buttons/FicButton/constants.d.ts.map +1 -0
- package/lib/typescript/components/buttons/FicButton/index.d.ts +5 -0
- package/lib/typescript/components/buttons/FicButton/index.d.ts.map +1 -0
- package/lib/typescript/components/buttons/FicButton/themes/dark.d.ts +4 -0
- package/lib/typescript/components/buttons/FicButton/themes/dark.d.ts.map +1 -0
- package/lib/typescript/components/buttons/FicButton/themes/index.d.ts +3 -0
- package/lib/typescript/components/buttons/FicButton/themes/index.d.ts.map +1 -0
- package/lib/typescript/components/buttons/FicButton/themes/light.d.ts +4 -0
- package/lib/typescript/components/buttons/FicButton/themes/light.d.ts.map +1 -0
- package/lib/typescript/components/buttons/FicButtonGroup/FicButtonGroup.d.ts +5 -0
- package/lib/typescript/components/buttons/FicButtonGroup/FicButtonGroup.d.ts.map +1 -0
- package/lib/typescript/components/buttons/FicButtonGroup/FicButtonGroup.types.d.ts +10 -0
- package/lib/typescript/components/buttons/FicButtonGroup/FicButtonGroup.types.d.ts.map +1 -0
- package/lib/typescript/components/buttons/FicButtonGroup/index.d.ts +3 -0
- package/lib/typescript/components/buttons/FicButtonGroup/index.d.ts.map +1 -0
- package/lib/typescript/components/notifications/Banner/Banner.d.ts +5 -0
- package/lib/typescript/components/notifications/Banner/Banner.d.ts.map +1 -0
- package/lib/typescript/components/notifications/Banner/Banner.types.d.ts +50 -0
- package/lib/typescript/components/notifications/Banner/Banner.types.d.ts.map +1 -0
- package/lib/typescript/components/notifications/Banner/index.d.ts +3 -0
- package/lib/typescript/components/notifications/Banner/index.d.ts.map +1 -0
- package/lib/typescript/components/notifications/Banner/themes/dark.d.ts +4 -0
- package/lib/typescript/components/notifications/Banner/themes/dark.d.ts.map +1 -0
- package/lib/typescript/components/notifications/Banner/themes/index.d.ts +4 -0
- package/lib/typescript/components/notifications/Banner/themes/index.d.ts.map +1 -0
- package/lib/typescript/components/notifications/Banner/themes/light.d.ts +4 -0
- package/lib/typescript/components/notifications/Banner/themes/light.d.ts.map +1 -0
- package/lib/typescript/components/typographies/Body/Body.d.ts +12 -0
- package/lib/typescript/components/typographies/Body/Body.d.ts.map +1 -0
- package/lib/typescript/components/typographies/Body/index.d.ts +3 -0
- package/lib/typescript/components/typographies/Body/index.d.ts.map +1 -0
- package/lib/typescript/components/typographies/ButtonTitle/ButtonTitle.d.ts +10 -0
- package/lib/typescript/components/typographies/ButtonTitle/ButtonTitle.d.ts.map +1 -0
- package/lib/typescript/components/typographies/ButtonTitle/index.d.ts +3 -0
- package/lib/typescript/components/typographies/ButtonTitle/index.d.ts.map +1 -0
- package/lib/typescript/components/typographies/Callout/Callout.d.ts +12 -0
- package/lib/typescript/components/typographies/Callout/Callout.d.ts.map +1 -0
- package/lib/typescript/components/typographies/Callout/index.d.ts +3 -0
- package/lib/typescript/components/typographies/Callout/index.d.ts.map +1 -0
- package/lib/typescript/components/typographies/CaptionOne/CaptionOne.d.ts +12 -0
- package/lib/typescript/components/typographies/CaptionOne/CaptionOne.d.ts.map +1 -0
- package/lib/typescript/components/typographies/CaptionOne/index.d.ts +3 -0
- package/lib/typescript/components/typographies/CaptionOne/index.d.ts.map +1 -0
- package/lib/typescript/components/typographies/CaptionTwo/CaptionTwo.d.ts +12 -0
- package/lib/typescript/components/typographies/CaptionTwo/CaptionTwo.d.ts.map +1 -0
- package/lib/typescript/components/typographies/CaptionTwo/index.d.ts +3 -0
- package/lib/typescript/components/typographies/CaptionTwo/index.d.ts.map +1 -0
- package/lib/typescript/components/typographies/Footnote/Footnote.d.ts +12 -0
- package/lib/typescript/components/typographies/Footnote/Footnote.d.ts.map +1 -0
- package/lib/typescript/components/typographies/Footnote/index.d.ts +3 -0
- package/lib/typescript/components/typographies/Footnote/index.d.ts.map +1 -0
- package/lib/typescript/components/typographies/Headline/Headline.d.ts +12 -0
- package/lib/typescript/components/typographies/Headline/Headline.d.ts.map +1 -0
- package/lib/typescript/components/typographies/Headline/index.d.ts +3 -0
- package/lib/typescript/components/typographies/Headline/index.d.ts.map +1 -0
- package/lib/typescript/components/typographies/LargeTitle/LargeTitle.d.ts +12 -0
- package/lib/typescript/components/typographies/LargeTitle/LargeTitle.d.ts.map +1 -0
- package/lib/typescript/components/typographies/LargeTitle/index.d.ts +3 -0
- package/lib/typescript/components/typographies/LargeTitle/index.d.ts.map +1 -0
- package/lib/typescript/components/typographies/Subhead/Subhead.d.ts +12 -0
- package/lib/typescript/components/typographies/Subhead/Subhead.d.ts.map +1 -0
- package/lib/typescript/components/typographies/Subhead/index.d.ts +3 -0
- package/lib/typescript/components/typographies/Subhead/index.d.ts.map +1 -0
- package/lib/typescript/components/typographies/TitleOne/TitleOne.d.ts +12 -0
- package/lib/typescript/components/typographies/TitleOne/TitleOne.d.ts.map +1 -0
- package/lib/typescript/components/typographies/TitleOne/index.d.ts +3 -0
- package/lib/typescript/components/typographies/TitleOne/index.d.ts.map +1 -0
- package/lib/typescript/components/typographies/TitleThree/TitleThree.d.ts +12 -0
- package/lib/typescript/components/typographies/TitleThree/TitleThree.d.ts.map +1 -0
- package/lib/typescript/components/typographies/TitleThree/index.d.ts +3 -0
- package/lib/typescript/components/typographies/TitleThree/index.d.ts.map +1 -0
- package/lib/typescript/components/typographies/TitleTwo/TitleTwo.d.ts +12 -0
- package/lib/typescript/components/typographies/TitleTwo/TitleTwo.d.ts.map +1 -0
- package/lib/typescript/components/typographies/TitleTwo/index.d.ts +3 -0
- package/lib/typescript/components/typographies/TitleTwo/index.d.ts.map +1 -0
- package/lib/typescript/components/typographies/font.d.ts +9 -0
- package/lib/typescript/components/typographies/font.d.ts.map +1 -0
- package/lib/typescript/hooks/useTheme.d.ts +3 -0
- package/lib/typescript/hooks/useTheme.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +31 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/providers/DesignSystemProvider/DesignSystemProvider.d.ts +10 -0
- package/lib/typescript/providers/DesignSystemProvider/DesignSystemProvider.d.ts.map +1 -0
- package/lib/typescript/providers/DesignSystemProvider/index.d.ts +3 -0
- package/lib/typescript/providers/DesignSystemProvider/index.d.ts.map +1 -0
- package/lib/typescript/providers/IconProvider/IconProvider.d.ts +21 -0
- package/lib/typescript/providers/IconProvider/IconProvider.d.ts.map +1 -0
- package/lib/typescript/providers/IconProvider/index.d.ts +4 -0
- package/lib/typescript/providers/IconProvider/index.d.ts.map +1 -0
- package/lib/typescript/providers/ThemeProvider/ThemeProvider.d.ts +9 -0
- package/lib/typescript/providers/ThemeProvider/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/styles/calendarTheme.d.ts +24 -0
- package/lib/typescript/styles/calendarTheme.d.ts.map +1 -0
- package/lib/typescript/styles/colors.d.ts +100 -0
- package/lib/typescript/styles/colors.d.ts.map +1 -0
- package/lib/typescript/styles/globalStyles.d.ts +33 -0
- package/lib/typescript/styles/globalStyles.d.ts.map +1 -0
- package/lib/typescript/styles/space.d.ts +19 -0
- package/lib/typescript/styles/space.d.ts.map +1 -0
- package/lib/typescript/styles/theme.d.ts +183 -0
- package/lib/typescript/styles/theme.d.ts.map +1 -0
- package/lib/typescript/utils/locale.d.ts +15 -0
- package/lib/typescript/utils/locale.d.ts.map +1 -0
- package/package.json +30 -43
- package/src/components/Tag/Tag.tsx +59 -0
- package/src/components/Tag/index.ts +3 -0
- package/src/components/Touchable/Touchable.tsx +110 -0
- package/src/components/Touchable/index.ts +3 -0
- package/src/components/base/DatePicker/DatePicker.tsx +427 -0
- package/src/components/base/DatePicker/index.ts +4 -0
- package/src/components/base/HeaderArrows/HeaderArrows.tsx +93 -0
- package/src/components/base/HeaderArrows/index.ts +3 -0
- package/src/components/buttons/FicButton/FicButton.tsx +41 -0
- package/src/components/buttons/FicButton/FicButton.types.ts +114 -0
- package/src/components/buttons/FicButton/FicButtonIcon.tsx +161 -0
- package/src/components/buttons/FicButton/FicButtonPrimary.tsx +167 -0
- package/src/components/buttons/FicButton/FicButtonSecondary.tsx +168 -0
- package/src/components/buttons/FicButton/FicButtonTertiary.tsx +188 -0
- package/src/components/buttons/FicButton/constants.ts +23 -0
- package/src/components/buttons/FicButton/index.ts +5 -0
- package/src/components/buttons/FicButton/themes/dark.ts +273 -0
- package/src/components/buttons/FicButton/themes/index.ts +3 -0
- package/src/components/buttons/FicButton/themes/light.ts +293 -0
- package/src/components/buttons/FicButtonGroup/FicButtonGroup.tsx +40 -0
- package/src/components/buttons/FicButtonGroup/FicButtonGroup.types.ts +11 -0
- package/src/components/buttons/FicButtonGroup/index.ts +2 -0
- package/src/components/notifications/Banner/Banner.tsx +105 -0
- package/src/components/notifications/Banner/Banner.types.ts +69 -0
- package/src/components/notifications/Banner/index.ts +3 -0
- package/src/components/notifications/Banner/themes/dark.ts +43 -0
- package/src/components/notifications/Banner/themes/index.ts +4 -0
- package/src/components/notifications/Banner/themes/light.ts +43 -0
- package/src/components/typographies/Body/Body.tsx +38 -0
- package/src/components/typographies/Body/index.ts +3 -0
- package/src/components/typographies/ButtonTitle/ButtonTitle.tsx +51 -0
- package/src/components/typographies/ButtonTitle/index.ts +3 -0
- package/src/components/typographies/Callout/Callout.tsx +38 -0
- package/src/components/typographies/Callout/index.ts +3 -0
- package/src/components/typographies/CaptionOne/CaptionOne.tsx +38 -0
- package/src/components/typographies/CaptionOne/index.ts +4 -0
- package/src/components/typographies/CaptionTwo/CaptionTwo.tsx +38 -0
- package/src/components/typographies/CaptionTwo/index.ts +4 -0
- package/src/components/typographies/Footnote/Footnote.tsx +38 -0
- package/src/components/typographies/Footnote/index.ts +4 -0
- package/src/components/typographies/Headline/Headline.tsx +38 -0
- package/src/components/typographies/Headline/index.ts +4 -0
- package/src/components/typographies/LargeTitle/LargeTitle.tsx +38 -0
- package/src/components/typographies/LargeTitle/index.ts +3 -0
- package/src/components/typographies/README.md +22 -0
- package/src/components/typographies/Subhead/Subhead.tsx +38 -0
- package/src/components/typographies/Subhead/index.ts +4 -0
- package/src/components/typographies/TitleOne/TitleOne.tsx +38 -0
- package/src/components/typographies/TitleOne/index.ts +4 -0
- package/src/components/typographies/TitleThree/TitleThree.tsx +38 -0
- package/src/components/typographies/TitleThree/index.ts +4 -0
- package/src/components/typographies/TitleTwo/TitleTwo.tsx +38 -0
- package/src/components/typographies/TitleTwo/index.ts +4 -0
- package/src/components/typographies/font.ts +25 -0
- package/src/hooks/useTheme.ts +17 -0
- package/src/index.tsx +47 -0
- package/src/providers/DesignSystemProvider/DesignSystemProvider.tsx +31 -0
- package/src/providers/DesignSystemProvider/index.ts +3 -0
- package/src/providers/IconProvider/IconProvider.tsx +46 -0
- package/src/providers/IconProvider/index.ts +4 -0
- package/src/providers/ThemeProvider/ThemeProvider.tsx +17 -0
- package/src/styles/calendarTheme.ts +24 -0
- package/src/styles/colors.ts +119 -0
- package/src/styles/globalStyles.ts +36 -0
- package/src/styles/space.ts +27 -0
- package/src/styles/theme.ts +609 -0
- package/src/utils/locale.ts +50 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import { FicButtonTheme } from '../components/buttons/FicButton/FicButton.types';
|
|
3
|
+
import { BannerThemeProp } from '../components/notifications/Banner/Banner.types';
|
|
4
|
+
import { CalendarTheme } from './calendarTheme';
|
|
5
|
+
import { Colors } from './colors';
|
|
6
|
+
interface FlatButtonThemeProps {
|
|
7
|
+
color?: string;
|
|
8
|
+
disabledColor?: string;
|
|
9
|
+
backgroundColor?: string;
|
|
10
|
+
hasShadow?: boolean;
|
|
11
|
+
shadowColor?: string;
|
|
12
|
+
borderRadius?: number;
|
|
13
|
+
disabledStyle?: StyleProp<ViewStyle>;
|
|
14
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
15
|
+
}
|
|
16
|
+
interface GradientButtonThemeProps {
|
|
17
|
+
isHorizontalGradient?: boolean;
|
|
18
|
+
color?: string;
|
|
19
|
+
disabledColor?: string;
|
|
20
|
+
backgroundColors?: string[];
|
|
21
|
+
disabledBackgroundColors?: string[];
|
|
22
|
+
hasShadow?: boolean;
|
|
23
|
+
shadowColor?: string;
|
|
24
|
+
borderRadius?: number;
|
|
25
|
+
disabledStyle?: StyleProp<ViewStyle>;
|
|
26
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
27
|
+
}
|
|
28
|
+
interface OutlineButtonThemeProps {
|
|
29
|
+
color?: string;
|
|
30
|
+
disabledColor?: string;
|
|
31
|
+
backgroundColor?: string;
|
|
32
|
+
disabledBackgroundColor?: string;
|
|
33
|
+
borderColor?: string;
|
|
34
|
+
disabledBorderColor?: string;
|
|
35
|
+
hasShadow?: boolean;
|
|
36
|
+
shadowColor?: string;
|
|
37
|
+
borderRadius?: number;
|
|
38
|
+
disabledStyle?: StyleProp<ViewStyle>;
|
|
39
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
40
|
+
}
|
|
41
|
+
export interface TextInputThemeProps {
|
|
42
|
+
color?: string;
|
|
43
|
+
labelColor?: string;
|
|
44
|
+
mandatoryIndicatorColor?: string;
|
|
45
|
+
placeholderColor?: string;
|
|
46
|
+
inlineLeadingColor?: string;
|
|
47
|
+
fieldIconColor?: string;
|
|
48
|
+
borderColor?: string;
|
|
49
|
+
focusedBorderColor?: string;
|
|
50
|
+
disabledBorderColor?: string;
|
|
51
|
+
erroredBorderColor?: string;
|
|
52
|
+
warningBorderColor?: string;
|
|
53
|
+
backgroundColor?: string;
|
|
54
|
+
disabledBackgroundColor?: string;
|
|
55
|
+
}
|
|
56
|
+
interface TypographiesThemeProps {
|
|
57
|
+
bodyColor?: string;
|
|
58
|
+
buttonTitleColor?: string;
|
|
59
|
+
calloutColor?: string;
|
|
60
|
+
captionOneColor?: string;
|
|
61
|
+
captionTwoColor?: string;
|
|
62
|
+
footnoteColor?: string;
|
|
63
|
+
headlineColor?: string;
|
|
64
|
+
largeTitleColor?: string;
|
|
65
|
+
subheadColor?: string;
|
|
66
|
+
titleOneColor?: string;
|
|
67
|
+
titleTwoColor?: string;
|
|
68
|
+
titleThreeColor?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface TouchablesThemeProps {
|
|
71
|
+
rippleColors?: string;
|
|
72
|
+
highlightColor?: string;
|
|
73
|
+
}
|
|
74
|
+
export interface SearchBarThemeProps {
|
|
75
|
+
color?: string;
|
|
76
|
+
backgroundColor?: string;
|
|
77
|
+
iconColor?: string;
|
|
78
|
+
selectionColor?: string;
|
|
79
|
+
useTextColor?: string;
|
|
80
|
+
errorColor?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface DurationPickerThemeProps {
|
|
83
|
+
activeColor?: string;
|
|
84
|
+
inactiveColor?: string;
|
|
85
|
+
labelColor?: string;
|
|
86
|
+
guidesColor?: string;
|
|
87
|
+
}
|
|
88
|
+
export interface BottomSheetHeaderThemeProps {
|
|
89
|
+
backgroundColor?: string;
|
|
90
|
+
emptyHeaderBackgroundColor?: string;
|
|
91
|
+
handleColor?: string;
|
|
92
|
+
darkHandleColor?: string;
|
|
93
|
+
titleColor?: string;
|
|
94
|
+
captionColor?: string;
|
|
95
|
+
descriptionColor?: string;
|
|
96
|
+
buttonsColor?: string;
|
|
97
|
+
loaderColor?: string;
|
|
98
|
+
}
|
|
99
|
+
export interface BottomSheetThemeProps {
|
|
100
|
+
backgroundColor?: string;
|
|
101
|
+
backdropColor?: string;
|
|
102
|
+
cancelButtonBackgroundColor?: string;
|
|
103
|
+
header?: BottomSheetHeaderThemeProps;
|
|
104
|
+
handleIndicator: ViewStyle;
|
|
105
|
+
}
|
|
106
|
+
export interface YearMonthPickerThemeProps {
|
|
107
|
+
backgroundColor?: string;
|
|
108
|
+
yearColor?: string;
|
|
109
|
+
arrowsColor?: string;
|
|
110
|
+
monthsTextColor?: string;
|
|
111
|
+
monthsBackgroundColor?: string;
|
|
112
|
+
currentMonthTextColor?: string;
|
|
113
|
+
currentMonthBackgroundColor?: string;
|
|
114
|
+
selectedMonthTextColor?: string;
|
|
115
|
+
selectedMonthBackgroundColor?: string;
|
|
116
|
+
}
|
|
117
|
+
export interface ThemeProps {
|
|
118
|
+
flatButton?: FlatButtonThemeProps;
|
|
119
|
+
gradientButton?: GradientButtonThemeProps;
|
|
120
|
+
outlineButton?: OutlineButtonThemeProps;
|
|
121
|
+
textInput?: TextInputThemeProps;
|
|
122
|
+
typographies?: TypographiesThemeProps;
|
|
123
|
+
searchBar?: SearchBarThemeProps;
|
|
124
|
+
datePickers?: CalendarTheme;
|
|
125
|
+
pickers?: DurationPickerThemeProps;
|
|
126
|
+
bottomSheetHeader?: BottomSheetHeaderThemeProps;
|
|
127
|
+
yearMonthPickers?: YearMonthPickerThemeProps;
|
|
128
|
+
}
|
|
129
|
+
export interface GenericThemeProps {
|
|
130
|
+
backgroundLevel0?: string;
|
|
131
|
+
backgroundLevel1?: string;
|
|
132
|
+
backgroundLevel2?: string;
|
|
133
|
+
backgroundLevel3?: string;
|
|
134
|
+
backgroundLevel4?: string;
|
|
135
|
+
title?: string;
|
|
136
|
+
description?: string;
|
|
137
|
+
disabledTitle?: string;
|
|
138
|
+
disabledDescription?: string;
|
|
139
|
+
divider?: string;
|
|
140
|
+
cardBackground?: string;
|
|
141
|
+
}
|
|
142
|
+
interface Primaries {
|
|
143
|
+
azure: Colors;
|
|
144
|
+
red: Colors;
|
|
145
|
+
green: Colors;
|
|
146
|
+
yellow: Colors;
|
|
147
|
+
purple: Colors;
|
|
148
|
+
blue: Colors;
|
|
149
|
+
}
|
|
150
|
+
export interface Theme {
|
|
151
|
+
banner?: BannerThemeProp;
|
|
152
|
+
ficButton?: FicButtonTheme;
|
|
153
|
+
flatButton: Omit<Required<FlatButtonThemeProps>, 'disabledStyle' | 'containerStyle'> & {
|
|
154
|
+
disabledStyle?: StyleProp<ViewStyle>;
|
|
155
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
156
|
+
};
|
|
157
|
+
gradientButton: Omit<Required<GradientButtonThemeProps>, 'disabledStyle' | 'containerStyle'> & {
|
|
158
|
+
disabledStyle?: StyleProp<ViewStyle>;
|
|
159
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
160
|
+
};
|
|
161
|
+
outlineButton: Omit<Required<OutlineButtonThemeProps>, 'disabledStyle' | 'containerStyle'> & {
|
|
162
|
+
disabledStyle?: StyleProp<ViewStyle>;
|
|
163
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
164
|
+
};
|
|
165
|
+
textInput: Required<TextInputThemeProps>;
|
|
166
|
+
typographies: Required<TypographiesThemeProps>;
|
|
167
|
+
touchables: Required<TouchablesThemeProps>;
|
|
168
|
+
searchBar: Required<SearchBarThemeProps>;
|
|
169
|
+
datePickers: CalendarTheme;
|
|
170
|
+
pickers: DurationPickerThemeProps;
|
|
171
|
+
bottomSheet: Required<BottomSheetThemeProps>;
|
|
172
|
+
yearMonthPickers: YearMonthPickerThemeProps;
|
|
173
|
+
generic?: GenericThemeProps;
|
|
174
|
+
primaries?: Primaries;
|
|
175
|
+
primariesContrast?: Primaries;
|
|
176
|
+
primariesLight?: Primaries;
|
|
177
|
+
primariesDark?: Primaries;
|
|
178
|
+
}
|
|
179
|
+
export declare const ficTheme: Theme;
|
|
180
|
+
export declare const ficDarkTheme: Theme;
|
|
181
|
+
export declare const defaultTheme: Theme;
|
|
182
|
+
export {};
|
|
183
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/styles/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAMpD,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAGjF,OAAO,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AAKlF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,UAAU,oBAAoB;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACrC,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACvC;AAED,UAAU,wBAAwB;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;IACpC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,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AAC,oBAAoB,CAAC,CAAC;IAC3C,SAAS,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IACzC,WAAW,EAAE,aAAa,CAAC;IAC3B,OAAO,EAAE,wBAAwB,CAAC;IAClC,WAAW,EAAE,QAAQ,CAAC,qBAAqB,CAAC,CAAC;IAC7C,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,aAAa,CAAC,EAAE,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,QAAQ,EAAE,KAmMtB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAmM1B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAgB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import 'moment/min/locales';
|
|
2
|
+
/**
|
|
3
|
+
* Retrieves the language and optionally the region settings of the device.
|
|
4
|
+
*
|
|
5
|
+
* @param {boolean} [withNoRegion] - If `true`, only the language is returned without the region.
|
|
6
|
+
* @returns {string} The language and region settings of the device.
|
|
7
|
+
* @example
|
|
8
|
+
* // Returns "it_IT" or "it" if `withNoRegion` is `true`
|
|
9
|
+
* const languageRegion = getDeviceLanguageAndRegion(true);
|
|
10
|
+
*/
|
|
11
|
+
export declare const getDeviceLanguageAndRegion: (withNoRegion?: boolean) => string;
|
|
12
|
+
export declare let desiredLocale: string | undefined;
|
|
13
|
+
declare const setLocale: (localeCode: string) => void;
|
|
14
|
+
export default setLocale;
|
|
15
|
+
//# sourceMappingURL=locale.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../../src/utils/locale.ts"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,CAAC;AAoB5B;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,kBAAmB,OAAO,KAAG,MAOnE,CAAC;AAEF,eAAO,IAAI,aAAa,EAAE,MAAM,GAAG,SAAqB,CAAC;AAEzD,QAAA,MAAM,SAAS,eAAgB,MAAM,SAKpC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fattureincloud-mobile/fic-mobile-ds",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Official Design System for Fatture in Cloud Mobile",
|
|
5
|
-
"private": false,
|
|
6
5
|
"main": "./lib/commonjs/index.js",
|
|
7
6
|
"module": "./lib/module/index.js",
|
|
8
7
|
"types": "./lib/typescript/index.d.ts",
|
|
@@ -32,7 +31,10 @@
|
|
|
32
31
|
"clean": "del-cli lib",
|
|
33
32
|
"build": "bob build && cp package.json lib/",
|
|
34
33
|
"build:clean": "rm -rf lib && yarn build",
|
|
35
|
-
"release": "dotenv release-it
|
|
34
|
+
"release": "dotenv release-it",
|
|
35
|
+
"release:ci": "dotenv release-it --ci",
|
|
36
|
+
"release:ni": "dotenv release-it --no-increment",
|
|
37
|
+
"release:rv": "dotenv release-it --release-version"
|
|
36
38
|
},
|
|
37
39
|
"keywords": [
|
|
38
40
|
"react-native",
|
|
@@ -54,58 +56,50 @@
|
|
|
54
56
|
"@babel/core": "^7.20.0",
|
|
55
57
|
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
|
|
56
58
|
"@babel/preset-env": "^7.20.0",
|
|
59
|
+
"@babel/runtime": "^7.20.0",
|
|
57
60
|
"@commitlint/config-conventional": "^17.0.0",
|
|
58
|
-
"@
|
|
61
|
+
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
|
62
|
+
"@fortawesome/react-native-fontawesome": "^0.3.2",
|
|
63
|
+
"@react-native/babel-preset": "0.74.89",
|
|
64
|
+
"@react-native/eslint-config": "0.74.89",
|
|
65
|
+
"@react-native/metro-config": "0.74.89",
|
|
66
|
+
"@react-native/typescript-config": "0.74.89",
|
|
59
67
|
"@release-it/conventional-changelog": "^5.0.0",
|
|
60
68
|
"@types/jest": "^29.2.0",
|
|
61
69
|
"@types/lodash": "^4.17.20",
|
|
62
|
-
"@types/react": "^18.
|
|
63
|
-
"@types/react-native": "^0.70.15",
|
|
70
|
+
"@types/react": "^18.2.6",
|
|
64
71
|
"@types/react-native-calendars": "^1.1264.3",
|
|
65
72
|
"@types/react-test-renderer": "^18.0.0",
|
|
66
|
-
"@types/styled-components": "^5.1.0",
|
|
67
|
-
"@types/styled-components-react-native": "^5.2.5",
|
|
68
73
|
"auto-changelog": "^2.5.0",
|
|
69
|
-
"babel-jest": "^29.
|
|
74
|
+
"babel-jest": "^29.6.3",
|
|
70
75
|
"commitlint": "^17.0.0",
|
|
71
76
|
"del-cli": "^5.0.0",
|
|
72
77
|
"dotenv-cli": "^10.0.0",
|
|
73
78
|
"eslint": "^8.19.0",
|
|
74
79
|
"eslint-config-prettier": "^8.5.0",
|
|
75
80
|
"eslint-plugin-prettier": "^4.0.0",
|
|
76
|
-
"jest": "^29.
|
|
81
|
+
"jest": "^29.6.3",
|
|
77
82
|
"lodash": "^4.17.21",
|
|
78
|
-
"
|
|
79
|
-
"prettier": "
|
|
83
|
+
"moment": ">=2.29.1",
|
|
84
|
+
"prettier": "2.8.8",
|
|
85
|
+
"react": "18.2.0",
|
|
86
|
+
"react-native": "0.74.7",
|
|
80
87
|
"react-native-builder-bob": "^0.20.0",
|
|
81
88
|
"react-native-gesture-handler": "2.9.0",
|
|
82
|
-
"react-test-renderer": "18.
|
|
89
|
+
"react-test-renderer": "18.2.0",
|
|
83
90
|
"release-it": "^15.0.0",
|
|
84
|
-
"typescript": "
|
|
91
|
+
"typescript": "5.0.4"
|
|
85
92
|
},
|
|
86
93
|
"dependencies": {
|
|
87
|
-
"moment": "^2.29.1",
|
|
88
|
-
"react-dom": "^18.1.0",
|
|
89
94
|
"react-native-calendars": "^1.1312.0",
|
|
90
|
-
"react-native-typography": "^1.4.1",
|
|
91
|
-
"react-native-vector-icons": "^10.2.0",
|
|
92
|
-
"styled-components": "^5.1.1"
|
|
93
|
-
},
|
|
94
|
-
"peerDependencies": {
|
|
95
|
-
"react": "18.1.0",
|
|
96
|
-
"react-native": "0.70.15",
|
|
97
|
-
"react-native-gesture-handler": "*",
|
|
98
|
-
"react-native-reanimated": "*",
|
|
99
95
|
"react-native-typography": "^1.4.1"
|
|
100
96
|
},
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"<rootDir>/example/node_modules",
|
|
106
|
-
"<rootDir>/lib/"
|
|
107
|
-
]
|
|
97
|
+
"peerDependencies": {
|
|
98
|
+
"moment": ">=2",
|
|
99
|
+
"react": "18.2.0",
|
|
100
|
+
"react-native": "0.74.7"
|
|
108
101
|
},
|
|
102
|
+
"packageManager": "yarn@4.9.3",
|
|
109
103
|
"commitlint": {
|
|
110
104
|
"extends": [
|
|
111
105
|
"@commitlint/config-conventional"
|
|
@@ -135,17 +129,10 @@
|
|
|
135
129
|
"package.json"
|
|
136
130
|
]
|
|
137
131
|
},
|
|
138
|
-
"create-react-native-library": {
|
|
139
|
-
"typescript": true,
|
|
140
|
-
"languages": "js",
|
|
141
|
-
"type": "library",
|
|
142
|
-
"version": "0.51.1"
|
|
143
|
-
},
|
|
144
132
|
"resolutions": {
|
|
145
|
-
"react": "18.
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
"
|
|
149
|
-
"@types/react-native": "^0.70.15"
|
|
133
|
+
"@types/react": "^18.2.0"
|
|
134
|
+
},
|
|
135
|
+
"engines": {
|
|
136
|
+
"node": ">=18"
|
|
150
137
|
}
|
|
151
138
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, View, ViewProps } from 'react-native';
|
|
3
|
+
import { Colors } from '../../styles/colors';
|
|
4
|
+
import { CaptionOne } from '../typographies/CaptionOne';
|
|
5
|
+
|
|
6
|
+
interface ITagProps extends ViewProps {
|
|
7
|
+
text?: string;
|
|
8
|
+
color?: string;
|
|
9
|
+
backgroundColor?: string;
|
|
10
|
+
rounded?: boolean;
|
|
11
|
+
avoidUpperCase?: boolean;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const Tag: React.FC<ITagProps> = ({
|
|
16
|
+
text,
|
|
17
|
+
color = Colors.WHITE,
|
|
18
|
+
backgroundColor = Colors.GREY_4,
|
|
19
|
+
rounded = false,
|
|
20
|
+
children,
|
|
21
|
+
avoidUpperCase = false,
|
|
22
|
+
style,
|
|
23
|
+
...rest
|
|
24
|
+
}) => {
|
|
25
|
+
const finalText =
|
|
26
|
+
text || (!!children && typeof children === 'string' ? children : undefined);
|
|
27
|
+
|
|
28
|
+
const containerStyle = [
|
|
29
|
+
styles.container,
|
|
30
|
+
{
|
|
31
|
+
backgroundColor,
|
|
32
|
+
borderRadius: rounded ? 100 : 4,
|
|
33
|
+
},
|
|
34
|
+
style,
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<View style={containerStyle} {...rest}>
|
|
39
|
+
{finalText ? (
|
|
40
|
+
<CaptionOne color={color} numberOfLines={1}>
|
|
41
|
+
{avoidUpperCase ? finalText : finalText.toUpperCase()}
|
|
42
|
+
</CaptionOne>
|
|
43
|
+
) : (
|
|
44
|
+
children
|
|
45
|
+
)}
|
|
46
|
+
</View>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const styles = StyleSheet.create({
|
|
51
|
+
container: {
|
|
52
|
+
alignItems: 'center',
|
|
53
|
+
justifyContent: 'center',
|
|
54
|
+
paddingVertical: 2,
|
|
55
|
+
paddingHorizontal: 5,
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export default Tag;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { throttle } from 'lodash';
|
|
2
|
+
import React, { FunctionComponent } from 'react';
|
|
3
|
+
import {
|
|
4
|
+
GestureResponderEvent,
|
|
5
|
+
Platform,
|
|
6
|
+
StyleProp,
|
|
7
|
+
TouchableHighlight,
|
|
8
|
+
TouchableNativeFeedback,
|
|
9
|
+
TouchableOpacity,
|
|
10
|
+
TouchableWithoutFeedbackProps,
|
|
11
|
+
View,
|
|
12
|
+
ViewStyle,
|
|
13
|
+
} from 'react-native';
|
|
14
|
+
import { TouchableNativeFeedback as GHTouchableNativeFeedback } from 'react-native-gesture-handler';
|
|
15
|
+
import { useTheme } from '../../hooks/useTheme';
|
|
16
|
+
import { TouchablesThemeProps } from '../../styles/theme';
|
|
17
|
+
|
|
18
|
+
export interface ITouchableProps extends TouchableWithoutFeedbackProps {
|
|
19
|
+
onPress?: (event: GestureResponderEvent) => void;
|
|
20
|
+
style?: StyleProp<ViewStyle>;
|
|
21
|
+
containerStyle?: StyleProp<ViewStyle>; // Only used by react-native-gesture-handler components
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
highlight?: boolean;
|
|
24
|
+
borderless?: boolean;
|
|
25
|
+
gestureHandler?: boolean;
|
|
26
|
+
theme?: TouchablesThemeProps;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const Touchable: FunctionComponent<ITouchableProps> = ({
|
|
30
|
+
onPress,
|
|
31
|
+
children,
|
|
32
|
+
style,
|
|
33
|
+
containerStyle,
|
|
34
|
+
disabled,
|
|
35
|
+
highlight = false,
|
|
36
|
+
borderless = false,
|
|
37
|
+
gestureHandler = true,
|
|
38
|
+
theme,
|
|
39
|
+
...rest
|
|
40
|
+
}) => {
|
|
41
|
+
const { touchables: touchablesTheme } = useTheme();
|
|
42
|
+
|
|
43
|
+
const {
|
|
44
|
+
rippleColors = touchablesTheme.rippleColors,
|
|
45
|
+
highlightColor = touchablesTheme.highlightColor,
|
|
46
|
+
} = theme || {};
|
|
47
|
+
|
|
48
|
+
const onPressHandler = onPress && throttle(onPress, 300, { trailing: false });
|
|
49
|
+
|
|
50
|
+
// All Android Buttons should have the ripple effect
|
|
51
|
+
if (Platform.OS === 'android') {
|
|
52
|
+
if (!gestureHandler || disabled) {
|
|
53
|
+
return (
|
|
54
|
+
<TouchableNativeFeedback
|
|
55
|
+
{...rest}
|
|
56
|
+
onPress={onPressHandler}
|
|
57
|
+
background={TouchableNativeFeedback.Ripple(rippleColors, borderless)}
|
|
58
|
+
useForeground={TouchableNativeFeedback.canUseNativeForeground()}
|
|
59
|
+
disabled={disabled}
|
|
60
|
+
>
|
|
61
|
+
<View style={style}>{children}</View>
|
|
62
|
+
</TouchableNativeFeedback>
|
|
63
|
+
);
|
|
64
|
+
} else {
|
|
65
|
+
return (
|
|
66
|
+
<GHTouchableNativeFeedback
|
|
67
|
+
{...rest}
|
|
68
|
+
onPress={onPressHandler}
|
|
69
|
+
// @ts-ignore
|
|
70
|
+
background={GHTouchableNativeFeedback.Ripple(
|
|
71
|
+
rippleColors,
|
|
72
|
+
borderless
|
|
73
|
+
)}
|
|
74
|
+
// @ts-ignore
|
|
75
|
+
useForeground={GHTouchableNativeFeedback.canUseNativeForeground()}
|
|
76
|
+
disabled={disabled}
|
|
77
|
+
style={style}
|
|
78
|
+
// @ts-ignore
|
|
79
|
+
containerStyle={containerStyle}
|
|
80
|
+
>
|
|
81
|
+
{children}
|
|
82
|
+
</GHTouchableNativeFeedback>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Normal iOS buttons use TouchableOpacity
|
|
88
|
+
return highlight ? (
|
|
89
|
+
<TouchableHighlight
|
|
90
|
+
{...rest}
|
|
91
|
+
onPress={onPressHandler}
|
|
92
|
+
disabled={disabled}
|
|
93
|
+
style={style}
|
|
94
|
+
underlayColor={highlightColor}
|
|
95
|
+
>
|
|
96
|
+
{children}
|
|
97
|
+
</TouchableHighlight>
|
|
98
|
+
) : (
|
|
99
|
+
<TouchableOpacity
|
|
100
|
+
{...rest}
|
|
101
|
+
onPress={onPressHandler}
|
|
102
|
+
disabled={disabled}
|
|
103
|
+
style={style}
|
|
104
|
+
>
|
|
105
|
+
{children}
|
|
106
|
+
</TouchableOpacity>
|
|
107
|
+
);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export default Touchable;
|