@effijs/templates 0.0.0-stage → 1.0.0-alpha.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/CONTRIBUTING.md +27 -0
- package/LICENSE +22 -0
- package/README.md +32 -2
- package/ai/SETUP.md +5 -0
- package/docs/catalog.md +85 -0
- package/forge.manifest.js +75 -0
- package/lib/compat.js +40 -0
- package/lib/docs/build.js +146 -0
- package/lib/install.js +51 -0
- package/lib/journal.js +40 -0
- package/lib/jsonConfig.js +33 -0
- package/lib/migration.js +35 -0
- package/lib/names.js +42 -0
- package/lib/patch.js +62 -0
- package/lib/paths.js +12 -0
- package/lib/project.js +48 -0
- package/lib/registry.js +99 -0
- package/package.json +46 -4
- package/platforms/react-native/CATALOG.md +391 -0
- package/platforms/react-native/ORIGIN.md +42 -0
- package/platforms/react-native/README.md +78 -0
- package/platforms/react-native/ai/AGENTS.md.hbs +36 -0
- package/platforms/react-native/ai/SETUP.md +89 -0
- package/platforms/react-native/compat/matrix.js +150 -0
- package/platforms/react-native/configs/babel.js +63 -0
- package/platforms/react-native/configs/forgeConfig.js +35 -0
- package/platforms/react-native/configs/jsConfigs.js +96 -0
- package/platforms/react-native/configs/metro.js +86 -0
- package/platforms/react-native/generators/add/generator.js +12 -0
- package/platforms/react-native/generators/add/run.js +64 -0
- package/platforms/react-native/generators/component/generator.js +75 -0
- package/platforms/react-native/generators/component/render.js +69 -0
- package/platforms/react-native/generators/component/templates/Common.tsx.hbs +13 -0
- package/platforms/react-native/generators/component/templates/index.ts.hbs +13 -0
- package/platforms/react-native/generators/component/templates/pm.ts.hbs +7 -0
- package/platforms/react-native/generators/component/templates/types.ts.hbs +3 -0
- package/platforms/react-native/generators/demo/files/api/app.http +8 -0
- package/platforms/react-native/generators/demo/files/api/environment/http-client.env.json +5 -0
- package/platforms/react-native/generators/demo/files/entity/category/category.api.ts +18 -0
- package/platforms/react-native/generators/demo/files/entity/category/category.dto.ts +15 -0
- package/platforms/react-native/generators/demo/files/entity/category/category.service.ts +42 -0
- package/platforms/react-native/generators/demo/files/entity/category/category.store.ts +26 -0
- package/platforms/react-native/generators/demo/files/entity/category/index.ts +2 -0
- package/platforms/react-native/generators/demo/files/entity/product/index.ts +2 -0
- package/platforms/react-native/generators/demo/files/entity/product/product.api.ts +49 -0
- package/platforms/react-native/generators/demo/files/entity/product/product.dto.ts +120 -0
- package/platforms/react-native/generators/demo/files/entity/product/product.service.ts +139 -0
- package/platforms/react-native/generators/demo/files/entity/product/product.store.ts +37 -0
- package/platforms/react-native/generators/demo/files/feature/product/components/Product.CategorySelect.tsx +36 -0
- package/platforms/react-native/generators/demo/files/feature/product/detail/Product.Detail.Screen.tsx +100 -0
- package/platforms/react-native/generators/demo/files/feature/product/detail/product.detail.service.ts +33 -0
- package/platforms/react-native/generators/demo/files/feature/product/filter/Product.Filter.Screen.tsx +59 -0
- package/platforms/react-native/generators/demo/files/feature/product/filter/product.filter.service.ts +78 -0
- package/platforms/react-native/generators/demo/files/feature/product/form/Product.Form.Screen.tsx +71 -0
- package/platforms/react-native/generators/demo/files/feature/product/form/product.form.service.ts +142 -0
- package/platforms/react-native/generators/demo/files/feature/product/index.ts +7 -0
- package/platforms/react-native/generators/demo/files/feature/product/list/Product.List.Item.tsx +34 -0
- package/platforms/react-native/generators/demo/files/feature/product/list/Product.List.Screen.tsx +106 -0
- package/platforms/react-native/generators/demo/files/feature/product/list/product.list.service.ts +47 -0
- package/platforms/react-native/generators/demo/files/feature/product/product.feature.ts +29 -0
- package/platforms/react-native/generators/demo/files/feature/product/product.hooks.ts +7 -0
- package/platforms/react-native/generators/demo/files/feature/product/search/Product.Search.Screen.tsx +82 -0
- package/platforms/react-native/generators/demo/files/feature/product/search/product.search.service.ts +97 -0
- package/platforms/react-native/generators/demo/files/navigation/navigation.product.ts +46 -0
- package/platforms/react-native/generators/demo/generator.js +93 -0
- package/platforms/react-native/generators/entity/generator.js +68 -0
- package/platforms/react-native/generators/feature/generator.js +224 -0
- package/platforms/react-native/generators/feature/render.js +163 -0
- package/platforms/react-native/generators/feature/templates/detail.screen.tsx.hbs +25 -0
- package/platforms/react-native/generators/feature/templates/detail.service.ts.hbs +14 -0
- package/platforms/react-native/generators/feature/templates/feature.ts.hbs +18 -0
- package/platforms/react-native/generators/feature/templates/filter.screen.tsx.hbs +17 -0
- package/platforms/react-native/generators/feature/templates/filter.service.ts.hbs +14 -0
- package/platforms/react-native/generators/feature/templates/form.screen.tsx.hbs +21 -0
- package/platforms/react-native/generators/feature/templates/form.service.ts.hbs +37 -0
- package/platforms/react-native/generators/feature/templates/hooks.ts.hbs +7 -0
- package/platforms/react-native/generators/feature/templates/index.ts.hbs +2 -0
- package/platforms/react-native/generators/feature/templates/list.item.tsx.hbs +16 -0
- package/platforms/react-native/generators/feature/templates/list.screen.tsx.hbs +34 -0
- package/platforms/react-native/generators/feature/templates/list.service.ts.hbs +15 -0
- package/platforms/react-native/generators/feature/templates/navigation.ts.hbs +12 -0
- package/platforms/react-native/generators/feature/templates/search.screen.tsx.hbs +24 -0
- package/platforms/react-native/generators/feature/templates/search.service.ts.hbs +13 -0
- package/platforms/react-native/generators/feature/templates/tab.tsx.hbs +8 -0
- package/platforms/react-native/generators/init/files/app/app.controller.ts +41 -0
- package/platforms/react-native/generators/init/files/app/app.error.ts +1 -0
- package/platforms/react-native/generators/init/files/app/app.store.ts +12 -0
- package/platforms/react-native/generators/init/files/app/index.ts +19 -0
- package/platforms/react-native/generators/init/files/app/splash/Onboarding.Screen.tsx +31 -0
- package/platforms/react-native/generators/init/files/app/splash/Splash.Screen.tsx +14 -0
- package/platforms/react-native/generators/init/files/app/tabs/home/Home.tab.tsx +24 -0
- package/platforms/react-native/generators/init/files/app/tabs/profile/Profile.tab.tsx +1 -0
- package/platforms/react-native/generators/init/files/configs/dev.ts.hbs +5 -0
- package/platforms/react-native/generators/init/files/configs/index.ts +4 -0
- package/platforms/react-native/generators/init/files/configs/prod.ts.hbs +5 -0
- package/platforms/react-native/generators/init/files/entity/auth/auth.api.ts +36 -0
- package/platforms/react-native/generators/init/files/entity/auth/auth.dto.ts +26 -0
- package/platforms/react-native/generators/init/files/entity/auth/auth.service.ts +94 -0
- package/platforms/react-native/generators/init/files/entity/auth/auth.session.store.ts +14 -0
- package/platforms/react-native/generators/init/files/entity/auth/auth.store.ts +20 -0
- package/platforms/react-native/generators/init/files/entity/auth/index.ts +2 -0
- package/platforms/react-native/generators/init/files/entity/index.ts +2 -0
- package/platforms/react-native/generators/init/files/feature/auth/auth.feature.ts +10 -0
- package/platforms/react-native/generators/init/files/feature/auth/auth.hooks.ts +7 -0
- package/platforms/react-native/generators/init/files/feature/auth/index.ts +1 -0
- package/platforms/react-native/generators/init/files/feature/auth/sign-in/SignIn.Screen.tsx +39 -0
- package/platforms/react-native/generators/init/files/feature/auth/sign-in/signIn.service.ts +54 -0
- package/platforms/react-native/generators/init/files/feature/auth/sign-up/SignUp.Screen.tsx +64 -0
- package/platforms/react-native/generators/init/files/feature/auth/sign-up/signUp.service.ts +73 -0
- package/platforms/react-native/generators/init/files/feature/feature.hooks.ts +15 -0
- package/platforms/react-native/generators/init/files/feature/index.ts +3 -0
- package/platforms/react-native/generators/init/files/feature/profile/Profile.Screen.tsx +52 -0
- package/platforms/react-native/generators/init/files/feature/profile/index.ts +1 -0
- package/platforms/react-native/generators/init/files/feature/profile/profile.feature.ts +18 -0
- package/platforms/react-native/generators/init/files/feature/profile/profile.hooks.ts +7 -0
- package/platforms/react-native/generators/init/files/index.ts +16 -0
- package/platforms/react-native/generators/init/files/navigation/index.ts +18 -0
- package/platforms/react-native/generators/init/files/navigation/navigation.app.ts +58 -0
- package/platforms/react-native/generators/init/files/navigation/navigation.features.ts +9 -0
- package/platforms/react-native/generators/init/files/navigation/navigation.hooks.ts +5 -0
- package/platforms/react-native/generators/init/files/navigation/navigation.tabs.ts +55 -0
- package/platforms/react-native/generators/init/files/navigation/navigation.widgets.ts +23 -0
- package/platforms/react-native/generators/init/files/services/http/http.base.ts +69 -0
- package/platforms/react-native/generators/init/files/services/http/http.error.ts +10 -0
- package/platforms/react-native/generators/init/files/services/http/http.service.ts +24 -0
- package/platforms/react-native/generators/init/files/services/http/middleware/index.ts +12 -0
- package/platforms/react-native/generators/init/files/services/http/middleware/middleware.error.ts +36 -0
- package/platforms/react-native/generators/init/files/services/http/middleware/middleware.registry.ts +3 -0
- package/platforms/react-native/generators/init/files/services/http/middleware/middleware.token.ts +97 -0
- package/platforms/react-native/generators/init/files/services/index.ts +15 -0
- package/platforms/react-native/generators/init/files/ui/components/Box/Common.tsx +19 -0
- package/platforms/react-native/generators/init/files/ui/components/Box/box.pm.ts +111 -0
- package/platforms/react-native/generators/init/files/ui/components/Box/box.types.ts +8 -0
- package/platforms/react-native/generators/init/files/ui/components/Box/index.ts +13 -0
- package/platforms/react-native/generators/init/files/ui/components/Button/Common.tsx +50 -0
- package/platforms/react-native/generators/init/files/ui/components/Button/Touchable.tsx +19 -0
- package/platforms/react-native/generators/init/files/ui/components/Button/button.pm.ts +197 -0
- package/platforms/react-native/generators/init/files/ui/components/Button/button.types.ts +22 -0
- package/platforms/react-native/generators/init/files/ui/components/Button/button.utils.ts +16 -0
- package/platforms/react-native/generators/init/files/ui/components/Button/index.ts +19 -0
- package/platforms/react-native/generators/init/files/ui/components/Form/Colours.tsx +50 -0
- package/platforms/react-native/generators/init/files/ui/components/Form/Common.tsx +38 -0
- package/platforms/react-native/generators/init/files/ui/components/Form/ErrorText.tsx +11 -0
- package/platforms/react-native/generators/init/files/ui/components/Form/Input.tsx +115 -0
- package/platforms/react-native/generators/init/files/ui/components/Form/InputArea.tsx +70 -0
- package/platforms/react-native/generators/init/files/ui/components/Form/Label.tsx +18 -0
- package/platforms/react-native/generators/init/files/ui/components/Form/Select.tsx +86 -0
- package/platforms/react-native/generators/init/files/ui/components/Form/components/SecureTextEntry.tsx +19 -0
- package/platforms/react-native/generators/init/files/ui/components/Form/form.error.ts +18 -0
- package/platforms/react-native/generators/init/files/ui/components/Form/form.pm.ts +134 -0
- package/platforms/react-native/generators/init/files/ui/components/Form/form.types.ts +59 -0
- package/platforms/react-native/generators/init/files/ui/components/Form/index.ts +67 -0
- package/platforms/react-native/generators/init/files/ui/components/Grid/Common.tsx +11 -0
- package/platforms/react-native/generators/init/files/ui/components/Grid/grid.pm.ts +93 -0
- package/platforms/react-native/generators/init/files/ui/components/Grid/grid.types.ts +79 -0
- package/platforms/react-native/generators/init/files/ui/components/Grid/index.ts +13 -0
- package/platforms/react-native/generators/init/files/ui/components/Icon/Common.tsx +19 -0
- package/platforms/react-native/generators/init/files/ui/components/Icon/icons.pm.ts +74 -0
- package/platforms/react-native/generators/init/files/ui/components/Icon/icons.types.ts +19 -0
- package/platforms/react-native/generators/init/files/ui/components/Icon/index.ts +3 -0
- package/platforms/react-native/generators/init/files/ui/components/Loading/Loading.tsx +10 -0
- package/platforms/react-native/generators/init/files/ui/components/Loading/loading.hook.ts +5 -0
- package/platforms/react-native/generators/init/files/ui/components/Loading/loading.service.ts +22 -0
- package/platforms/react-native/generators/init/files/ui/components/Loading/loading.store.ts +8 -0
- package/platforms/react-native/generators/init/files/ui/components/Screen/Common.tsx +87 -0
- package/platforms/react-native/generators/init/files/ui/components/Screen/Content.tsx +77 -0
- package/platforms/react-native/generators/init/files/ui/components/Screen/Header.tsx +80 -0
- package/platforms/react-native/generators/init/files/ui/components/Screen/HeaderTab.tsx +17 -0
- package/platforms/react-native/generators/init/files/ui/components/Screen/SafeAreaHOC.tsx +9 -0
- package/platforms/react-native/generators/init/files/ui/components/Screen/index.ts +22 -0
- package/platforms/react-native/generators/init/files/ui/components/Text/Common.tsx +20 -0
- package/platforms/react-native/generators/init/files/ui/components/Text/index.ts +13 -0
- package/platforms/react-native/generators/init/files/ui/components/Text/text.pm.ts +55 -0
- package/platforms/react-native/generators/init/files/ui/components/Text/text.types.ts +27 -0
- package/platforms/react-native/generators/init/files/ui/components/TextInput/Common.tsx +19 -0
- package/platforms/react-native/generators/init/files/ui/components/TextInput/index.ts +15 -0
- package/platforms/react-native/generators/init/files/ui/components/TextInput/textInput.pm.ts +65 -0
- package/platforms/react-native/generators/init/files/ui/components/TextInput/textInput.types.ts +16 -0
- package/platforms/react-native/generators/init/files/ui/components/ThemePicker/ThemePicker.tsx +92 -0
- package/platforms/react-native/generators/init/files/ui/components/ThemePicker/index.ts +1 -0
- package/platforms/react-native/generators/init/files/ui/components/index.ts +27 -0
- package/platforms/react-native/generators/init/files/ui/components/utils/color.ts +19 -0
- package/platforms/react-native/generators/init/files/ui/components/utils/index.ts +3 -0
- package/platforms/react-native/generators/init/files/ui/components/utils/useLoading.hook.spec.tsx +202 -0
- package/platforms/react-native/generators/init/files/ui/components/utils/useLoading.hook.ts +172 -0
- package/platforms/react-native/generators/init/files/ui/components/utils/useStore.ts +34 -0
- package/platforms/react-native/generators/init/files/ui/fonts/font-icons.ttf +0 -0
- package/platforms/react-native/generators/init/files/ui/icons/font-icons.json +53 -0
- package/platforms/react-native/generators/init/files/ui/icons/logo.png +0 -0
- package/platforms/react-native/generators/init/files/ui/icons/logo.svg +304 -0
- package/platforms/react-native/generators/init/files/ui/icons/tabs/icon-1.png +0 -0
- package/platforms/react-native/generators/init/files/ui/icons/tabs/icon-2.png +0 -0
- package/platforms/react-native/generators/init/files/ui/theme/black/black.color.ts +8 -0
- package/platforms/react-native/generators/init/files/ui/theme/black/index.ts +10 -0
- package/platforms/react-native/generators/init/files/ui/theme/blue/blue.color.ts +8 -0
- package/platforms/react-native/generators/init/files/ui/theme/blue/index.ts +10 -0
- package/platforms/react-native/generators/init/files/ui/theme/green/green.color.ts +8 -0
- package/platforms/react-native/generators/init/files/ui/theme/green/index.ts +10 -0
- package/platforms/react-native/generators/init/files/ui/theme/index.ts +11 -0
- package/platforms/react-native/generators/init/files/ui/theme/pink/index.ts +10 -0
- package/platforms/react-native/generators/init/files/ui/theme/pink/pink.color.ts +8 -0
- package/platforms/react-native/generators/init/files/ui/theme/scheme/index.ts +23 -0
- package/platforms/react-native/generators/init/files/ui/theme/scheme/theme.scheme.color.ts +139 -0
- package/platforms/react-native/generators/init/files/ui/theme/scheme/theme.scheme.radius.ts +21 -0
- package/platforms/react-native/generators/init/files/ui/theme/scheme/theme.scheme.spacing.ts +24 -0
- package/platforms/react-native/generators/init/files/ui/theme/scheme/theme.scheme.ts +25 -0
- package/platforms/react-native/generators/init/files/ui/theme/scheme/theme.scheme.typography.ts +98 -0
- package/platforms/react-native/generators/init/files/ui/theme/shared/index.ts +4 -0
- package/platforms/react-native/generators/init/files/ui/theme/shared/shared.color.base.ts +79 -0
- package/platforms/react-native/generators/init/files/ui/theme/shared/shared.radius.ts +8 -0
- package/platforms/react-native/generators/init/files/ui/theme/shared/shared.spacing.ts +9 -0
- package/platforms/react-native/generators/init/files/ui/theme/shared/shared.typography.ts +105 -0
- package/platforms/react-native/generators/init/files/ui/theme/theme.hooks.ts +7 -0
- package/platforms/react-native/generators/init/files/ui/theme/theme.meta.ts +10 -0
- package/platforms/react-native/generators/init/files/ui/theme/theme.provider.tsx +19 -0
- package/platforms/react-native/generators/init/files/ui/theme/theme.service.ts +36 -0
- package/platforms/react-native/generators/init/files/ui/theme/theme.ts +27 -0
- package/platforms/react-native/generators/init/files/ui/widgets/index.ts +1 -0
- package/platforms/react-native/generators/init/files/ui/widgets/toast/Toast.Item.tsx +175 -0
- package/platforms/react-native/generators/init/files/ui/widgets/toast/Toast.Overlay.tsx +46 -0
- package/platforms/react-native/generators/init/files/ui/widgets/toast/Toast.Stack.tsx +75 -0
- package/platforms/react-native/generators/init/files/ui/widgets/toast/index.ts +7 -0
- package/platforms/react-native/generators/init/files/ui/widgets/toast/toast.hooks.ts +18 -0
- package/platforms/react-native/generators/init/files/ui/widgets/toast/toast.service.ts +39 -0
- package/platforms/react-native/generators/init/files/ui/widgets/toast/toast.store.ts +59 -0
- package/platforms/react-native/generators/init/files/ui/widgets/toast/toast.types.ts +18 -0
- package/platforms/react-native/generators/init/files/ui/widgets/widgets.feature.ts +14 -0
- package/platforms/react-native/generators/init/files/utils/date.ts +11 -0
- package/platforms/react-native/generators/init/files/utils/index.ts +12 -0
- package/platforms/react-native/generators/init/files/utils/store.persistent.ts +103 -0
- package/platforms/react-native/generators/init/files/utils/store.registry.ts +14 -0
- package/platforms/react-native/generators/init/files/utils/string.ts +100 -0
- package/platforms/react-native/generators/init/generator.js +86 -0
- package/platforms/react-native/generators/init/kit.js +23 -0
- package/platforms/react-native/generators/init/navigators/expo-router/index.ts +18 -0
- package/platforms/react-native/generators/init/navigators/expo-router/navigation.app.ts +8 -0
- package/platforms/react-native/generators/init/navigators/expo-router/navigation.features.ts +9 -0
- package/platforms/react-native/generators/init/navigators/expo-router/navigation.hooks.ts +5 -0
- package/platforms/react-native/generators/init/navigators/expo-router/navigation.tabs.ts +7 -0
- package/platforms/react-native/generators/init/navigators/expo-router/navigation.widgets.ts +5 -0
- package/platforms/react-native/generators/init/navigators/react-navigation/index.ts +18 -0
- package/platforms/react-native/generators/init/navigators/react-navigation/navigation.app.ts +8 -0
- package/platforms/react-native/generators/init/navigators/react-navigation/navigation.features.ts +9 -0
- package/platforms/react-native/generators/init/navigators/react-navigation/navigation.hooks.ts +5 -0
- package/platforms/react-native/generators/init/navigators/react-navigation/navigation.tabs.ts +7 -0
- package/platforms/react-native/generators/init/navigators/react-navigation/navigation.widgets.ts +5 -0
- package/platforms/react-native/generators/setup/generator.js +225 -0
- package/platforms/react-native/generators/util/generator.js +12 -0
- package/platforms/react-native/platform.js +32 -0
- package/platforms/react-native/runtime.js +57 -0
- package/platforms/react-native/solutions/components/BottomSheet/README.md +29 -0
- package/platforms/react-native/solutions/components/BottomSheet/files/Common.tsx +120 -0
- package/platforms/react-native/solutions/components/BottomSheet/files/Content.tsx +57 -0
- package/platforms/react-native/solutions/components/BottomSheet/files/Context.tsx +22 -0
- package/platforms/react-native/solutions/components/BottomSheet/files/FlatList.tsx +50 -0
- package/platforms/react-native/solutions/components/BottomSheet/files/Header.tsx +57 -0
- package/platforms/react-native/solutions/components/BottomSheet/files/Search.tsx +24 -0
- package/platforms/react-native/solutions/components/BottomSheet/files/bottomSheet.constants.ts +13 -0
- package/platforms/react-native/solutions/components/BottomSheet/files/bottomSheet.types.ts +31 -0
- package/platforms/react-native/solutions/components/BottomSheet/files/index.ts +33 -0
- package/platforms/react-native/solutions/components/BottomSheet/solution.js +38 -0
- package/platforms/react-native/solutions/components/BottomSheetWidgets/README.md +29 -0
- package/platforms/react-native/solutions/components/BottomSheetWidgets/files/SelectPicker.tsx +47 -0
- package/platforms/react-native/solutions/components/BottomSheetWidgets/files/bottomSheet/Content.BottomSheet.tsx +22 -0
- package/platforms/react-native/solutions/components/BottomSheetWidgets/files/bottomSheet/DateTimePicker.BottomSheet.tsx +74 -0
- package/platforms/react-native/solutions/components/BottomSheetWidgets/files/bottomSheet/List.BottomSheet.tsx +62 -0
- package/platforms/react-native/solutions/components/BottomSheetWidgets/solution.js +49 -0
- package/platforms/react-native/solutions/components/Calendar/README.md +29 -0
- package/platforms/react-native/solutions/components/Calendar/files/Common.tsx +16 -0
- package/platforms/react-native/solutions/components/Calendar/files/Context.tsx +466 -0
- package/platforms/react-native/solutions/components/Calendar/files/DayCell.tsx +89 -0
- package/platforms/react-native/solutions/components/Calendar/files/MonthView.tsx +41 -0
- package/platforms/react-native/solutions/components/Calendar/files/MonthYearOverlay.tsx +51 -0
- package/platforms/react-native/solutions/components/Calendar/files/SwipeablePeriod.tsx +44 -0
- package/platforms/react-native/solutions/components/Calendar/files/WeekDayTitles.tsx +31 -0
- package/platforms/react-native/solutions/components/Calendar/files/WeekView.tsx +40 -0
- package/platforms/react-native/solutions/components/Calendar/files/calendar.styles.ts +142 -0
- package/platforms/react-native/solutions/components/Calendar/files/calendar.types.ts +126 -0
- package/platforms/react-native/solutions/components/Calendar/files/calendar.utils.ts +143 -0
- package/platforms/react-native/solutions/components/Calendar/files/index.ts +40 -0
- package/platforms/react-native/solutions/components/Calendar/solution.js +38 -0
- package/platforms/react-native/solutions/components/Chart/README.md +29 -0
- package/platforms/react-native/solutions/components/Chart/files/Cilcular.tsx +140 -0
- package/platforms/react-native/solutions/components/Chart/files/index.ts +3 -0
- package/platforms/react-native/solutions/components/Chart/solution.js +38 -0
- package/platforms/react-native/solutions/components/CheckBox/README.md +29 -0
- package/platforms/react-native/solutions/components/CheckBox/files/Common.tsx +55 -0
- package/platforms/react-native/solutions/components/CheckBox/files/checkbox.pm.ts +71 -0
- package/platforms/react-native/solutions/components/CheckBox/files/index.ts +9 -0
- package/platforms/react-native/solutions/components/CheckBox/form/Checkbox.tsx +22 -0
- package/platforms/react-native/solutions/components/CheckBox/solution.js +57 -0
- package/platforms/react-native/solutions/components/DateTimePicker/README.md +29 -0
- package/platforms/react-native/solutions/components/DateTimePicker/files/DateTimePicker.tsx +44 -0
- package/platforms/react-native/solutions/components/DateTimePicker/solution.js +45 -0
- package/platforms/react-native/solutions/components/Image/README.md +29 -0
- package/platforms/react-native/solutions/components/Image/files/SVG.tsx +74 -0
- package/platforms/react-native/solutions/components/Image/files/image.pm.ts +25 -0
- package/platforms/react-native/solutions/components/Image/files/image.utils.ts +35 -0
- package/platforms/react-native/solutions/components/Image/files/index.ts +5 -0
- package/platforms/react-native/solutions/components/Image/solution.js +40 -0
- package/platforms/react-native/solutions/components/InputSecurity/README.md +29 -0
- package/platforms/react-native/solutions/components/InputSecurity/files/InputSecurity.ts +142 -0
- package/platforms/react-native/solutions/components/InputSecurity/solution.js +28 -0
- package/platforms/react-native/solutions/components/OTP/README.md +29 -0
- package/platforms/react-native/solutions/components/OTP/files/Item.tsx +16 -0
- package/platforms/react-native/solutions/components/OTP/files/Items.tsx +33 -0
- package/platforms/react-native/solutions/components/OTP/files/index.tsx +120 -0
- package/platforms/react-native/solutions/components/OTP/files/otp.pm.ts +30 -0
- package/platforms/react-native/solutions/components/OTP/solution.js +38 -0
- package/platforms/react-native/solutions/components/ProgressIndicator/README.md +29 -0
- package/platforms/react-native/solutions/components/ProgressIndicator/files/Circular.tsx +154 -0
- package/platforms/react-native/solutions/components/ProgressIndicator/files/Linear.tsx +133 -0
- package/platforms/react-native/solutions/components/ProgressIndicator/files/circular.pm.ts +34 -0
- package/platforms/react-native/solutions/components/ProgressIndicator/files/index.ts +16 -0
- package/platforms/react-native/solutions/components/ProgressIndicator/solution.js +39 -0
- package/platforms/react-native/solutions/components/Ruler/README.md +29 -0
- package/platforms/react-native/solutions/components/Ruler/files/Common.tsx +44 -0
- package/platforms/react-native/solutions/components/Ruler/files/Context.tsx +210 -0
- package/platforms/react-native/solutions/components/Ruler/files/Track.tsx +686 -0
- package/platforms/react-native/solutions/components/Ruler/files/Value.tsx +60 -0
- package/platforms/react-native/solutions/components/Ruler/files/index.ts +23 -0
- package/platforms/react-native/solutions/components/Ruler/files/ruler.constants.ts +70 -0
- package/platforms/react-native/solutions/components/Ruler/files/ruler.types.ts +98 -0
- package/platforms/react-native/solutions/components/Ruler/files/ruler.utils.ts +332 -0
- package/platforms/react-native/solutions/components/Ruler/solution.js +38 -0
- package/platforms/react-native/solutions/components/Section/README.md +29 -0
- package/platforms/react-native/solutions/components/Section/files/Common.tsx +144 -0
- package/platforms/react-native/solutions/components/Section/solution.js +37 -0
- package/platforms/react-native/solutions/components/Slider/README.md +29 -0
- package/platforms/react-native/solutions/components/Slider/files/Container.tsx +5 -0
- package/platforms/react-native/solutions/components/Slider/files/Content.tsx +44 -0
- package/platforms/react-native/solutions/components/Slider/files/Context.tsx +30 -0
- package/platforms/react-native/solutions/components/Slider/files/Pagination.Dot.tsx +61 -0
- package/platforms/react-native/solutions/components/Slider/files/index.ts +22 -0
- package/platforms/react-native/solutions/components/Slider/solution.js +38 -0
- package/platforms/react-native/solutions/components/Switch/README.md +29 -0
- package/platforms/react-native/solutions/components/Switch/files/Common.tsx +38 -0
- package/platforms/react-native/solutions/components/Switch/files/index.ts +9 -0
- package/platforms/react-native/solutions/components/Switch/files/switch.pm.ts +53 -0
- package/platforms/react-native/solutions/components/Switch/solution.js +38 -0
- package/platforms/react-native/solutions/install.js +97 -0
- package/platforms/react-native/solutions/services/firebase-core/README.md +31 -0
- package/platforms/react-native/solutions/services/firebase-core/files/index.ts +5 -0
- package/platforms/react-native/solutions/services/firebase-core/solution.js +39 -0
- package/platforms/react-native/solutions/services/firebase-messaging/README.md +31 -0
- package/platforms/react-native/solutions/services/firebase-messaging/files/index.ts +20 -0
- package/platforms/react-native/solutions/services/firebase-messaging/solution.js +42 -0
- package/platforms/react-native/solutions/utils/permissions/README.md +29 -0
- package/platforms/react-native/solutions/utils/permissions/files/permissions.ts +10 -0
- package/platforms/react-native/solutions/utils/permissions/solution.js +32 -0
- package/presets/react-native-fsd/index.js +25 -0
- package/shared/generators/entity/render.js +88 -0
- package/shared/generators/entity/templates/crud/api.ts.hbs +36 -0
- package/shared/generators/entity/templates/crud/dto.ts.hbs +36 -0
- package/shared/generators/entity/templates/crud/service.ts.hbs +73 -0
- package/shared/generators/entity/templates/crud/store.ts.hbs +27 -0
- package/shared/generators/entity/templates/index.ts.hbs +2 -0
- package/shared/generators/entity/templates/simple/api.ts.hbs +16 -0
- package/shared/generators/entity/templates/simple/dto.ts.hbs +5 -0
- package/shared/generators/entity/templates/simple/service.ts.hbs +26 -0
- package/shared/generators/entity/templates/simple/store.ts.hbs +18 -0
- package/shared/solutions/utils/date/README.md +29 -0
- package/shared/solutions/utils/date/files/date.ts +11 -0
- package/shared/solutions/utils/date/solution.js +27 -0
- package/shared/solutions/utils/string/README.md +29 -0
- package/shared/solutions/utils/string/files/string.ts +100 -0
- package/shared/solutions/utils/string/solution.js +27 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { Decorators } from '@effijs/theme';
|
|
2
|
+
|
|
3
|
+
export class ColorScheme {
|
|
4
|
+
@Decorators.ThemeToken()
|
|
5
|
+
primary!: string;
|
|
6
|
+
|
|
7
|
+
@Decorators.ThemeToken()
|
|
8
|
+
onPrimary!: string;
|
|
9
|
+
|
|
10
|
+
@Decorators.ThemeToken()
|
|
11
|
+
cardWhiteVariant!: string;
|
|
12
|
+
|
|
13
|
+
@Decorators.ThemeToken()
|
|
14
|
+
cardGrayVariant!: string;
|
|
15
|
+
|
|
16
|
+
@Decorators.ThemeToken()
|
|
17
|
+
cardBlockedVariant!: string;
|
|
18
|
+
|
|
19
|
+
@Decorators.ThemeToken()
|
|
20
|
+
primaryContainer!: string;
|
|
21
|
+
|
|
22
|
+
@Decorators.ThemeToken()
|
|
23
|
+
onPrimaryContainer!: string;
|
|
24
|
+
|
|
25
|
+
@Decorators.ThemeToken()
|
|
26
|
+
outlineStrong!: string;
|
|
27
|
+
|
|
28
|
+
@Decorators.ThemeToken()
|
|
29
|
+
surfaceDim!: string;
|
|
30
|
+
|
|
31
|
+
@Decorators.ThemeToken()
|
|
32
|
+
onSurfaceVariantSecondary!: string;
|
|
33
|
+
|
|
34
|
+
/*
|
|
35
|
+
primaryFixed!: string;
|
|
36
|
+
onPrimaryFixed!: string;
|
|
37
|
+
primaryFixedDim!: string;
|
|
38
|
+
onPrimaryFixedVariant!: string;
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
@Decorators.ThemeToken()
|
|
42
|
+
secondary!: string;
|
|
43
|
+
|
|
44
|
+
@Decorators.ThemeToken()
|
|
45
|
+
onSecondary!: string;
|
|
46
|
+
|
|
47
|
+
@Decorators.ThemeToken()
|
|
48
|
+
tertiary!: string;
|
|
49
|
+
|
|
50
|
+
@Decorators.ThemeToken()
|
|
51
|
+
onTertiary!: string;
|
|
52
|
+
|
|
53
|
+
@Decorators.ThemeToken()
|
|
54
|
+
tertiaryActive!: string;
|
|
55
|
+
|
|
56
|
+
@Decorators.ThemeToken()
|
|
57
|
+
onTertiaryActive!: string;
|
|
58
|
+
|
|
59
|
+
/*
|
|
60
|
+
secondaryContainer!: string;
|
|
61
|
+
onSecondaryContainer!: string;
|
|
62
|
+
secondaryFixed!: string;
|
|
63
|
+
onSecondaryFixed!: string;
|
|
64
|
+
secondaryFixedDim!: string;
|
|
65
|
+
onSecondaryFixedVariant!: string;
|
|
66
|
+
|
|
67
|
+
tertiaryContainer!: string;
|
|
68
|
+
onTertiaryContainer!: string;
|
|
69
|
+
tertiaryFixed!: string;
|
|
70
|
+
onTertiaryFixed!: string;
|
|
71
|
+
tertiaryFixedDim!: string;
|
|
72
|
+
onTertiaryFixedVariant!: string;
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
@Decorators.ThemeToken()
|
|
76
|
+
error!: string;
|
|
77
|
+
|
|
78
|
+
@Decorators.ThemeToken()
|
|
79
|
+
onError!: string;
|
|
80
|
+
|
|
81
|
+
/*
|
|
82
|
+
errorContainer!: string;
|
|
83
|
+
onErrorContainer!: string;
|
|
84
|
+
*/
|
|
85
|
+
|
|
86
|
+
@Decorators.ThemeToken()
|
|
87
|
+
background!: string;
|
|
88
|
+
|
|
89
|
+
@Decorators.ThemeToken()
|
|
90
|
+
onBackground!: string;
|
|
91
|
+
|
|
92
|
+
@Decorators.ThemeToken()
|
|
93
|
+
backgroundVariant!: string;
|
|
94
|
+
|
|
95
|
+
@Decorators.ThemeToken()
|
|
96
|
+
backgroundSecondVariant!: string;
|
|
97
|
+
|
|
98
|
+
@Decorators.ThemeToken()
|
|
99
|
+
onBackgroundSecondVariant!: string;
|
|
100
|
+
|
|
101
|
+
@Decorators.ThemeToken()
|
|
102
|
+
onBackgroundVariant!: string;
|
|
103
|
+
|
|
104
|
+
@Decorators.ThemeToken()
|
|
105
|
+
surface!: string;
|
|
106
|
+
|
|
107
|
+
/*
|
|
108
|
+
surfaceBright!: string;
|
|
109
|
+
surfaceContainerLowest!: string;
|
|
110
|
+
surfaceContainerLow!: string;
|
|
111
|
+
surfaceContainer!: string;
|
|
112
|
+
surfaceContainerHigh!: string;
|
|
113
|
+
surfaceContainerHighest!: string;
|
|
114
|
+
*/
|
|
115
|
+
|
|
116
|
+
@Decorators.ThemeToken()
|
|
117
|
+
onSurface!: string;
|
|
118
|
+
@Decorators.ThemeToken()
|
|
119
|
+
surfaceVariant!: string;
|
|
120
|
+
@Decorators.ThemeToken()
|
|
121
|
+
onSurfaceVariant!: string;
|
|
122
|
+
@Decorators.ThemeToken()
|
|
123
|
+
outline!: string;
|
|
124
|
+
|
|
125
|
+
/*
|
|
126
|
+
inverseOnSurface!: string;
|
|
127
|
+
inverseSurface!: string;
|
|
128
|
+
inversePrimary!: string;
|
|
129
|
+
shadow!: string;
|
|
130
|
+
surfaceTint!: string;
|
|
131
|
+
*/
|
|
132
|
+
|
|
133
|
+
@Decorators.ThemeToken()
|
|
134
|
+
outlineVariant!: string;
|
|
135
|
+
|
|
136
|
+
/*
|
|
137
|
+
scrim!: string;
|
|
138
|
+
*/
|
|
139
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Decorators } from '@effijs/theme';
|
|
2
|
+
|
|
3
|
+
export class RadiusScheme {
|
|
4
|
+
@Decorators.ThemeToken()
|
|
5
|
+
xs!: number;
|
|
6
|
+
|
|
7
|
+
@Decorators.ThemeToken()
|
|
8
|
+
sm!: number;
|
|
9
|
+
|
|
10
|
+
@Decorators.ThemeToken()
|
|
11
|
+
md!: number;
|
|
12
|
+
|
|
13
|
+
@Decorators.ThemeToken()
|
|
14
|
+
lg!: number;
|
|
15
|
+
|
|
16
|
+
@Decorators.ThemeToken()
|
|
17
|
+
xl!: number;
|
|
18
|
+
|
|
19
|
+
@Decorators.ThemeToken()
|
|
20
|
+
full!: number;
|
|
21
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Decorators } from '@effijs/theme';
|
|
2
|
+
|
|
3
|
+
export class SpacingScheme {
|
|
4
|
+
@Decorators.ThemeToken()
|
|
5
|
+
xxs!: number;
|
|
6
|
+
|
|
7
|
+
@Decorators.ThemeToken()
|
|
8
|
+
xs!: number;
|
|
9
|
+
|
|
10
|
+
@Decorators.ThemeToken()
|
|
11
|
+
s!: number;
|
|
12
|
+
|
|
13
|
+
@Decorators.ThemeToken()
|
|
14
|
+
m!: number;
|
|
15
|
+
|
|
16
|
+
@Decorators.ThemeToken()
|
|
17
|
+
l!: number;
|
|
18
|
+
|
|
19
|
+
@Decorators.ThemeToken()
|
|
20
|
+
xl!: number;
|
|
21
|
+
|
|
22
|
+
@Decorators.ThemeToken()
|
|
23
|
+
xxl!: number;
|
|
24
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Decorators } from '@effijs/theme';
|
|
2
|
+
|
|
3
|
+
import { ColorScheme } from './theme.scheme.color';
|
|
4
|
+
import { RadiusScheme } from './theme.scheme.radius';
|
|
5
|
+
import { SpacingScheme } from './theme.scheme.spacing';
|
|
6
|
+
import { TypographyScheme } from './theme.scheme.typography';
|
|
7
|
+
|
|
8
|
+
@Decorators.ThemeValidator()
|
|
9
|
+
export class ThemeScheme /*extends UIThemeScheme*/ {
|
|
10
|
+
@Decorators.ThemeToken()
|
|
11
|
+
@Decorators.ThemeTokenType(() => SpacingScheme)
|
|
12
|
+
spacing!: SpacingScheme;
|
|
13
|
+
|
|
14
|
+
@Decorators.ThemeToken()
|
|
15
|
+
@Decorators.ThemeTokenType(() => TypographyScheme)
|
|
16
|
+
typography!: TypographyScheme;
|
|
17
|
+
|
|
18
|
+
@Decorators.ThemeToken()
|
|
19
|
+
@Decorators.ThemeTokenType(() => ColorScheme)
|
|
20
|
+
color!: ColorScheme;
|
|
21
|
+
|
|
22
|
+
@Decorators.ThemeToken()
|
|
23
|
+
@Decorators.ThemeTokenType(() => RadiusScheme)
|
|
24
|
+
radius!: RadiusScheme;
|
|
25
|
+
}
|
package/platforms/react-native/generators/init/files/ui/theme/scheme/theme.scheme.typography.ts
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Decorators } from '@effijs/theme';
|
|
2
|
+
|
|
3
|
+
class TypographyData {
|
|
4
|
+
// @Decorators.ThemeToken()
|
|
5
|
+
// fontFamily!: string;
|
|
6
|
+
|
|
7
|
+
@Decorators.ThemeToken()
|
|
8
|
+
fontWeight!: string;
|
|
9
|
+
|
|
10
|
+
@Decorators.ThemeToken()
|
|
11
|
+
fontSize!: number;
|
|
12
|
+
|
|
13
|
+
@Decorators.ThemeToken()
|
|
14
|
+
lineHeight!: number;
|
|
15
|
+
|
|
16
|
+
@Decorators.ThemeToken()
|
|
17
|
+
letterSpacing!: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
class IconData {
|
|
21
|
+
@Decorators.ThemeToken()
|
|
22
|
+
fontFamily!: string;
|
|
23
|
+
|
|
24
|
+
@Decorators.ThemeToken()
|
|
25
|
+
fontWeight!: string;
|
|
26
|
+
|
|
27
|
+
@Decorators.ThemeToken()
|
|
28
|
+
fontSize!: number;
|
|
29
|
+
|
|
30
|
+
@Decorators.ThemeToken()
|
|
31
|
+
fontStyle!: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export class TypographyScheme {
|
|
35
|
+
@Decorators.ThemeToken()
|
|
36
|
+
@Decorators.ThemeTokenType(() => TypographyData)
|
|
37
|
+
'title-s': TypographyData;
|
|
38
|
+
|
|
39
|
+
@Decorators.ThemeToken()
|
|
40
|
+
@Decorators.ThemeTokenType(() => TypographyData)
|
|
41
|
+
'title-m': TypographyData;
|
|
42
|
+
|
|
43
|
+
@Decorators.ThemeToken()
|
|
44
|
+
@Decorators.ThemeTokenType(() => TypographyData)
|
|
45
|
+
'title-l': TypographyData;
|
|
46
|
+
|
|
47
|
+
@Decorators.ThemeToken()
|
|
48
|
+
@Decorators.ThemeTokenType(() => TypographyData)
|
|
49
|
+
'label-s': TypographyData;
|
|
50
|
+
|
|
51
|
+
@Decorators.ThemeToken()
|
|
52
|
+
@Decorators.ThemeTokenType(() => TypographyData)
|
|
53
|
+
'label-m': TypographyData;
|
|
54
|
+
|
|
55
|
+
@Decorators.ThemeToken()
|
|
56
|
+
@Decorators.ThemeTokenType(() => TypographyData)
|
|
57
|
+
'label-l': TypographyData;
|
|
58
|
+
|
|
59
|
+
@Decorators.ThemeToken()
|
|
60
|
+
@Decorators.ThemeTokenType(() => TypographyData)
|
|
61
|
+
'body-s': TypographyData;
|
|
62
|
+
|
|
63
|
+
@Decorators.ThemeToken()
|
|
64
|
+
@Decorators.ThemeTokenType(() => TypographyData)
|
|
65
|
+
'body-m': TypographyData;
|
|
66
|
+
|
|
67
|
+
@Decorators.ThemeToken()
|
|
68
|
+
@Decorators.ThemeTokenType(() => TypographyData)
|
|
69
|
+
'body-l': TypographyData;
|
|
70
|
+
|
|
71
|
+
@Decorators.ThemeToken()
|
|
72
|
+
@Decorators.ThemeTokenType(() => TypographyData)
|
|
73
|
+
'headline-s': TypographyData;
|
|
74
|
+
|
|
75
|
+
@Decorators.ThemeToken()
|
|
76
|
+
@Decorators.ThemeTokenType(() => TypographyData)
|
|
77
|
+
'headline-m': TypographyData;
|
|
78
|
+
|
|
79
|
+
@Decorators.ThemeToken()
|
|
80
|
+
@Decorators.ThemeTokenType(() => TypographyData)
|
|
81
|
+
'headline-l': TypographyData;
|
|
82
|
+
|
|
83
|
+
@Decorators.ThemeToken()
|
|
84
|
+
@Decorators.ThemeTokenType(() => TypographyData)
|
|
85
|
+
'display-s': TypographyData;
|
|
86
|
+
|
|
87
|
+
@Decorators.ThemeToken()
|
|
88
|
+
@Decorators.ThemeTokenType(() => TypographyData)
|
|
89
|
+
'display-m': TypographyData;
|
|
90
|
+
|
|
91
|
+
@Decorators.ThemeToken()
|
|
92
|
+
@Decorators.ThemeTokenType(() => TypographyData)
|
|
93
|
+
'display-l': TypographyData;
|
|
94
|
+
|
|
95
|
+
@Decorators.ThemeToken()
|
|
96
|
+
@Decorators.ThemeTokenType(() => IconData)
|
|
97
|
+
'icon-m': IconData;
|
|
98
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ColorScheme } from '../scheme/theme.scheme.color';
|
|
2
|
+
|
|
3
|
+
export const sharedColorTokens: Pick<
|
|
4
|
+
ColorScheme,
|
|
5
|
+
| 'secondary'
|
|
6
|
+
| 'onSecondary'
|
|
7
|
+
| 'tertiary'
|
|
8
|
+
| 'onTertiary'
|
|
9
|
+
| 'tertiaryActive'
|
|
10
|
+
| 'onTertiaryActive'
|
|
11
|
+
| 'error'
|
|
12
|
+
| 'onError'
|
|
13
|
+
| 'outlineVariant'
|
|
14
|
+
| 'outlineStrong'
|
|
15
|
+
| 'surfaceDim'
|
|
16
|
+
| 'backgroundVariant'
|
|
17
|
+
| 'onBackgroundVariant'
|
|
18
|
+
| 'backgroundSecondVariant'
|
|
19
|
+
| 'onBackgroundSecondVariant'
|
|
20
|
+
| 'surface'
|
|
21
|
+
| 'onSurface'
|
|
22
|
+
| 'surfaceVariant'
|
|
23
|
+
| 'onSurfaceVariant'
|
|
24
|
+
| 'onSurfaceVariantSecondary'
|
|
25
|
+
| 'cardWhiteVariant'
|
|
26
|
+
| 'cardGrayVariant'
|
|
27
|
+
| 'cardBlockedVariant'
|
|
28
|
+
> = {
|
|
29
|
+
secondary: '#5c5c5c',
|
|
30
|
+
onSecondary: '#8A8A8A',
|
|
31
|
+
|
|
32
|
+
tertiary: '#9ca3800d',
|
|
33
|
+
onTertiary: '#8A8A8A',
|
|
34
|
+
|
|
35
|
+
tertiaryActive: '#FFE5E5',
|
|
36
|
+
onTertiaryActive: '#FE3333',
|
|
37
|
+
|
|
38
|
+
error: '#fe0000',
|
|
39
|
+
onError: '#ffffff',
|
|
40
|
+
|
|
41
|
+
outlineVariant: '#E1E2E5',
|
|
42
|
+
outlineStrong: '#8E8EA5',
|
|
43
|
+
|
|
44
|
+
surfaceDim: '#222223',
|
|
45
|
+
|
|
46
|
+
backgroundVariant: '#5E698A',
|
|
47
|
+
onBackgroundVariant: '#ffffff',
|
|
48
|
+
|
|
49
|
+
backgroundSecondVariant: '#687382',
|
|
50
|
+
onBackgroundSecondVariant: '#ffffff',
|
|
51
|
+
|
|
52
|
+
surface: '#141316',
|
|
53
|
+
onSurface: '#c9c5ca',
|
|
54
|
+
|
|
55
|
+
surfaceVariant: '#47464f',
|
|
56
|
+
onSurfaceVariant: '#c8c5d0',
|
|
57
|
+
onSurfaceVariantSecondary: '#515163',
|
|
58
|
+
cardWhiteVariant: '#000000',
|
|
59
|
+
cardGrayVariant: '#999999',
|
|
60
|
+
cardBlockedVariant: '#666666',
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export function createThemeColor(vars: {
|
|
64
|
+
primary: string;
|
|
65
|
+
outline: string;
|
|
66
|
+
background: string;
|
|
67
|
+
onPrimaryContainer?: string;
|
|
68
|
+
}): ColorScheme {
|
|
69
|
+
return {
|
|
70
|
+
...sharedColorTokens,
|
|
71
|
+
primary: vars.primary,
|
|
72
|
+
onPrimary: '#ffffff',
|
|
73
|
+
primaryContainer: '#ffffff',
|
|
74
|
+
onPrimaryContainer: vars.onPrimaryContainer ?? vars.primary,
|
|
75
|
+
outline: vars.outline,
|
|
76
|
+
background: vars.background,
|
|
77
|
+
onBackground: '#5c5c5c',
|
|
78
|
+
};
|
|
79
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
export const typography = {
|
|
2
|
+
'title-s': {
|
|
3
|
+
fontWeight: '400',
|
|
4
|
+
fontSize: 14,
|
|
5
|
+
lineHeight: 20,
|
|
6
|
+
letterSpacing: 0.1,
|
|
7
|
+
},
|
|
8
|
+
'title-m': {
|
|
9
|
+
fontWeight: '400',
|
|
10
|
+
fontSize: 16,
|
|
11
|
+
lineHeight: 24,
|
|
12
|
+
letterSpacing: 0.15,
|
|
13
|
+
},
|
|
14
|
+
'title-l': {
|
|
15
|
+
fontWeight: '400',
|
|
16
|
+
fontSize: 18,
|
|
17
|
+
lineHeight: 22,
|
|
18
|
+
letterSpacing: 0,
|
|
19
|
+
},
|
|
20
|
+
'label-s': {
|
|
21
|
+
fontWeight: '400',
|
|
22
|
+
fontSize: 11,
|
|
23
|
+
lineHeight: 16,
|
|
24
|
+
letterSpacing: 0.5,
|
|
25
|
+
},
|
|
26
|
+
'label-m': {
|
|
27
|
+
fontWeight: '400',
|
|
28
|
+
fontSize: 12,
|
|
29
|
+
lineHeight: 16,
|
|
30
|
+
letterSpacing: 0.5,
|
|
31
|
+
},
|
|
32
|
+
'label-l': {
|
|
33
|
+
fontWeight: '400',
|
|
34
|
+
fontSize: 14,
|
|
35
|
+
lineHeight: 20,
|
|
36
|
+
letterSpacing: 0.1,
|
|
37
|
+
},
|
|
38
|
+
'body-s': {
|
|
39
|
+
fontWeight: '400',
|
|
40
|
+
fontSize: 12,
|
|
41
|
+
lineHeight: 16,
|
|
42
|
+
letterSpacing: 0,
|
|
43
|
+
},
|
|
44
|
+
'body-m': {
|
|
45
|
+
fontWeight: '400',
|
|
46
|
+
fontSize: 14,
|
|
47
|
+
lineHeight: 20,
|
|
48
|
+
letterSpacing: 0,
|
|
49
|
+
},
|
|
50
|
+
'body-l': {
|
|
51
|
+
fontWeight: '400',
|
|
52
|
+
fontSize: 16,
|
|
53
|
+
lineHeight: 20,
|
|
54
|
+
letterSpacing: 0,
|
|
55
|
+
},
|
|
56
|
+
'body-xl': {
|
|
57
|
+
fontWeight: '400',
|
|
58
|
+
fontSize: 18,
|
|
59
|
+
lineHeight: 24,
|
|
60
|
+
letterSpacing: 0.5,
|
|
61
|
+
},
|
|
62
|
+
'headline-s': {
|
|
63
|
+
fontWeight: '400',
|
|
64
|
+
fontSize: 24,
|
|
65
|
+
lineHeight: 32,
|
|
66
|
+
letterSpacing: 0,
|
|
67
|
+
},
|
|
68
|
+
'headline-m': {
|
|
69
|
+
fontWeight: '400',
|
|
70
|
+
fontSize: 28,
|
|
71
|
+
lineHeight: 36,
|
|
72
|
+
letterSpacing: 0,
|
|
73
|
+
},
|
|
74
|
+
'headline-l': {
|
|
75
|
+
fontWeight: '400',
|
|
76
|
+
fontSize: 32,
|
|
77
|
+
lineHeight: 40,
|
|
78
|
+
letterSpacing: 0,
|
|
79
|
+
},
|
|
80
|
+
'display-s': {
|
|
81
|
+
fontWeight: '400',
|
|
82
|
+
fontSize: 36,
|
|
83
|
+
lineHeight: 44,
|
|
84
|
+
letterSpacing: 0,
|
|
85
|
+
},
|
|
86
|
+
'display-m': {
|
|
87
|
+
fontWeight: '400',
|
|
88
|
+
fontSize: 45,
|
|
89
|
+
lineHeight: 52,
|
|
90
|
+
letterSpacing: 0,
|
|
91
|
+
},
|
|
92
|
+
'display-l': {
|
|
93
|
+
fontWeight: '400',
|
|
94
|
+
fontSize: 57,
|
|
95
|
+
lineHeight: 64,
|
|
96
|
+
letterSpacing: -0.25,
|
|
97
|
+
},
|
|
98
|
+
'icon-m': {
|
|
99
|
+
fontFamily: 'font-icons',
|
|
100
|
+
fontSize: 24,
|
|
101
|
+
lineHeight: 24,
|
|
102
|
+
fontWeight: 'normal',
|
|
103
|
+
fontStyle: 'normal',
|
|
104
|
+
},
|
|
105
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SchemaName } from './theme';
|
|
2
|
+
|
|
3
|
+
export const themeMeta: Record<SchemaName, { previewColor: string; label: string }> = {
|
|
4
|
+
[SchemaName.Black]: { previewColor: '#5c5c5c', label: 'Black' },
|
|
5
|
+
[SchemaName.Pink]: { previewColor: '#e5b8b4', label: 'Pink' },
|
|
6
|
+
[SchemaName.Blue]: { previewColor: '#6d92ad', label: 'Blue' },
|
|
7
|
+
[SchemaName.Green]: { previewColor: '#9ca380', label: 'Green' },
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const themeOrder: SchemaName[] = [SchemaName.Black, SchemaName.Pink, SchemaName.Blue, SchemaName.Green];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createContext, useMemo, ReactNode, useSyncExternalStore, useContext } from 'react';
|
|
2
|
+
|
|
3
|
+
import themeStore, { SchemaName } from './theme';
|
|
4
|
+
|
|
5
|
+
type TThemeSchemaMapping = Record<SchemaName, SchemaName>;
|
|
6
|
+
|
|
7
|
+
const ThemeContext = createContext<{ theme: SchemaName }>({ theme: themeStore.schema.active as SchemaName });
|
|
8
|
+
|
|
9
|
+
export default function ThemeProvider({ children, mapping }: { children: ReactNode; mapping?: TThemeSchemaMapping }) {
|
|
10
|
+
const active = useSyncExternalStore(themeStore.subscribe, () => themeStore.schema.active) as SchemaName;
|
|
11
|
+
const value = useMemo(() => ({ theme: mapping?.[active] ?? active }), [active, mapping]);
|
|
12
|
+
|
|
13
|
+
return <ThemeContext.Provider value={value} children={children} />;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function useTheme() {
|
|
17
|
+
const { theme } = useContext(ThemeContext);
|
|
18
|
+
return theme;
|
|
19
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Entity } from '@effijs/common';
|
|
2
|
+
|
|
3
|
+
import { AuthStore } from '@entity/auth/auth.store';
|
|
4
|
+
|
|
5
|
+
import theme, { SchemaName } from './theme';
|
|
6
|
+
|
|
7
|
+
const SCHEMA_NAMES = new Set<string>(Object.values(SchemaName));
|
|
8
|
+
|
|
9
|
+
function isSchemaName(value: unknown): value is SchemaName {
|
|
10
|
+
return typeof value === 'string' && SCHEMA_NAMES.has(value);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@Entity.Decorators.Service()
|
|
14
|
+
export class ThemeService {
|
|
15
|
+
constructor(private authStore: AuthStore) {
|
|
16
|
+
this.authStore.subscribe('theme', ({ theme }) => {
|
|
17
|
+
this.apply(theme);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
getActive(): SchemaName {
|
|
22
|
+
return (theme.schema.active as SchemaName) ?? SchemaName.Blue;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
init() {
|
|
26
|
+
this.apply(this.authStore.getByPath('theme'));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
setActive(name: SchemaName) {
|
|
30
|
+
this.authStore.set('theme', name);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
private apply(value: unknown) {
|
|
34
|
+
theme.schema.active = isSchemaName(value) ? value : SchemaName.Blue;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Theme } from '@effijs/theme';
|
|
2
|
+
import type { TTheme as TEffiTheme } from '@effijs/theme';
|
|
3
|
+
|
|
4
|
+
import { blackThemeValues } from './black';
|
|
5
|
+
import { blueThemeValues } from './blue';
|
|
6
|
+
import { greenThemeValues } from './green';
|
|
7
|
+
import { pinkThemeValues } from './pink';
|
|
8
|
+
import { ThemeScheme } from './scheme/theme.scheme';
|
|
9
|
+
|
|
10
|
+
export enum SchemaName {
|
|
11
|
+
Black = 'black',
|
|
12
|
+
Pink = 'pink',
|
|
13
|
+
Blue = 'blue',
|
|
14
|
+
Green = 'green',
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const theme = Theme(ThemeScheme);
|
|
18
|
+
theme.schema.define(SchemaName.Black, blackThemeValues);
|
|
19
|
+
theme.schema.define(SchemaName.Pink, pinkThemeValues);
|
|
20
|
+
theme.schema.define(SchemaName.Blue, blueThemeValues);
|
|
21
|
+
theme.schema.define(SchemaName.Green, greenThemeValues);
|
|
22
|
+
|
|
23
|
+
theme.schema.active = SchemaName.Blue;
|
|
24
|
+
|
|
25
|
+
export type TTheme = TEffiTheme<ThemeScheme>;
|
|
26
|
+
|
|
27
|
+
export default theme;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './widgets.feature';
|