@magmamath/students-features 1.8.4-rc.8 → 1.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/features/pmProgress/shared/TreeNormalizer.js +5 -1
- package/dist/commonjs/features/pmProgress/shared/TreeNormalizer.js.map +1 -1
- package/dist/commonjs/features/uiMode/index.js +7 -0
- package/dist/commonjs/features/uiMode/index.js.map +1 -1
- package/dist/commonjs/features/uiMode/uiMode.helpers.js +7 -2
- package/dist/commonjs/features/uiMode/uiMode.helpers.js.map +1 -1
- package/dist/commonjs/index.js +0 -12
- package/dist/commonjs/index.js.map +1 -1
- package/dist/module/features/pmProgress/shared/TreeNormalizer.js +5 -1
- package/dist/module/features/pmProgress/shared/TreeNormalizer.js.map +1 -1
- package/dist/module/features/uiMode/index.js +1 -0
- package/dist/module/features/uiMode/index.js.map +1 -1
- package/dist/module/features/uiMode/uiMode.helpers.js +6 -1
- package/dist/module/features/uiMode/uiMode.helpers.js.map +1 -1
- package/dist/module/index.js +0 -1
- package/dist/module/index.js.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/shared/TreeNormalizer.d.ts +4 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/TreeNormalizer.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/uiMode/index.d.ts +1 -0
- package/dist/typescript/commonjs/features/uiMode/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/uiMode/uiMode.helpers.d.ts +2 -0
- package/dist/typescript/commonjs/features/uiMode/uiMode.helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/index.d.ts +0 -1
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/shared/TreeNormalizer.d.ts +4 -0
- package/dist/typescript/module/features/pmProgress/shared/TreeNormalizer.d.ts.map +1 -1
- package/dist/typescript/module/features/uiMode/index.d.ts +1 -0
- package/dist/typescript/module/features/uiMode/index.d.ts.map +1 -1
- package/dist/typescript/module/features/uiMode/uiMode.helpers.d.ts +2 -0
- package/dist/typescript/module/features/uiMode/uiMode.helpers.d.ts.map +1 -1
- package/dist/typescript/module/index.d.ts +0 -1
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/package.json +2 -5
- package/src/features/pmProgress/shared/TreeNormalizer.ts +5 -1
- package/src/features/uiMode/__tests__/getUIMode.test.ts +64 -0
- package/src/features/uiMode/index.ts +1 -0
- package/src/features/uiMode/uiMode.helpers.ts +16 -1
- package/src/i18n/.generated/schema.json +1 -9
- package/src/index.ts +0 -1
- package/dist/commonjs/features/profile/Profile.js +0 -90
- package/dist/commonjs/features/profile/Profile.js.map +0 -1
- package/dist/commonjs/features/profile/components/actions/ProfileActions.js +0 -67
- package/dist/commonjs/features/profile/components/actions/ProfileActions.js.map +0 -1
- package/dist/commonjs/features/profile/components/cards/ProfileCard.js +0 -57
- package/dist/commonjs/features/profile/components/cards/ProfileCard.js.map +0 -1
- package/dist/commonjs/features/profile/components/info/AccountInfoCard.js +0 -90
- package/dist/commonjs/features/profile/components/info/AccountInfoCard.js.map +0 -1
- package/dist/commonjs/features/profile/components/modals/JoinClassModal.js +0 -154
- package/dist/commonjs/features/profile/components/modals/JoinClassModal.js.map +0 -1
- package/dist/commonjs/features/profile/components/modals/LogoutConfirmModal.js +0 -61
- package/dist/commonjs/features/profile/components/modals/LogoutConfirmModal.js.map +0 -1
- package/dist/commonjs/features/profile/components/modals/TranslationLanguageModal.js +0 -126
- package/dist/commonjs/features/profile/components/modals/TranslationLanguageModal.js.map +0 -1
- package/dist/commonjs/features/profile/components/settings/LanguageSettingsCard.js +0 -22
- package/dist/commonjs/features/profile/components/settings/LanguageSettingsCard.js.map +0 -1
- package/dist/commonjs/features/profile/components/settings/PreferencesCard.js +0 -70
- package/dist/commonjs/features/profile/components/settings/PreferencesCard.js.map +0 -1
- package/dist/commonjs/features/profile/components/settings/SettingRow.js +0 -48
- package/dist/commonjs/features/profile/components/settings/SettingRow.js.map +0 -1
- package/dist/commonjs/features/profile/components/settings/TextSettingsCard.js +0 -74
- package/dist/commonjs/features/profile/components/settings/TextSettingsCard.js.map +0 -1
- package/dist/commonjs/features/profile/components/settings/TextSizeSlider.js +0 -116
- package/dist/commonjs/features/profile/components/settings/TextSizeSlider.js.map +0 -1
- package/dist/commonjs/features/profile/components/settings/TextToSpeechRow.js +0 -35
- package/dist/commonjs/features/profile/components/settings/TextToSpeechRow.js.map +0 -1
- package/dist/commonjs/features/profile/components/settings/TranslationLanguageRow.js +0 -60
- package/dist/commonjs/features/profile/components/settings/TranslationLanguageRow.js.map +0 -1
- package/dist/commonjs/features/profile/context/ProfileContext.js +0 -18
- package/dist/commonjs/features/profile/context/ProfileContext.js.map +0 -1
- package/dist/commonjs/features/profile/index.js +0 -80
- package/dist/commonjs/features/profile/index.js.map +0 -1
- package/dist/commonjs/features/profile/model/ProfileApi.js +0 -15
- package/dist/commonjs/features/profile/model/ProfileApi.js.map +0 -1
- package/dist/commonjs/features/profile/model/ProfileJoinClassModel.js +0 -60
- package/dist/commonjs/features/profile/model/ProfileJoinClassModel.js.map +0 -1
- package/dist/commonjs/features/profile/model/ProfileLanguageModel.js +0 -30
- package/dist/commonjs/features/profile/model/ProfileLanguageModel.js.map +0 -1
- package/dist/commonjs/features/profile/model/ProfileModel.js +0 -53
- package/dist/commonjs/features/profile/model/ProfileModel.js.map +0 -1
- package/dist/commonjs/features/profile/model/profileModal.types.js +0 -6
- package/dist/commonjs/features/profile/model/profileModal.types.js.map +0 -1
- package/dist/commonjs/features/profile/shared/JoinClassError.js +0 -16
- package/dist/commonjs/features/profile/shared/JoinClassError.js.map +0 -1
- package/dist/commonjs/features/profile/shared/profile.constants.js +0 -29
- package/dist/commonjs/features/profile/shared/profile.constants.js.map +0 -1
- package/dist/commonjs/features/profile/shared/profile.helpers.js +0 -40
- package/dist/commonjs/features/profile/shared/profile.helpers.js.map +0 -1
- package/dist/commonjs/features/profile/shared/profile.types.js +0 -6
- package/dist/commonjs/features/profile/shared/profile.types.js.map +0 -1
- package/dist/module/features/profile/Profile.js +0 -84
- package/dist/module/features/profile/Profile.js.map +0 -1
- package/dist/module/features/profile/components/actions/ProfileActions.js +0 -61
- package/dist/module/features/profile/components/actions/ProfileActions.js.map +0 -1
- package/dist/module/features/profile/components/cards/ProfileCard.js +0 -51
- package/dist/module/features/profile/components/cards/ProfileCard.js.map +0 -1
- package/dist/module/features/profile/components/info/AccountInfoCard.js +0 -84
- package/dist/module/features/profile/components/info/AccountInfoCard.js.map +0 -1
- package/dist/module/features/profile/components/modals/JoinClassModal.js +0 -147
- package/dist/module/features/profile/components/modals/JoinClassModal.js.map +0 -1
- package/dist/module/features/profile/components/modals/LogoutConfirmModal.js +0 -55
- package/dist/module/features/profile/components/modals/LogoutConfirmModal.js.map +0 -1
- package/dist/module/features/profile/components/modals/TranslationLanguageModal.js +0 -120
- package/dist/module/features/profile/components/modals/TranslationLanguageModal.js.map +0 -1
- package/dist/module/features/profile/components/settings/LanguageSettingsCard.js +0 -16
- package/dist/module/features/profile/components/settings/LanguageSettingsCard.js.map +0 -1
- package/dist/module/features/profile/components/settings/PreferencesCard.js +0 -64
- package/dist/module/features/profile/components/settings/PreferencesCard.js.map +0 -1
- package/dist/module/features/profile/components/settings/SettingRow.js +0 -42
- package/dist/module/features/profile/components/settings/SettingRow.js.map +0 -1
- package/dist/module/features/profile/components/settings/TextSettingsCard.js +0 -68
- package/dist/module/features/profile/components/settings/TextSettingsCard.js.map +0 -1
- package/dist/module/features/profile/components/settings/TextSizeSlider.js +0 -109
- package/dist/module/features/profile/components/settings/TextSizeSlider.js.map +0 -1
- package/dist/module/features/profile/components/settings/TextToSpeechRow.js +0 -29
- package/dist/module/features/profile/components/settings/TextToSpeechRow.js.map +0 -1
- package/dist/module/features/profile/components/settings/TranslationLanguageRow.js +0 -54
- package/dist/module/features/profile/components/settings/TranslationLanguageRow.js.map +0 -1
- package/dist/module/features/profile/context/ProfileContext.js +0 -13
- package/dist/module/features/profile/context/ProfileContext.js.map +0 -1
- package/dist/module/features/profile/index.js +0 -11
- package/dist/module/features/profile/index.js.map +0 -1
- package/dist/module/features/profile/model/ProfileApi.js +0 -10
- package/dist/module/features/profile/model/ProfileApi.js.map +0 -1
- package/dist/module/features/profile/model/ProfileJoinClassModel.js +0 -55
- package/dist/module/features/profile/model/ProfileJoinClassModel.js.map +0 -1
- package/dist/module/features/profile/model/ProfileLanguageModel.js +0 -25
- package/dist/module/features/profile/model/ProfileLanguageModel.js.map +0 -1
- package/dist/module/features/profile/model/ProfileModel.js +0 -48
- package/dist/module/features/profile/model/ProfileModel.js.map +0 -1
- package/dist/module/features/profile/model/profileModal.types.js +0 -4
- package/dist/module/features/profile/model/profileModal.types.js.map +0 -1
- package/dist/module/features/profile/shared/JoinClassError.js +0 -11
- package/dist/module/features/profile/shared/JoinClassError.js.map +0 -1
- package/dist/module/features/profile/shared/profile.constants.js +0 -25
- package/dist/module/features/profile/shared/profile.constants.js.map +0 -1
- package/dist/module/features/profile/shared/profile.helpers.js +0 -32
- package/dist/module/features/profile/shared/profile.helpers.js.map +0 -1
- package/dist/module/features/profile/shared/profile.types.js +0 -4
- package/dist/module/features/profile/shared/profile.types.js.map +0 -1
- package/dist/typescript/commonjs/features/profile/Profile.d.ts +0 -6
- package/dist/typescript/commonjs/features/profile/Profile.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/__tests__/ProfileModel.test.d.ts +0 -2
- package/dist/typescript/commonjs/features/profile/__tests__/ProfileModel.test.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/__tests__/profile.helpers.test.d.ts +0 -2
- package/dist/typescript/commonjs/features/profile/__tests__/profile.helpers.test.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/actions/ProfileActions.d.ts +0 -3
- package/dist/typescript/commonjs/features/profile/components/actions/ProfileActions.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/cards/ProfileCard.d.ts +0 -10
- package/dist/typescript/commonjs/features/profile/components/cards/ProfileCard.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/info/AccountInfoCard.d.ts +0 -3
- package/dist/typescript/commonjs/features/profile/components/info/AccountInfoCard.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/modals/JoinClassModal.d.ts +0 -4
- package/dist/typescript/commonjs/features/profile/components/modals/JoinClassModal.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/modals/LogoutConfirmModal.d.ts +0 -4
- package/dist/typescript/commonjs/features/profile/components/modals/LogoutConfirmModal.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/modals/TranslationLanguageModal.d.ts +0 -4
- package/dist/typescript/commonjs/features/profile/components/modals/TranslationLanguageModal.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/settings/LanguageSettingsCard.d.ts +0 -3
- package/dist/typescript/commonjs/features/profile/components/settings/LanguageSettingsCard.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/settings/PreferencesCard.d.ts +0 -3
- package/dist/typescript/commonjs/features/profile/components/settings/PreferencesCard.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/settings/SettingRow.d.ts +0 -11
- package/dist/typescript/commonjs/features/profile/components/settings/SettingRow.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/settings/TextSettingsCard.d.ts +0 -3
- package/dist/typescript/commonjs/features/profile/components/settings/TextSettingsCard.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/settings/TextSizeSlider.d.ts +0 -8
- package/dist/typescript/commonjs/features/profile/components/settings/TextSizeSlider.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/settings/TextToSpeechRow.d.ts +0 -3
- package/dist/typescript/commonjs/features/profile/components/settings/TextToSpeechRow.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/settings/TranslationLanguageRow.d.ts +0 -3
- package/dist/typescript/commonjs/features/profile/components/settings/TranslationLanguageRow.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/context/ProfileContext.d.ts +0 -13
- package/dist/typescript/commonjs/features/profile/context/ProfileContext.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/index.d.ts +0 -12
- package/dist/typescript/commonjs/features/profile/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/model/ProfileApi.d.ts +0 -11
- package/dist/typescript/commonjs/features/profile/model/ProfileApi.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/model/ProfileJoinClassModel.d.ts +0 -14
- package/dist/typescript/commonjs/features/profile/model/ProfileJoinClassModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/model/ProfileLanguageModel.d.ts +0 -13
- package/dist/typescript/commonjs/features/profile/model/ProfileLanguageModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/model/ProfileModel.d.ts +0 -26
- package/dist/typescript/commonjs/features/profile/model/ProfileModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/model/profileModal.types.d.ts +0 -14
- package/dist/typescript/commonjs/features/profile/model/profileModal.types.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/shared/JoinClassError.d.ts +0 -5
- package/dist/typescript/commonjs/features/profile/shared/JoinClassError.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/shared/profile.constants.d.ts +0 -20
- package/dist/typescript/commonjs/features/profile/shared/profile.constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/shared/profile.helpers.d.ts +0 -6
- package/dist/typescript/commonjs/features/profile/shared/profile.helpers.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/shared/profile.types.d.ts +0 -27
- package/dist/typescript/commonjs/features/profile/shared/profile.types.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/Profile.d.ts +0 -6
- package/dist/typescript/module/features/profile/Profile.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/__tests__/ProfileModel.test.d.ts +0 -2
- package/dist/typescript/module/features/profile/__tests__/ProfileModel.test.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/__tests__/profile.helpers.test.d.ts +0 -2
- package/dist/typescript/module/features/profile/__tests__/profile.helpers.test.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/actions/ProfileActions.d.ts +0 -3
- package/dist/typescript/module/features/profile/components/actions/ProfileActions.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/cards/ProfileCard.d.ts +0 -10
- package/dist/typescript/module/features/profile/components/cards/ProfileCard.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/info/AccountInfoCard.d.ts +0 -3
- package/dist/typescript/module/features/profile/components/info/AccountInfoCard.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/modals/JoinClassModal.d.ts +0 -4
- package/dist/typescript/module/features/profile/components/modals/JoinClassModal.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/modals/LogoutConfirmModal.d.ts +0 -4
- package/dist/typescript/module/features/profile/components/modals/LogoutConfirmModal.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/modals/TranslationLanguageModal.d.ts +0 -4
- package/dist/typescript/module/features/profile/components/modals/TranslationLanguageModal.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/settings/LanguageSettingsCard.d.ts +0 -3
- package/dist/typescript/module/features/profile/components/settings/LanguageSettingsCard.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/settings/PreferencesCard.d.ts +0 -3
- package/dist/typescript/module/features/profile/components/settings/PreferencesCard.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/settings/SettingRow.d.ts +0 -11
- package/dist/typescript/module/features/profile/components/settings/SettingRow.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/settings/TextSettingsCard.d.ts +0 -3
- package/dist/typescript/module/features/profile/components/settings/TextSettingsCard.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/settings/TextSizeSlider.d.ts +0 -8
- package/dist/typescript/module/features/profile/components/settings/TextSizeSlider.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/settings/TextToSpeechRow.d.ts +0 -3
- package/dist/typescript/module/features/profile/components/settings/TextToSpeechRow.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/settings/TranslationLanguageRow.d.ts +0 -3
- package/dist/typescript/module/features/profile/components/settings/TranslationLanguageRow.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/context/ProfileContext.d.ts +0 -13
- package/dist/typescript/module/features/profile/context/ProfileContext.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/index.d.ts +0 -12
- package/dist/typescript/module/features/profile/index.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/model/ProfileApi.d.ts +0 -11
- package/dist/typescript/module/features/profile/model/ProfileApi.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/model/ProfileJoinClassModel.d.ts +0 -14
- package/dist/typescript/module/features/profile/model/ProfileJoinClassModel.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/model/ProfileLanguageModel.d.ts +0 -13
- package/dist/typescript/module/features/profile/model/ProfileLanguageModel.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/model/ProfileModel.d.ts +0 -26
- package/dist/typescript/module/features/profile/model/ProfileModel.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/model/profileModal.types.d.ts +0 -14
- package/dist/typescript/module/features/profile/model/profileModal.types.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/shared/JoinClassError.d.ts +0 -5
- package/dist/typescript/module/features/profile/shared/JoinClassError.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/shared/profile.constants.d.ts +0 -20
- package/dist/typescript/module/features/profile/shared/profile.constants.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/shared/profile.helpers.d.ts +0 -6
- package/dist/typescript/module/features/profile/shared/profile.helpers.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/shared/profile.types.d.ts +0 -27
- package/dist/typescript/module/features/profile/shared/profile.types.d.ts.map +0 -1
- package/src/features/profile/Profile.tsx +0 -83
- package/src/features/profile/__tests__/ProfileModel.test.ts +0 -99
- package/src/features/profile/__tests__/profile.helpers.test.ts +0 -57
- package/src/features/profile/components/actions/ProfileActions.tsx +0 -65
- package/src/features/profile/components/cards/ProfileCard.tsx +0 -53
- package/src/features/profile/components/info/AccountInfoCard.tsx +0 -73
- package/src/features/profile/components/modals/JoinClassModal.tsx +0 -145
- package/src/features/profile/components/modals/LogoutConfirmModal.tsx +0 -64
- package/src/features/profile/components/modals/TranslationLanguageModal.tsx +0 -124
- package/src/features/profile/components/settings/LanguageSettingsCard.tsx +0 -16
- package/src/features/profile/components/settings/PreferencesCard.tsx +0 -68
- package/src/features/profile/components/settings/SettingRow.tsx +0 -42
- package/src/features/profile/components/settings/TextSettingsCard.tsx +0 -61
- package/src/features/profile/components/settings/TextSizeSlider.tsx +0 -110
- package/src/features/profile/components/settings/TextToSpeechRow.tsx +0 -24
- package/src/features/profile/components/settings/TranslationLanguageRow.tsx +0 -58
- package/src/features/profile/context/ProfileContext.tsx +0 -24
- package/src/features/profile/index.ts +0 -11
- package/src/features/profile/model/ProfileApi.ts +0 -23
- package/src/features/profile/model/ProfileJoinClassModel.ts +0 -58
- package/src/features/profile/model/ProfileLanguageModel.ts +0 -26
- package/src/features/profile/model/ProfileModel.ts +0 -57
- package/src/features/profile/model/profileModal.types.ts +0 -16
- package/src/features/profile/shared/JoinClassError.ts +0 -7
- package/src/features/profile/shared/profile.constants.ts +0 -23
- package/src/features/profile/shared/profile.helpers.ts +0 -36
- package/src/features/profile/shared/profile.types.ts +0 -34
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { useUnit } from 'effector-react';
|
|
5
|
-
import { StyleSheet, View } from 'react-native';
|
|
6
|
-
import { COLORS, HeadingVariants, InfoIcon, SPACING, Typography } from '@magmamath/react-native-ui';
|
|
7
|
-
import { useText } from "../../../../i18n/i18n.js";
|
|
8
|
-
import { useProfile } from "../../context/ProfileContext.js";
|
|
9
|
-
import { ProfileCard } from "../cards/ProfileCard.js";
|
|
10
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
const NOTE_ICON_SIZE = 20;
|
|
12
|
-
const InfoField = ({
|
|
13
|
-
label,
|
|
14
|
-
value
|
|
15
|
-
}) => /*#__PURE__*/_jsxs(View, {
|
|
16
|
-
style: styles.field,
|
|
17
|
-
children: [/*#__PURE__*/_jsx(Typography, {
|
|
18
|
-
variant: HeadingVariants.H8,
|
|
19
|
-
style: styles.label,
|
|
20
|
-
children: label
|
|
21
|
-
}), /*#__PURE__*/_jsx(Typography, {
|
|
22
|
-
variant: HeadingVariants.H6,
|
|
23
|
-
style: styles.value,
|
|
24
|
-
children: value
|
|
25
|
-
})]
|
|
26
|
-
});
|
|
27
|
-
export const AccountInfoCard = () => {
|
|
28
|
-
const t = useText();
|
|
29
|
-
const {
|
|
30
|
-
model
|
|
31
|
-
} = useProfile();
|
|
32
|
-
const user = useUnit(model.$user);
|
|
33
|
-
return /*#__PURE__*/_jsxs(ProfileCard, {
|
|
34
|
-
title: t('profile.accountInfo'),
|
|
35
|
-
children: [/*#__PURE__*/_jsx(InfoField, {
|
|
36
|
-
label: t('profile.fullName'),
|
|
37
|
-
value: user?.fullName ?? ''
|
|
38
|
-
}), /*#__PURE__*/_jsx(InfoField, {
|
|
39
|
-
label: t('profile.username'),
|
|
40
|
-
value: user?.username ?? ''
|
|
41
|
-
}), /*#__PURE__*/_jsx(InfoField, {
|
|
42
|
-
label: t('profile.school'),
|
|
43
|
-
value: user?.schoolName ?? ''
|
|
44
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
45
|
-
style: styles.noteDivider
|
|
46
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
47
|
-
style: styles.note,
|
|
48
|
-
children: [/*#__PURE__*/_jsx(InfoIcon, {
|
|
49
|
-
size: NOTE_ICON_SIZE,
|
|
50
|
-
color: COLORS.NEUTRAL_7
|
|
51
|
-
}), /*#__PURE__*/_jsx(Typography, {
|
|
52
|
-
variant: HeadingVariants.H8,
|
|
53
|
-
style: styles.noteText,
|
|
54
|
-
children: t('profile.changePasswordNote')
|
|
55
|
-
})]
|
|
56
|
-
})]
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
const styles = StyleSheet.create({
|
|
60
|
-
field: {
|
|
61
|
-
gap: SPACING['100']
|
|
62
|
-
},
|
|
63
|
-
label: {
|
|
64
|
-
color: COLORS.NEUTRAL_7
|
|
65
|
-
},
|
|
66
|
-
value: {
|
|
67
|
-
color: COLORS.NEUTRAL_9
|
|
68
|
-
},
|
|
69
|
-
noteDivider: {
|
|
70
|
-
backgroundColor: COLORS.NEUTRAL_3,
|
|
71
|
-
height: 1,
|
|
72
|
-
marginHorizontal: SPACING['100']
|
|
73
|
-
},
|
|
74
|
-
note: {
|
|
75
|
-
alignItems: 'center',
|
|
76
|
-
flexDirection: 'row',
|
|
77
|
-
gap: SPACING['200']
|
|
78
|
-
},
|
|
79
|
-
noteText: {
|
|
80
|
-
color: COLORS.NEUTRAL_7,
|
|
81
|
-
flexShrink: 1
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
//# sourceMappingURL=AccountInfoCard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useUnit","StyleSheet","View","COLORS","HeadingVariants","InfoIcon","SPACING","Typography","useText","useProfile","ProfileCard","jsx","_jsx","jsxs","_jsxs","NOTE_ICON_SIZE","InfoField","label","value","style","styles","field","children","variant","H8","H6","AccountInfoCard","t","model","user","$user","title","fullName","username","schoolName","noteDivider","note","size","color","NEUTRAL_7","noteText","create","gap","NEUTRAL_9","backgroundColor","NEUTRAL_3","height","marginHorizontal","alignItems","flexDirection","flexShrink"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/info/AccountInfoCard.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,UAAU,EAAEC,IAAI,QAAQ,cA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,EAAE;IACRF,KAAK,EAAEnC,MAAM,CAACoC,SAAS;IACvBW,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React, { useEffect } from 'react';
|
|
4
|
-
import { StyleSheet, Text, useWindowDimensions, View } from 'react-native';
|
|
5
|
-
import { useUnit } from 'effector-react';
|
|
6
|
-
import { CodeField, Cursor, useClearByFocusCell } from 'react-native-confirmation-code-field';
|
|
7
|
-
import { BaseModal, ButtonColor, ButtonSize, ButtonVariant, COLORS, FONT_FAMILY, ReanimatedButton, SPACING } from '@magmamath/react-native-ui';
|
|
8
|
-
import { useText } from "../../../../i18n/i18n.js";
|
|
9
|
-
import { CLASS_CODE_LENGTH } from "../../shared/profile.constants.js";
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
const CODE_PLACEHOLDER = '0';
|
|
12
|
-
const MAX_MODAL_WIDTH = 1044;
|
|
13
|
-
const SCREEN_MARGIN = 48;
|
|
14
|
-
const CELL_GAP = SPACING['400'];
|
|
15
|
-
const MODAL_H_PADDING = SPACING['800'];
|
|
16
|
-
const CELL_ASPECT = 0.95;
|
|
17
|
-
const CELL_RADIUS_RATIO = 0.24; // 36 / 150 in the design
|
|
18
|
-
const CELL_FONT_RATIO = 0.42; // 64 / 150 in the design
|
|
19
|
-
const MAX_CELL_RADIUS = 36;
|
|
20
|
-
export const JoinClassModal = ({
|
|
21
|
-
modal: {
|
|
22
|
-
closeModal,
|
|
23
|
-
params
|
|
24
|
-
}
|
|
25
|
-
}) => {
|
|
26
|
-
const t = useText();
|
|
27
|
-
const {
|
|
28
|
-
model
|
|
29
|
-
} = params;
|
|
30
|
-
const {
|
|
31
|
-
width
|
|
32
|
-
} = useWindowDimensions();
|
|
33
|
-
const {
|
|
34
|
-
code,
|
|
35
|
-
isComplete,
|
|
36
|
-
isPending
|
|
37
|
-
} = useUnit({
|
|
38
|
-
code: model.joinClass.$code,
|
|
39
|
-
isComplete: model.joinClass.$isComplete,
|
|
40
|
-
isPending: model.api.joinClassFx.pending
|
|
41
|
-
});
|
|
42
|
-
const modalWidth = Math.min(MAX_MODAL_WIDTH, width - SCREEN_MARGIN);
|
|
43
|
-
const cellSize = (modalWidth - MODAL_H_PADDING * 2 - CELL_GAP * (CLASS_CODE_LENGTH - 1)) / CLASS_CODE_LENGTH;
|
|
44
|
-
const cellRadius = Math.min(MAX_CELL_RADIUS, cellSize * CELL_RADIUS_RATIO);
|
|
45
|
-
const cellFontSize = cellSize * CELL_FONT_RATIO;
|
|
46
|
-
const setCode = value => model.joinClass.setCode(value.toUpperCase());
|
|
47
|
-
const [cellProps, getCellOnLayoutHandler] = useClearByFocusCell({
|
|
48
|
-
value: code,
|
|
49
|
-
setValue: setCode
|
|
50
|
-
});
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
const subscription = model.api.joinClassFx.finally.watch(() => {
|
|
53
|
-
model.joinClass.reset();
|
|
54
|
-
closeModal();
|
|
55
|
-
});
|
|
56
|
-
return () => subscription.unsubscribe();
|
|
57
|
-
}, [model, closeModal]);
|
|
58
|
-
const closeAndReset = () => {
|
|
59
|
-
model.joinClass.reset();
|
|
60
|
-
closeModal();
|
|
61
|
-
};
|
|
62
|
-
return /*#__PURE__*/_jsx(BaseModal, {
|
|
63
|
-
onClose: closeAndReset,
|
|
64
|
-
style: {
|
|
65
|
-
container: [styles.modal, {
|
|
66
|
-
width: modalWidth
|
|
67
|
-
}]
|
|
68
|
-
},
|
|
69
|
-
header: t('profile.joinClassTitle'),
|
|
70
|
-
content: /*#__PURE__*/_jsx(CodeField, {
|
|
71
|
-
...cellProps,
|
|
72
|
-
nativeID: "join-class-code",
|
|
73
|
-
value: code,
|
|
74
|
-
onChangeText: setCode,
|
|
75
|
-
cellCount: CLASS_CODE_LENGTH,
|
|
76
|
-
rootStyle: styles.codeRoot,
|
|
77
|
-
autoFocus: true,
|
|
78
|
-
autoComplete: "off",
|
|
79
|
-
textContentType: "oneTimeCode",
|
|
80
|
-
keyboardType: "default",
|
|
81
|
-
renderCell: ({
|
|
82
|
-
index,
|
|
83
|
-
symbol,
|
|
84
|
-
isFocused
|
|
85
|
-
}) => {
|
|
86
|
-
const isPlaceholder = !symbol && !isFocused;
|
|
87
|
-
return /*#__PURE__*/_jsx(View, {
|
|
88
|
-
style: [styles.cell, {
|
|
89
|
-
borderRadius: cellRadius,
|
|
90
|
-
width: cellSize
|
|
91
|
-
}],
|
|
92
|
-
onLayout: getCellOnLayoutHandler(index),
|
|
93
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
94
|
-
style: [styles.cellText, {
|
|
95
|
-
fontSize: cellFontSize
|
|
96
|
-
}, isPlaceholder && styles.cellPlaceholder],
|
|
97
|
-
children: symbol || (isFocused ? /*#__PURE__*/_jsx(Cursor, {}) : CODE_PLACEHOLDER)
|
|
98
|
-
})
|
|
99
|
-
}, index);
|
|
100
|
-
}
|
|
101
|
-
}),
|
|
102
|
-
footer: /*#__PURE__*/_jsx(ReanimatedButton, {
|
|
103
|
-
variant: ButtonVariant.PRIMARY,
|
|
104
|
-
colorScheme: ButtonColor.ORANGE,
|
|
105
|
-
size: ButtonSize.LARGE,
|
|
106
|
-
onPress: () => model.joinClass.submit(),
|
|
107
|
-
disabled: !isComplete || isPending,
|
|
108
|
-
isLoading: isPending,
|
|
109
|
-
style: buttonStyle,
|
|
110
|
-
children: t('profile.joinClassButton')
|
|
111
|
-
})
|
|
112
|
-
});
|
|
113
|
-
};
|
|
114
|
-
const styles = StyleSheet.create({
|
|
115
|
-
modal: {
|
|
116
|
-
gap: SPACING['800'],
|
|
117
|
-
paddingHorizontal: MODAL_H_PADDING
|
|
118
|
-
},
|
|
119
|
-
codeRoot: {
|
|
120
|
-
flexDirection: 'row',
|
|
121
|
-
gap: CELL_GAP,
|
|
122
|
-
justifyContent: 'center'
|
|
123
|
-
},
|
|
124
|
-
cell: {
|
|
125
|
-
alignItems: 'center',
|
|
126
|
-
aspectRatio: CELL_ASPECT,
|
|
127
|
-
backgroundColor: COLORS.NEUTRAL_1,
|
|
128
|
-
borderColor: COLORS.NEUTRAL_5,
|
|
129
|
-
borderWidth: 3,
|
|
130
|
-
justifyContent: 'center'
|
|
131
|
-
},
|
|
132
|
-
cellText: {
|
|
133
|
-
color: COLORS.NEUTRAL_9,
|
|
134
|
-
fontFamily: FONT_FAMILY.buenosAiresSemiBold,
|
|
135
|
-
textAlign: 'center'
|
|
136
|
-
},
|
|
137
|
-
cellPlaceholder: {
|
|
138
|
-
color: COLORS.NEUTRAL_5
|
|
139
|
-
},
|
|
140
|
-
text: {
|
|
141
|
-
textTransform: 'uppercase'
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
const buttonStyle = {
|
|
145
|
-
text: styles.text
|
|
146
|
-
};
|
|
147
|
-
//# sourceMappingURL=JoinClassModal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","StyleSheet","Text","useWindowDimensions","View","useUnit","CodeField","Cursor","useClearByFocusCell","BaseModal","ButtonColor","ButtonSize","ButtonVariant","COLORS","FONT_FAMILY","ReanimatedButton","SPACING","useText","CLASS_CODE_LENGTH","jsx","_jsx","CODE_PLACEHOLDER","MAX_MODAL_WIDTH","SCREEN_MARGIN","CELL_GAP","MODAL_H_PADDING","CELL_ASPECT","CELL_RADIUS_RATIO","CELL_FONT_RATIO","MAX_CELL_RADIUS","JoinClassModal","modal","closeModal","params","t","model","width","code","isComplete","isPending","joinClass","$code","$isComplete","api","joinClassFx","pending","modalWidth","Math","min","cellSize","cellRadius","cellFontSize","setCode","value","toUpperCase","cellProps","getCellOnLayoutHandler","setValue","subscription","finally","watch","reset","unsubscribe","closeAndReset","onClose","style","container","styles","header","content","nativeID","onChangeText","cellCount","rootStyle","codeRoot","autoFocus","autoComplete","textContentType","keyboardType","renderCell","index","symbol","isFocused","isPlaceholder","cell","borderRadius","onLayout","children","cellText","fontSize","cellPlaceholder","footer","variant","PRIMARY","colorScheme","ORANGE","size","LARGE","onPress","submit","disabled","isLoading","buttonStyle","create","gap","paddingHorizontal","flexDirection","justifyContent","alignItems","aspectRatio","backgroundColor","NEUTRAL_1","borderColor","NEUTRAL_5","borderWidth","color","NEUTRAL_9","fontFamily","buenosAiresSemiBold","textAlign","text","textTransform"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/modals/JoinClassModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,UAAU,EAAEC,IAAI,EAAEC,mBAAmB,EAAEC,IAAI,QAAQ,cAAc;AAC1E,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,SAAS,EAAEC,MAAM,EAAEC,mBAAmB,QAAQ,sCAAsC;AAC7F,SACEC,SAAS,EACTC,WAAW,EACXC,UAAU,EACVC,aAAa,EACbC,MAAM,EACNC,WAAW,EACXC,gBAAgB,EAChBC,OAAO,QACF,4BAA4B;AAEnC,SAASC,OAAO,QAAQ,0BAAuB;AAC/C,SAASC,iBAAiB,QAAQ,mCAAgC;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAGlE,MAAMC,gBAAgB,GAAG,GAAG;AAC5B,MAAMC,eAAe,GAAG,IAAI;AAC5B,MAAMC,aAAa,GAAG,EAAE;AACxB,MAAMC,QAAQ,GAAGR,OAAO,CAAC,KAAK,CAAC;AAC/B,MAAMS,eAAe,GAAGT,OAAO,CAAC,KAAK,CAAC;AACtC,MAAMU,WAAW,GAAG,IAAI;AACxB,MAAMC,iBAAiB,GAAG,IAAI,EAAC;AAC/B,MAAMC,eAAe,GAAG,IAAI,EAAC;AAC7B,MAAMC,eAAe,GAAG,EAAE;AAE1B,OAAO,MAAMC,cAAc,GAAGA,CAAC;EAAEC,KAAK,EAAE;IAAEC,UAAU;IAAEC;EAAO;AAAqB,CAAC,KAAK;EACtF,MAAMC,CAAC,GAAGjB,OAAO,CAAC,CAAC;EACnB,MA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AE;IACfyB,KAAK,EAAEtG,MAAM,CAACoG;EAChB,CAAC;EACDO,IAAI,EAAE;IACJC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAEF,MAAMnB,WAAW,GAAG;EAAEkB,IAAI,EAAErD,MAAM,CAACqD;AAAK,CAAC","ignoreList":[]}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { StyleSheet } from 'react-native';
|
|
5
|
-
import { BaseModal, Button, ButtonColor, ButtonSize, ButtonVariant } from '@magmamath/react-native-ui';
|
|
6
|
-
import { useText } from "../../../../i18n/i18n.js";
|
|
7
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
-
export const LogoutConfirmModal = ({
|
|
9
|
-
modal: {
|
|
10
|
-
closeModal,
|
|
11
|
-
params
|
|
12
|
-
}
|
|
13
|
-
}) => {
|
|
14
|
-
const t = useText();
|
|
15
|
-
const confirm = () => {
|
|
16
|
-
closeModal();
|
|
17
|
-
params.onConfirm();
|
|
18
|
-
};
|
|
19
|
-
return /*#__PURE__*/_jsx(BaseModal, {
|
|
20
|
-
onClose: closeModal,
|
|
21
|
-
style: modalStyle,
|
|
22
|
-
header: t('profile.logOut'),
|
|
23
|
-
content: t('profile.logOutConfirmMessage'),
|
|
24
|
-
footer: /*#__PURE__*/_jsxs(_Fragment, {
|
|
25
|
-
children: [/*#__PURE__*/_jsx(Button, {
|
|
26
|
-
variant: ButtonVariant.TERTIARY,
|
|
27
|
-
size: ButtonSize.LARGE,
|
|
28
|
-
onPress: closeModal,
|
|
29
|
-
style: buttonTextStyle,
|
|
30
|
-
children: t('profile.cancel')
|
|
31
|
-
}), /*#__PURE__*/_jsx(Button, {
|
|
32
|
-
colorScheme: ButtonColor.ORANGE,
|
|
33
|
-
size: ButtonSize.LARGE,
|
|
34
|
-
onPress: confirm,
|
|
35
|
-
style: buttonTextStyle,
|
|
36
|
-
children: t('profile.yes')
|
|
37
|
-
})]
|
|
38
|
-
})
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
const styles = StyleSheet.create({
|
|
42
|
-
modal: {
|
|
43
|
-
width: 530
|
|
44
|
-
},
|
|
45
|
-
uppercase: {
|
|
46
|
-
textTransform: 'uppercase'
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
const modalStyle = {
|
|
50
|
-
container: styles.modal
|
|
51
|
-
};
|
|
52
|
-
const buttonTextStyle = {
|
|
53
|
-
text: styles.uppercase
|
|
54
|
-
};
|
|
55
|
-
//# sourceMappingURL=LogoutConfirmModal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","BaseModal","Button","ButtonColor","ButtonSize","ButtonVariant","useText","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","LogoutConfirmModal","modal","closeModal","params","t","confirm","onConfirm","onClose","style","modalStyle","header","content","footer","children","variant","TERTIARY","size","LARGE","onPress","buttonTextStyle","colorScheme","ORANGE","styles","create","width","uppercase","textTransform","container","text"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/modals/LogoutConfirmModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,cAAc;AACzC,SACEC,SAAS,EACTC,MAAM,EACNC,WAAW,EACXC,UAAU,EACVC,aAAa,QACR,4BAA4B;AAEnC,SAASC,OAAO,QAAQ,0BAAuB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAG/C,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EACjCC,KAAK,EAAE;IAAEC,UAAU;IAAEC;EAAO;AACQ,CAAC,KAAK;EAC1C,MAAMC,CAAC,GAAGX,OAAO,CAAC,CAAC;EAEnB,MAAMY,OAAO,GAAGA,CAAA,KAAM;IACpBH,UAAU,CAAC,CAAC;IACZC,MAAM,CAACG,SAAS,CAAC,CAAC;EACpB,CAAC;EAED,oBACEX,IAAA,CAACP,SAAS;IACRmB,OAAO,EAAEL,UAAW;IACpBM,KAAK,EAAEC,UAAW;IAClBC,MAAM,EAAEN,CAAC,CAAC,gBAAgB,CAAE;IAC5BO,OAAO,EAAEP,CAAC,CAAC,8BAA8B,CAAE;IAC3CQ,MAAM,eACJb,KAAA,CAAAF,SAAA;MAAAgB,QAAA,gBACElB,IAAA,CAACN,MAAM;QACLyB,OAAO,EAAEtB,aAAa,CAACuB,QAAS;QAChCC,IAAI,EAAEzB,UAAU,CAAC0B,KAAM;QACvBC,OAAO,EAAEhB,UAAW;QACpBM,KAAK,EAAEW,eAAgB;QAAAN,QAAA,EAEtBT,CAAC,CAAC,gBAAgB;MAAC,CACd,CAAC,eACTT,IAAA,CAACN,MAAM;QACL+B,WAAW,EAAE9B,WAAW,CAAC+B,MAAO;QAChCL,IAAI,EAAEzB,UAAU,CAAC0B,KAAM;QACvBC,OAAO,EAAEb,OAAQ;QACjBG,KAAK,EAAEW,eAAgB;QAAAN,QAAA,EAEtBT,CAAC,CAAC,aAAa;MAAC,CACX,CAAC;IAAA,CACT;EACH,CACF,CAAC;AAEN,CAAC;AAED,MAAMkB,MAAM,GAAGnC,UAAU,CAACoC,MAAM,CAAC;EAC/BtB,KAAK,EAAE;IACLuB,KAAK,EAAE;EACT,CAAC;EACDC,SAAS,EAAE;IACTC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAEF,MAAMjB,UAAU,GAAG;EAAEkB,SAAS,EAAEL,MAAM,CAACrB;AAAM,CAAC;AAC9C,MAAMkB,eAAe,GAAG;EAAES,IAAI,EAAEN,MAAM,CAACG;AAAU,CAAC","ignoreList":[]}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { StyleSheet, View } from 'react-native';
|
|
5
|
-
import { useUnit } from 'effector-react';
|
|
6
|
-
import { BaseModal, Checkbox, CheckboxColor, CheckboxGroup, COLORS, HeadingVariants, Search, SPACING, Typography } from '@magmamath/react-native-ui';
|
|
7
|
-
import { useText } from "../../../../i18n/i18n.js";
|
|
8
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
const LIST_HEIGHT = 360;
|
|
10
|
-
export const TranslationLanguageModal = ({
|
|
11
|
-
modal: {
|
|
12
|
-
closeModal,
|
|
13
|
-
params
|
|
14
|
-
}
|
|
15
|
-
}) => {
|
|
16
|
-
const t = useText();
|
|
17
|
-
const {
|
|
18
|
-
model
|
|
19
|
-
} = params;
|
|
20
|
-
const {
|
|
21
|
-
search,
|
|
22
|
-
languages,
|
|
23
|
-
settings
|
|
24
|
-
} = useUnit({
|
|
25
|
-
search: model.language.$search,
|
|
26
|
-
languages: model.language.$languages,
|
|
27
|
-
settings: model.$settings
|
|
28
|
-
});
|
|
29
|
-
const closeAndReset = () => {
|
|
30
|
-
model.language.reset();
|
|
31
|
-
closeModal();
|
|
32
|
-
};
|
|
33
|
-
const selectLanguage = language => {
|
|
34
|
-
model.language.selectLanguage(language);
|
|
35
|
-
closeAndReset();
|
|
36
|
-
};
|
|
37
|
-
const items = languages.map(language => ({
|
|
38
|
-
id: language,
|
|
39
|
-
label: language,
|
|
40
|
-
radio: true,
|
|
41
|
-
color: CheckboxColor.ORANGE
|
|
42
|
-
}));
|
|
43
|
-
const selectedItems = items.filter(item => item.id === settings.translationLanguage);
|
|
44
|
-
return /*#__PURE__*/_jsx(BaseModal, {
|
|
45
|
-
onClose: closeAndReset,
|
|
46
|
-
style: modalStyle,
|
|
47
|
-
header: /*#__PURE__*/_jsxs(View, {
|
|
48
|
-
style: styles.header,
|
|
49
|
-
children: [/*#__PURE__*/_jsx(Typography, {
|
|
50
|
-
variant: HeadingVariants.H2,
|
|
51
|
-
align: "center",
|
|
52
|
-
style: styles.title,
|
|
53
|
-
children: t('profile.translationModalTitle')
|
|
54
|
-
}), /*#__PURE__*/_jsx(Search, {
|
|
55
|
-
nativeID: "translation-language-search",
|
|
56
|
-
value: search,
|
|
57
|
-
onChangeText: model.language.setSearch,
|
|
58
|
-
placeholder: t('profile.search'),
|
|
59
|
-
containerStyle: styles.search
|
|
60
|
-
})]
|
|
61
|
-
}),
|
|
62
|
-
content: /*#__PURE__*/_jsxs(View, {
|
|
63
|
-
style: styles.content,
|
|
64
|
-
children: [/*#__PURE__*/_jsx(Checkbox, {
|
|
65
|
-
radio: true,
|
|
66
|
-
label: t('profile.noLanguage'),
|
|
67
|
-
checked: !settings.translationLanguage,
|
|
68
|
-
color: CheckboxColor.ORANGE,
|
|
69
|
-
style: noLanguageStyle,
|
|
70
|
-
onPress: () => selectLanguage(null)
|
|
71
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
72
|
-
style: styles.divider
|
|
73
|
-
}), /*#__PURE__*/_jsx(CheckboxGroup, {
|
|
74
|
-
items: items,
|
|
75
|
-
selectedItems: selectedItems,
|
|
76
|
-
initialNumToRender: items.length,
|
|
77
|
-
style: listStyle,
|
|
78
|
-
onPress: item => selectLanguage(languages.find(language => language === item.id) ?? null)
|
|
79
|
-
})]
|
|
80
|
-
})
|
|
81
|
-
});
|
|
82
|
-
};
|
|
83
|
-
const styles = StyleSheet.create({
|
|
84
|
-
modal: {
|
|
85
|
-
width: 530
|
|
86
|
-
},
|
|
87
|
-
header: {
|
|
88
|
-
gap: SPACING['500']
|
|
89
|
-
},
|
|
90
|
-
title: {
|
|
91
|
-
color: COLORS.NEUTRAL_9
|
|
92
|
-
},
|
|
93
|
-
search: {
|
|
94
|
-
width: '100%'
|
|
95
|
-
},
|
|
96
|
-
content: {
|
|
97
|
-
gap: SPACING['300']
|
|
98
|
-
},
|
|
99
|
-
noLanguage: {
|
|
100
|
-
paddingLeft: SPACING['200']
|
|
101
|
-
},
|
|
102
|
-
divider: {
|
|
103
|
-
backgroundColor: COLORS.NEUTRAL_3,
|
|
104
|
-
height: 1
|
|
105
|
-
},
|
|
106
|
-
list: {
|
|
107
|
-
height: LIST_HEIGHT,
|
|
108
|
-
width: '100%'
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
const modalStyle = {
|
|
112
|
-
container: styles.modal
|
|
113
|
-
};
|
|
114
|
-
const noLanguageStyle = {
|
|
115
|
-
container: styles.noLanguage
|
|
116
|
-
};
|
|
117
|
-
const listStyle = {
|
|
118
|
-
container: styles.list
|
|
119
|
-
};
|
|
120
|
-
//# sourceMappingURL=TranslationLanguageModal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","useUnit","BaseModal","Checkbox","CheckboxColor","CheckboxGroup","COLORS","HeadingVariants","Search","SPACING","Typography","useText","jsx","_jsx","jsxs","_jsxs","LIST_HEIGHT","TranslationLanguageModal","modal","closeModal","params","t","model","search","languages","settings","language","$search","$languages","$settings","closeAndReset","reset","selectLanguage","items","map","id","label","radio","color","ORANGE","selectedItems","filter","item","translationLanguage","onClose","style","modalStyle","header","styles","children","variant","H2","align","title","nativeID","value","onChangeText","setSearch","placeholder","containerStyle","content","checked","noLanguageStyle","onPress","divider","initialNumToRender","length","listStyle","find","create","width","gap","NEUTRAL_9","noLanguage","paddingLeft","backgroundColor","NEUTRAL_3","height","list","container"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/modals/TranslationLanguageModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,OAAO,QAAQ,gBAAgB;AAExC,SACEC,SAAS,EACTC,QAAQ,EACRC,aAAa,EACbC,aAAa,EACbC,MAAM,EACNC,eAAe,EACfC,MAAM,EACNC,OAAO,EACPC,UAAU,QACL,4BAA4B;AAEnC,SAASC,OAAO,QAAQ,0BAAuB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG/C,MAAMC,WAAW,GAAG,GAAG;AAEv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AU,CAACsE,MAAM,CAAC;EAC/BnD,KAAK,EAAE;IACLoD,KAAK,EAAE;EACT,CAAC;EACDvB,MAAM,EAAE;IACNwB,GAAG,EAAE9D,OAAO,CAAC,KAAK;EACpB,CAAC;EACD4C,KAAK,EAAE;IACLf,KAAK,EAAEhC,MAAM,CAACkE;EAChB,CAAC;EACDjD,MAAM,EAAE;IACN+C,KAAK,EAAE;EACT,CAAC;EACDV,OAAO,EAAE;IACPW,GAAG,EAAE9D,OAAO,CAAC,KAAK;EACpB,CAAC;EACDgE,UAAU,EAAE;IACVC,WAAW,EAAEjE,OAAO,CAAC,KAAK;EAC5B,CAAC;EACDuD,OAAO,EAAE;IACPW,eAAe,EAAErE,MAAM,CAACsE,SAAS;IACjCC,MAAM,EAAE;EACV,CAAC;EACDC,IAAI,EAAE;IACJD,MAAM,EAAE7D,WAAW;IACnBsD,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,MAAMxB,UAAU,GAAG;EAAEiC,SAAS,EAAE/B,MAAM,CAAC9B;AAAM,CAAC;AAC9C,MAAM4C,eAAe,GAAG;EAAEiB,SAAS,EAAE/B,MAAM,CAACyB;AAAW,CAAC;AACxD,MAAMN,SAAS,GAAG;EAAEY,SAAS,EAAE/B,MAAM,CAAC8B;AAAK,CAAC","ignoreList":[]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { useText } from "../../../../i18n/i18n.js";
|
|
5
|
-
import { ProfileCard } from "../cards/ProfileCard.js";
|
|
6
|
-
import { TextToSpeechRow } from "./TextToSpeechRow.js";
|
|
7
|
-
import { TranslationLanguageRow } from "./TranslationLanguageRow.js";
|
|
8
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
export const LanguageSettingsCard = () => {
|
|
10
|
-
const t = useText();
|
|
11
|
-
return /*#__PURE__*/_jsxs(ProfileCard, {
|
|
12
|
-
title: t('profile.languageSettings'),
|
|
13
|
-
children: [/*#__PURE__*/_jsx(TextToSpeechRow, {}), /*#__PURE__*/_jsx(TranslationLanguageRow, {})]
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=LanguageSettingsCard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useText","ProfileCard","TextToSpeechRow","TranslationLanguageRow","jsx","_jsx","jsxs","_jsxs","LanguageSettingsCard","t","title","children"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/settings/LanguageSettingsCard.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,QAAQ,0BAAuB;AAC/C,SAASC,WAAW,QAAQ,yBAAsB;AAClD,SAASC,eAAe,QAAQ,sBAAmB;AACnD,SAASC,sBAAsB,QAAQ,6BAA0B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEjE,OAAO,MAAMC,oBAAoB,GAAGA,CAAA,KAAM;EACxC,MAAMC,CAAC,GAAGT,OAAO,CAAC,CAAC;EAEnB,oBACEO,KAAA,CAACN,WAAW;IAACS,KAAK,EAAED,CAAC,CAAC,0BAA0B,CAAE;IAAAE,QAAA,gBAChDN,IAAA,CAACH,eAAe,IAAE,CAAC,eACnBG,IAAA,CAACF,sBAAsB,IAAE,CAAC;EAAA,CACf,CAAC;AAElB,CAAC","ignoreList":[]}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { StyleSheet, View } from 'react-native';
|
|
5
|
-
import { useUnit } from 'effector-react';
|
|
6
|
-
import { CalculatorIcon, COLORS, PencilIcon, SelectGroup, SelectOptionColor } from '@magmamath/react-native-ui';
|
|
7
|
-
import { useText } from "../../../../i18n/i18n.js";
|
|
8
|
-
import { useProfile } from "../../context/ProfileContext.js";
|
|
9
|
-
import { ProfileCanvasType } from "../../shared/profile.constants.js";
|
|
10
|
-
import { ProfileCard } from "../cards/ProfileCard.js";
|
|
11
|
-
import { SettingRow } from "./SettingRow.js";
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
const ICON_SIZE = 22;
|
|
14
|
-
const CONTROL_MAX_WIDTH = 248;
|
|
15
|
-
|
|
16
|
-
// Pass the glyph via `title` (children), not `icon`: an icon-only Button locks to a fixed
|
|
17
|
-
// square and collapses the SelectOption's flex stretch.
|
|
18
|
-
// TODO: replace CalculatorIcon with a dedicated KeyboardIcon once rn-ui ships one.
|
|
19
|
-
const CANVAS_OPTIONS = [{
|
|
20
|
-
key: String(ProfileCanvasType.DRAWING),
|
|
21
|
-
title: /*#__PURE__*/_jsx(PencilIcon, {
|
|
22
|
-
size: ICON_SIZE,
|
|
23
|
-
color: COLORS.NEUTRAL_9
|
|
24
|
-
})
|
|
25
|
-
}, {
|
|
26
|
-
key: String(ProfileCanvasType.SPREADSHEET),
|
|
27
|
-
title: /*#__PURE__*/_jsx(CalculatorIcon, {
|
|
28
|
-
size: ICON_SIZE,
|
|
29
|
-
color: COLORS.NEUTRAL_9
|
|
30
|
-
})
|
|
31
|
-
}];
|
|
32
|
-
export const PreferencesCard = () => {
|
|
33
|
-
const t = useText();
|
|
34
|
-
const {
|
|
35
|
-
model
|
|
36
|
-
} = useProfile();
|
|
37
|
-
const settings = useUnit(model.$settings);
|
|
38
|
-
return /*#__PURE__*/_jsx(ProfileCard, {
|
|
39
|
-
title: t('profile.preferences'),
|
|
40
|
-
children: /*#__PURE__*/_jsx(SettingRow, {
|
|
41
|
-
label: t('profile.solveMode'),
|
|
42
|
-
children: /*#__PURE__*/_jsx(View, {
|
|
43
|
-
style: styles.control,
|
|
44
|
-
children: /*#__PURE__*/_jsx(SelectGroup, {
|
|
45
|
-
color: SelectOptionColor.GREY,
|
|
46
|
-
options: CANVAS_OPTIONS,
|
|
47
|
-
selectedOptions: CANVAS_OPTIONS.filter(({
|
|
48
|
-
key
|
|
49
|
-
}) => key === String(settings.canvasType)),
|
|
50
|
-
onOptionChange: ({
|
|
51
|
-
key
|
|
52
|
-
}) => model.setCanvasType(key === String(ProfileCanvasType.SPREADSHEET) ? ProfileCanvasType.SPREADSHEET : ProfileCanvasType.DRAWING)
|
|
53
|
-
})
|
|
54
|
-
})
|
|
55
|
-
})
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
const styles = StyleSheet.create({
|
|
59
|
-
control: {
|
|
60
|
-
flex: 1,
|
|
61
|
-
maxWidth: CONTROL_MAX_WIDTH
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
//# sourceMappingURL=PreferencesCard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","useUnit","CalculatorIcon","COLORS","PencilIcon","SelectGroup","SelectOptionColor","useText","useProfile","ProfileCanvasType","ProfileCard","SettingRow","jsx","_jsx","ICON_SIZE","CONTROL_MAX_WIDTH","CANVAS_OPTIONS","key","String","DRAWING","title","size","color","NEUTRAL_9","SPREADSHEET","PreferencesCard","t","model","settings","$settings","children","label","style","styles","control","GREY","options","selectedOptions","filter","canvasType","onOptionChange","setCanvasType","create","flex","maxWidth"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/settings/PreferencesCard.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SACEC,cAAc,EACdC,MAAM,EACNC,UAAU,EACVC,WAAW,EACXC,iBAAiB,QAEZ,4BAA4B;AAEnC,SAASC,OAAO,QAAQ,0BAAuB;AAC/C,SAASC,UAAU,QAAQ,iCAA8B;AACzD,SAASC,iBAAiB,QAAQ,mCAAgC;AAClE,SAASC,WAAW,QAAQ,yBAAsB;AAClD,SAASC,UAAU,QAAQ,iBAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEzC,M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UAAI,CAAC,KACtBU,KAAK,CAACc,aAAa,CACjBxB,GAAG,KAAKC,MAAM,CAACT,iBAAiB,CAACe,WAAW,CAAC,GACzCf,iBAAiB,CAACe,WAAW,GAC7Bf,iBAAiB,CAACU,OACxB;QACD,CACF;MAAC,CACE;IAAC,CACG;EAAC,CACF,CAAC;AAElB,CAAC;AAED,MAAMc,MAAM,GAAGlC,UAAU,CAAC2C,MAAM,CAAC;EAC/BR,OAAO,EAAE;IACPS,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE7B;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { StyleSheet, View } from 'react-native';
|
|
5
|
-
import { COLORS, HeadingVariants, SPACING, Typography } from '@magmamath/react-native-ui';
|
|
6
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
export const SettingRow = ({
|
|
8
|
-
icon,
|
|
9
|
-
label,
|
|
10
|
-
children,
|
|
11
|
-
style
|
|
12
|
-
}) => /*#__PURE__*/_jsxs(View, {
|
|
13
|
-
style: [styles.row, style],
|
|
14
|
-
children: [/*#__PURE__*/_jsxs(View, {
|
|
15
|
-
style: styles.labelGroup,
|
|
16
|
-
children: [icon, /*#__PURE__*/_jsx(Typography, {
|
|
17
|
-
variant: HeadingVariants.H8,
|
|
18
|
-
style: styles.label,
|
|
19
|
-
children: label
|
|
20
|
-
})]
|
|
21
|
-
}), children]
|
|
22
|
-
});
|
|
23
|
-
const styles = StyleSheet.create({
|
|
24
|
-
row: {
|
|
25
|
-
alignItems: 'center',
|
|
26
|
-
flexDirection: 'row',
|
|
27
|
-
gap: SPACING['400'],
|
|
28
|
-
justifyContent: 'space-between',
|
|
29
|
-
padding: SPACING['200']
|
|
30
|
-
},
|
|
31
|
-
labelGroup: {
|
|
32
|
-
alignItems: 'center',
|
|
33
|
-
flexDirection: 'row',
|
|
34
|
-
flexShrink: 1,
|
|
35
|
-
gap: SPACING['200']
|
|
36
|
-
},
|
|
37
|
-
label: {
|
|
38
|
-
color: COLORS.NEUTRAL_9,
|
|
39
|
-
flexShrink: 1
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
//# sourceMappingURL=SettingRow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","COLORS","HeadingVariants","SPACING","Typography","jsx","_jsx","jsxs","_jsxs","SettingRow","icon","label","children","style","styles","row","labelGroup","variant","H8","create","alignItems","flexDirection","gap","justifyContent","padding","flexShrink","color","NEUTRAL_9"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/settings/SettingRow.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAqB,OAAO;AACxC,SAAoBC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AACrE,SAASC,MAAM,EAAEC,eAAe,EAAEC,OAAO,EAAEC,UAAU,QAAQ,4BAA4B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AASzF,OAAO,MAAMC,UAAU,GAAGA,CAAC;EAAEC,IAAI;EAAEC,KAAK;EAAEC,QAAQ;EAAEC;AAAuB,CAAC,kBAC1EL,KAAA,CAACR,IAAI;EAACa,KAAK,EAAE,CAACC,MAAM,CAACC,GAAG,EAAEF,KAAK,CAAE;EAAAD,QAAA,gBAC/BJ,KAAA,CAACR,IAAI;IAACa,KAAK,EAAEC,MAAM,CAACE,UAAW;IAAAJ,QAAA,GAC5BF,IAAI,eACLJ,IAAA,CAACF,UAAU;MAACa,OAAO,EAAEf,eAAe,CAACgB,EAAG;MAACL,KAAK,EAAEC,MAAM,CAACH,KAAM;MAAAC,QAAA,EAC1DD;IAAK,CACI,CAAC;EAAA,CACT,CAAC,EACNC,QAAQ;AAAA,CACL,CACP;AAED,MAAME,MAAM,GAAGf,UAAU,CAACoB,MAAM,CAAC;EAC/BJ,GAAG,EAAE;IACHK,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE,KAAK;IACpBC,GAAG,EAAEnB,OAAO,CAAC,KAAK,CAAC;IACnBoB,cAAc,EAAE,eAAe;IAC/BC,OAAO,EAAErB,OAAO,CAAC,KAAK;EACxB,CAAC;EACDa,UAAU,EAAE;IACVI,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE,KAAK;IACpBI,UAAU,EAAE,CAAC;IACbH,GAAG,EAAEnB,OAAO,CAAC,KAAK;EACpB,CAAC;EACDQ,KAAK,EAAE;IACLe,KAAK,EAAEzB,MAAM,CAAC0B,SAAS;IACvBF,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { useUnit } from 'effector-react';
|
|
5
|
-
import { StyleSheet, View } from 'react-native';
|
|
6
|
-
import { COLORS, HeadingVariants, ParagraphVariants, SPACING, Typography } from '@magmamath/react-native-ui';
|
|
7
|
-
import { useText } from "../../../../i18n/i18n.js";
|
|
8
|
-
import { useProfile } from "../../context/ProfileContext.js";
|
|
9
|
-
import { TextSizeSlider } from "./TextSizeSlider.js";
|
|
10
|
-
import { ProfileCard } from "../cards/ProfileCard.js";
|
|
11
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
export const TextSettingsCard = () => {
|
|
13
|
-
const t = useText();
|
|
14
|
-
const {
|
|
15
|
-
model
|
|
16
|
-
} = useProfile();
|
|
17
|
-
const settings = useUnit(model.$settings);
|
|
18
|
-
return /*#__PURE__*/_jsxs(ProfileCard, {
|
|
19
|
-
title: t('profile.textSettings'),
|
|
20
|
-
children: [/*#__PURE__*/_jsx(Typography, {
|
|
21
|
-
variant: HeadingVariants.H8,
|
|
22
|
-
style: styles.label,
|
|
23
|
-
children: t('profile.textSize')
|
|
24
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
25
|
-
style: styles.sliderWrap,
|
|
26
|
-
children: [/*#__PURE__*/_jsx(TextSizeSlider, {
|
|
27
|
-
value: settings.textSize,
|
|
28
|
-
onSlidingComplete: model.setTextSize
|
|
29
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
30
|
-
style: styles.markers,
|
|
31
|
-
children: [/*#__PURE__*/_jsx(Typography, {
|
|
32
|
-
variant: ParagraphVariants.XS,
|
|
33
|
-
style: styles.marker,
|
|
34
|
-
selectable: false,
|
|
35
|
-
children: "A"
|
|
36
|
-
}), /*#__PURE__*/_jsx(Typography, {
|
|
37
|
-
variant: ParagraphVariants.MEDIUM,
|
|
38
|
-
style: styles.marker,
|
|
39
|
-
selectable: false,
|
|
40
|
-
children: "A"
|
|
41
|
-
}), /*#__PURE__*/_jsx(Typography, {
|
|
42
|
-
variant: ParagraphVariants.XL,
|
|
43
|
-
style: styles.marker,
|
|
44
|
-
selectable: false,
|
|
45
|
-
children: "A"
|
|
46
|
-
})]
|
|
47
|
-
})]
|
|
48
|
-
})]
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
const styles = StyleSheet.create({
|
|
52
|
-
label: {
|
|
53
|
-
color: COLORS.NEUTRAL_9
|
|
54
|
-
},
|
|
55
|
-
sliderWrap: {
|
|
56
|
-
gap: SPACING['200']
|
|
57
|
-
},
|
|
58
|
-
markers: {
|
|
59
|
-
alignItems: 'flex-end',
|
|
60
|
-
flexDirection: 'row',
|
|
61
|
-
justifyContent: 'space-between'
|
|
62
|
-
},
|
|
63
|
-
marker: {
|
|
64
|
-
color: COLORS.NEUTRAL_7,
|
|
65
|
-
fontWeight: '700'
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
//# sourceMappingURL=TextSettingsCard.js.map
|