@umituz/react-native-design-system 1.3.0 → 1.3.2
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/lib/domains/icons/domain/config/IconLibraryConfig.d.ts +91 -0
- package/lib/domains/icons/domain/config/IconLibraryConfig.d.ts.map +1 -0
- package/lib/domains/icons/domain/config/IconLibraryConfig.js +85 -0
- package/lib/domains/icons/domain/config/IconLibraryConfig.js.map +1 -0
- package/lib/domains/icons/domain/entities/Icon.d.ts +111 -0
- package/lib/domains/icons/domain/entities/Icon.d.ts.map +1 -0
- package/lib/domains/icons/domain/entities/Icon.js +87 -0
- package/lib/domains/icons/domain/entities/Icon.js.map +1 -0
- package/lib/domains/icons/domain/interfaces/IIconAdapter.d.ts +114 -0
- package/lib/domains/icons/domain/interfaces/IIconAdapter.d.ts.map +1 -0
- package/lib/domains/icons/domain/interfaces/IIconAdapter.js +17 -0
- package/lib/domains/icons/domain/interfaces/IIconAdapter.js.map +1 -0
- package/lib/domains/icons/index.d.ts +84 -0
- package/lib/domains/icons/index.d.ts.map +1 -0
- package/lib/domains/icons/index.js +89 -0
- package/lib/domains/icons/index.js.map +1 -0
- package/lib/domains/icons/infrastructure/adapters/LucideAdapter.d.ts +24 -0
- package/lib/domains/icons/infrastructure/adapters/LucideAdapter.d.ts.map +1 -0
- package/lib/domains/icons/infrastructure/adapters/LucideAdapter.js +85 -0
- package/lib/domains/icons/infrastructure/adapters/LucideAdapter.js.map +1 -0
- package/lib/domains/icons/infrastructure/registries/ExpoIconRegistry.d.ts +23 -0
- package/lib/domains/icons/infrastructure/registries/ExpoIconRegistry.d.ts.map +1 -0
- package/lib/domains/icons/infrastructure/registries/ExpoIconRegistry.js +178 -0
- package/lib/domains/icons/infrastructure/registries/ExpoIconRegistry.js.map +1 -0
- package/lib/domains/icons/presentation/components/Icon.d.ts +42 -0
- package/lib/domains/icons/presentation/components/Icon.d.ts.map +1 -0
- package/lib/domains/icons/presentation/components/Icon.js +86 -0
- package/lib/domains/icons/presentation/components/Icon.js.map +1 -0
- package/lib/domains/icons/presentation/hooks/useIconLibrary.d.ts +38 -0
- package/lib/domains/icons/presentation/hooks/useIconLibrary.d.ts.map +1 -0
- package/lib/domains/icons/presentation/hooks/useIconLibrary.js +114 -0
- package/lib/domains/icons/presentation/hooks/useIconLibrary.js.map +1 -0
- package/lib/index.d.ts +66 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +106 -0
- package/lib/index.js.map +1 -0
- package/lib/infrastructure/theme/globalThemeStore.d.ts +42 -0
- package/lib/infrastructure/theme/globalThemeStore.d.ts.map +1 -0
- package/lib/infrastructure/theme/globalThemeStore.js +38 -0
- package/lib/infrastructure/theme/globalThemeStore.js.map +1 -0
- package/lib/presentation/atoms/AtomicAvatar.d.ts +48 -0
- package/lib/presentation/atoms/AtomicAvatar.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicAvatar.js +85 -0
- package/lib/presentation/atoms/AtomicAvatar.js.map +1 -0
- package/lib/presentation/atoms/AtomicAvatarGroup.d.ts +56 -0
- package/lib/presentation/atoms/AtomicAvatarGroup.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicAvatarGroup.js +83 -0
- package/lib/presentation/atoms/AtomicAvatarGroup.js.map +1 -0
- package/lib/presentation/atoms/AtomicBadge.d.ts +42 -0
- package/lib/presentation/atoms/AtomicBadge.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicBadge.js +168 -0
- package/lib/presentation/atoms/AtomicBadge.js.map +1 -0
- package/lib/presentation/atoms/AtomicButton.d.ts +22 -0
- package/lib/presentation/atoms/AtomicButton.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicButton.js +193 -0
- package/lib/presentation/atoms/AtomicButton.js.map +1 -0
- package/lib/presentation/atoms/AtomicCard.d.ts +15 -0
- package/lib/presentation/atoms/AtomicCard.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicCard.js +89 -0
- package/lib/presentation/atoms/AtomicCard.js.map +1 -0
- package/lib/presentation/atoms/AtomicChip.d.ts +53 -0
- package/lib/presentation/atoms/AtomicChip.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicChip.js +131 -0
- package/lib/presentation/atoms/AtomicChip.js.map +1 -0
- package/lib/presentation/atoms/AtomicDatePicker.d.ts +75 -0
- package/lib/presentation/atoms/AtomicDatePicker.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicDatePicker.js +246 -0
- package/lib/presentation/atoms/AtomicDatePicker.js.map +1 -0
- package/lib/presentation/atoms/AtomicDivider.d.ts +45 -0
- package/lib/presentation/atoms/AtomicDivider.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicDivider.js +58 -0
- package/lib/presentation/atoms/AtomicDivider.js.map +1 -0
- package/lib/presentation/atoms/AtomicFab.d.ts +38 -0
- package/lib/presentation/atoms/AtomicFab.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicFab.js +69 -0
- package/lib/presentation/atoms/AtomicFab.js.map +1 -0
- package/lib/presentation/atoms/AtomicFilter.d.ts +37 -0
- package/lib/presentation/atoms/AtomicFilter.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicFilter.js +104 -0
- package/lib/presentation/atoms/AtomicFilter.js.map +1 -0
- package/lib/presentation/atoms/AtomicFormError.d.ts +30 -0
- package/lib/presentation/atoms/AtomicFormError.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicFormError.js +64 -0
- package/lib/presentation/atoms/AtomicFormError.js.map +1 -0
- package/lib/presentation/atoms/AtomicIcon.d.ts +36 -0
- package/lib/presentation/atoms/AtomicIcon.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicIcon.js +30 -0
- package/lib/presentation/atoms/AtomicIcon.js.map +1 -0
- package/lib/presentation/atoms/AtomicImage.d.ts +40 -0
- package/lib/presentation/atoms/AtomicImage.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicImage.js +92 -0
- package/lib/presentation/atoms/AtomicImage.js.map +1 -0
- package/lib/presentation/atoms/AtomicInput.d.ts +71 -0
- package/lib/presentation/atoms/AtomicInput.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicInput.js +196 -0
- package/lib/presentation/atoms/AtomicInput.js.map +1 -0
- package/lib/presentation/atoms/AtomicNumberInput.d.ts +69 -0
- package/lib/presentation/atoms/AtomicNumberInput.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicNumberInput.js +125 -0
- package/lib/presentation/atoms/AtomicNumberInput.js.map +1 -0
- package/lib/presentation/atoms/AtomicPicker.d.ts +52 -0
- package/lib/presentation/atoms/AtomicPicker.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicPicker.js +299 -0
- package/lib/presentation/atoms/AtomicPicker.js.map +1 -0
- package/lib/presentation/atoms/AtomicProgress.d.ts +47 -0
- package/lib/presentation/atoms/AtomicProgress.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicProgress.js +81 -0
- package/lib/presentation/atoms/AtomicProgress.js.map +1 -0
- package/lib/presentation/atoms/AtomicSearchBar.d.ts +19 -0
- package/lib/presentation/atoms/AtomicSearchBar.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicSearchBar.js +46 -0
- package/lib/presentation/atoms/AtomicSearchBar.js.map +1 -0
- package/lib/presentation/atoms/AtomicSkeleton.d.ts +43 -0
- package/lib/presentation/atoms/AtomicSkeleton.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicSkeleton.js +84 -0
- package/lib/presentation/atoms/AtomicSkeleton.js.map +1 -0
- package/lib/presentation/atoms/AtomicSort.d.ts +72 -0
- package/lib/presentation/atoms/AtomicSort.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicSort.js +77 -0
- package/lib/presentation/atoms/AtomicSort.js.map +1 -0
- package/lib/presentation/atoms/AtomicSwitch.d.ts +43 -0
- package/lib/presentation/atoms/AtomicSwitch.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicSwitch.js +104 -0
- package/lib/presentation/atoms/AtomicSwitch.js.map +1 -0
- package/lib/presentation/atoms/AtomicText.d.ts +14 -0
- package/lib/presentation/atoms/AtomicText.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicText.js +36 -0
- package/lib/presentation/atoms/AtomicText.js.map +1 -0
- package/lib/presentation/atoms/AtomicTextArea.d.ts +85 -0
- package/lib/presentation/atoms/AtomicTextArea.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicTextArea.js +196 -0
- package/lib/presentation/atoms/AtomicTextArea.js.map +1 -0
- package/lib/presentation/atoms/AtomicTouchable.d.ts +87 -0
- package/lib/presentation/atoms/AtomicTouchable.d.ts.map +1 -0
- package/lib/presentation/atoms/AtomicTouchable.js +151 -0
- package/lib/presentation/atoms/AtomicTouchable.js.map +1 -0
- package/lib/presentation/atoms/fab/styles/fabStyles.d.ts +23 -0
- package/lib/presentation/atoms/fab/styles/fabStyles.d.ts.map +1 -0
- package/lib/presentation/atoms/fab/styles/fabStyles.js +63 -0
- package/lib/presentation/atoms/fab/styles/fabStyles.js.map +1 -0
- package/lib/presentation/atoms/fab/types/index.d.ts +76 -0
- package/lib/presentation/atoms/fab/types/index.d.ts.map +1 -0
- package/lib/presentation/atoms/fab/types/index.js +2 -0
- package/lib/presentation/atoms/fab/types/index.js.map +1 -0
- package/lib/presentation/atoms/filter/styles/filterStyles.d.ts +15 -0
- package/lib/presentation/atoms/filter/styles/filterStyles.d.ts.map +1 -0
- package/lib/presentation/atoms/filter/styles/filterStyles.js +29 -0
- package/lib/presentation/atoms/filter/styles/filterStyles.js.map +1 -0
- package/lib/presentation/atoms/filter/types/index.d.ts +76 -0
- package/lib/presentation/atoms/filter/types/index.d.ts.map +1 -0
- package/lib/presentation/atoms/filter/types/index.js +2 -0
- package/lib/presentation/atoms/filter/types/index.js.map +1 -0
- package/lib/presentation/atoms/index.d.ts +276 -0
- package/lib/presentation/atoms/index.d.ts.map +1 -0
- package/lib/presentation/atoms/index.js +149 -0
- package/lib/presentation/atoms/index.js.map +1 -0
- package/lib/presentation/atoms/input/hooks/useInputState.d.ts +7 -0
- package/lib/presentation/atoms/input/hooks/useInputState.d.ts.map +1 -0
- package/lib/presentation/atoms/input/hooks/useInputState.js +13 -0
- package/lib/presentation/atoms/input/hooks/useInputState.js.map +1 -0
- package/lib/presentation/atoms/input/styles/inputStyles.d.ts +13 -0
- package/lib/presentation/atoms/input/styles/inputStyles.d.ts.map +1 -0
- package/lib/presentation/atoms/input/styles/inputStyles.js +59 -0
- package/lib/presentation/atoms/input/styles/inputStyles.js.map +1 -0
- package/lib/presentation/atoms/input/types/index.d.ts +24 -0
- package/lib/presentation/atoms/input/types/index.d.ts.map +1 -0
- package/lib/presentation/atoms/input/types/index.js +2 -0
- package/lib/presentation/atoms/input/types/index.js.map +1 -0
- package/lib/presentation/atoms/picker/styles/pickerStyles.d.ts +96 -0
- package/lib/presentation/atoms/picker/styles/pickerStyles.d.ts.map +1 -0
- package/lib/presentation/atoms/picker/styles/pickerStyles.js +177 -0
- package/lib/presentation/atoms/picker/styles/pickerStyles.js.map +1 -0
- package/lib/presentation/atoms/picker/types/index.d.ts +38 -0
- package/lib/presentation/atoms/picker/types/index.d.ts.map +1 -0
- package/lib/presentation/atoms/picker/types/index.js +2 -0
- package/lib/presentation/atoms/picker/types/index.js.map +1 -0
- package/lib/presentation/atoms/touchable/styles/touchableStyles.d.ts +36 -0
- package/lib/presentation/atoms/touchable/styles/touchableStyles.d.ts.map +1 -0
- package/lib/presentation/atoms/touchable/styles/touchableStyles.js +62 -0
- package/lib/presentation/atoms/touchable/styles/touchableStyles.js.map +1 -0
- package/lib/presentation/atoms/touchable/types/index.d.ts +140 -0
- package/lib/presentation/atoms/touchable/types/index.d.ts.map +1 -0
- package/lib/presentation/atoms/touchable/types/index.js +2 -0
- package/lib/presentation/atoms/touchable/types/index.js.map +1 -0
- package/lib/presentation/hooks/useAppDesignTokens.d.ts +34 -0
- package/lib/presentation/hooks/useAppDesignTokens.d.ts.map +1 -0
- package/lib/presentation/hooks/useAppDesignTokens.js +39 -0
- package/lib/presentation/hooks/useAppDesignTokens.js.map +1 -0
- package/lib/presentation/hooks/useResponsive.d.ts +80 -0
- package/lib/presentation/hooks/useResponsive.d.ts.map +1 -0
- package/lib/presentation/hooks/useResponsive.js +82 -0
- package/lib/presentation/hooks/useResponsive.js.map +1 -0
- package/lib/presentation/loading/index.d.ts +23 -0
- package/lib/presentation/loading/index.d.ts.map +1 -0
- package/lib/presentation/loading/index.js +26 -0
- package/lib/presentation/loading/index.js.map +1 -0
- package/lib/presentation/loading/presentation/components/LoadingSpinner.d.ts +28 -0
- package/lib/presentation/loading/presentation/components/LoadingSpinner.d.ts.map +1 -0
- package/lib/presentation/loading/presentation/components/LoadingSpinner.js +77 -0
- package/lib/presentation/loading/presentation/components/LoadingSpinner.js.map +1 -0
- package/lib/presentation/loading/presentation/components/LoadingState.d.ts +39 -0
- package/lib/presentation/loading/presentation/components/LoadingState.d.ts.map +1 -0
- package/lib/presentation/loading/presentation/components/LoadingState.js +123 -0
- package/lib/presentation/loading/presentation/components/LoadingState.js.map +1 -0
- package/lib/presentation/loading/presentation/hooks/useLoading.d.ts +50 -0
- package/lib/presentation/loading/presentation/hooks/useLoading.d.ts.map +1 -0
- package/lib/presentation/loading/presentation/hooks/useLoading.js +49 -0
- package/lib/presentation/loading/presentation/hooks/useLoading.js.map +1 -0
- package/lib/presentation/molecules/AtomicConfirmationModal.d.ts +73 -0
- package/lib/presentation/molecules/AtomicConfirmationModal.d.ts.map +1 -0
- package/lib/presentation/molecules/AtomicConfirmationModal.js +172 -0
- package/lib/presentation/molecules/AtomicConfirmationModal.js.map +1 -0
- package/lib/presentation/molecules/EmptyState.d.ts +41 -0
- package/lib/presentation/molecules/EmptyState.d.ts.map +1 -0
- package/lib/presentation/molecules/EmptyState.js +68 -0
- package/lib/presentation/molecules/EmptyState.js.map +1 -0
- package/lib/presentation/molecules/FormField.d.ts +22 -0
- package/lib/presentation/molecules/FormField.d.ts.map +1 -0
- package/lib/presentation/molecules/FormField.js +76 -0
- package/lib/presentation/molecules/FormField.js.map +1 -0
- package/lib/presentation/molecules/GridContainer.d.ts +40 -0
- package/lib/presentation/molecules/GridContainer.d.ts.map +1 -0
- package/lib/presentation/molecules/GridContainer.js +77 -0
- package/lib/presentation/molecules/GridContainer.js.map +1 -0
- package/lib/presentation/molecules/IconContainer.d.ts +29 -0
- package/lib/presentation/molecules/IconContainer.d.ts.map +1 -0
- package/lib/presentation/molecules/IconContainer.js +60 -0
- package/lib/presentation/molecules/IconContainer.js.map +1 -0
- package/lib/presentation/molecules/LanguageSwitcher.d.ts +10 -0
- package/lib/presentation/molecules/LanguageSwitcher.d.ts.map +1 -0
- package/lib/presentation/molecules/LanguageSwitcher.js +24 -0
- package/lib/presentation/molecules/LanguageSwitcher.js.map +1 -0
- package/lib/presentation/molecules/ListItem.d.ts +5 -0
- package/lib/presentation/molecules/ListItem.d.ts.map +1 -0
- package/lib/presentation/molecules/ListItem.js +24 -0
- package/lib/presentation/molecules/ListItem.js.map +1 -0
- package/lib/presentation/molecules/ScreenHeader.d.ts +55 -0
- package/lib/presentation/molecules/ScreenHeader.d.ts.map +1 -0
- package/lib/presentation/molecules/ScreenHeader.js +94 -0
- package/lib/presentation/molecules/ScreenHeader.js.map +1 -0
- package/lib/presentation/molecules/SearchBar.d.ts +18 -0
- package/lib/presentation/molecules/SearchBar.d.ts.map +1 -0
- package/lib/presentation/molecules/SearchBar.js +47 -0
- package/lib/presentation/molecules/SearchBar.js.map +1 -0
- package/lib/presentation/molecules/SectionCard.d.ts +25 -0
- package/lib/presentation/molecules/SectionCard.d.ts.map +1 -0
- package/lib/presentation/molecules/SectionCard.js +47 -0
- package/lib/presentation/molecules/SectionCard.js.map +1 -0
- package/lib/presentation/molecules/SectionContainer.d.ts +33 -0
- package/lib/presentation/molecules/SectionContainer.d.ts.map +1 -0
- package/lib/presentation/molecules/SectionContainer.js +64 -0
- package/lib/presentation/molecules/SectionContainer.js.map +1 -0
- package/lib/presentation/molecules/SectionHeader.d.ts +37 -0
- package/lib/presentation/molecules/SectionHeader.d.ts.map +1 -0
- package/lib/presentation/molecules/SectionHeader.js +73 -0
- package/lib/presentation/molecules/SectionHeader.js.map +1 -0
- package/lib/presentation/molecules/confirmation-modal/styles/confirmationModalStyles.d.ts +50 -0
- package/lib/presentation/molecules/confirmation-modal/styles/confirmationModalStyles.d.ts.map +1 -0
- package/lib/presentation/molecules/confirmation-modal/styles/confirmationModalStyles.js +115 -0
- package/lib/presentation/molecules/confirmation-modal/styles/confirmationModalStyles.js.map +1 -0
- package/lib/presentation/molecules/confirmation-modal/types/index.d.ts +88 -0
- package/lib/presentation/molecules/confirmation-modal/types/index.d.ts.map +1 -0
- package/lib/presentation/molecules/confirmation-modal/types/index.js +7 -0
- package/lib/presentation/molecules/confirmation-modal/types/index.js.map +1 -0
- package/lib/presentation/molecules/index.d.ts +28 -0
- package/lib/presentation/molecules/index.d.ts.map +1 -0
- package/lib/presentation/molecules/index.js +18 -0
- package/lib/presentation/molecules/index.js.map +1 -0
- package/lib/presentation/molecules/languageswitcher/config/languageSwitcherConfig.d.ts +11 -0
- package/lib/presentation/molecules/languageswitcher/config/languageSwitcherConfig.d.ts.map +1 -0
- package/lib/presentation/molecules/languageswitcher/config/languageSwitcherConfig.js +6 -0
- package/lib/presentation/molecules/languageswitcher/config/languageSwitcherConfig.js.map +1 -0
- package/lib/presentation/molecules/languageswitcher/hooks/useLanguageNavigation.d.ts +5 -0
- package/lib/presentation/molecules/languageswitcher/hooks/useLanguageNavigation.d.ts.map +1 -0
- package/lib/presentation/molecules/languageswitcher/hooks/useLanguageNavigation.js +12 -0
- package/lib/presentation/molecules/languageswitcher/hooks/useLanguageNavigation.js.map +1 -0
- package/lib/presentation/molecules/listitem/styles/listItemStyles.d.ts +12 -0
- package/lib/presentation/molecules/listitem/styles/listItemStyles.d.ts.map +1 -0
- package/lib/presentation/molecules/listitem/styles/listItemStyles.js +15 -0
- package/lib/presentation/molecules/listitem/styles/listItemStyles.js.map +1 -0
- package/lib/presentation/molecules/listitem/types/index.d.ts +17 -0
- package/lib/presentation/molecules/listitem/types/index.d.ts.map +1 -0
- package/lib/presentation/molecules/listitem/types/index.js +2 -0
- package/lib/presentation/molecules/listitem/types/index.js.map +1 -0
- package/lib/presentation/organisms/AppHeader.d.ts +30 -0
- package/lib/presentation/organisms/AppHeader.d.ts.map +1 -0
- package/lib/presentation/organisms/AppHeader.js +78 -0
- package/lib/presentation/organisms/AppHeader.js.map +1 -0
- package/lib/presentation/organisms/FormContainer.d.ts +76 -0
- package/lib/presentation/organisms/FormContainer.d.ts.map +1 -0
- package/lib/presentation/organisms/FormContainer.js +127 -0
- package/lib/presentation/organisms/FormContainer.js.map +1 -0
- package/lib/presentation/organisms/ScreenLayout.d.ts +99 -0
- package/lib/presentation/organisms/ScreenLayout.d.ts.map +1 -0
- package/lib/presentation/organisms/ScreenLayout.js +78 -0
- package/lib/presentation/organisms/ScreenLayout.js.map +1 -0
- package/lib/presentation/organisms/index.d.ts +16 -0
- package/lib/presentation/organisms/index.d.ts.map +1 -0
- package/lib/presentation/organisms/index.js +14 -0
- package/lib/presentation/organisms/index.js.map +1 -0
- package/lib/presentation/tokens/AppDesignTokens.d.ts +14 -0
- package/lib/presentation/tokens/AppDesignTokens.d.ts.map +1 -0
- package/lib/presentation/tokens/AppDesignTokens.js +23 -0
- package/lib/presentation/tokens/AppDesignTokens.js.map +1 -0
- package/lib/presentation/tokens/commonStyles.d.ts +122 -0
- package/lib/presentation/tokens/commonStyles.d.ts.map +1 -0
- package/lib/presentation/tokens/commonStyles.js +220 -0
- package/lib/presentation/tokens/commonStyles.js.map +1 -0
- package/lib/presentation/tokens/core/BaseTokens.d.ts +337 -0
- package/lib/presentation/tokens/core/BaseTokens.d.ts.map +1 -0
- package/lib/presentation/tokens/core/BaseTokens.js +322 -0
- package/lib/presentation/tokens/core/BaseTokens.js.map +1 -0
- package/lib/presentation/tokens/core/ColorPalette.d.ts +216 -0
- package/lib/presentation/tokens/core/ColorPalette.d.ts.map +1 -0
- package/lib/presentation/tokens/core/ColorPalette.js +330 -0
- package/lib/presentation/tokens/core/ColorPalette.js.map +1 -0
- package/lib/presentation/tokens/core/TokenFactory.d.ts +229 -0
- package/lib/presentation/tokens/core/TokenFactory.d.ts.map +1 -0
- package/lib/presentation/tokens/core/TokenFactory.js +87 -0
- package/lib/presentation/tokens/core/TokenFactory.js.map +1 -0
- package/lib/presentation/utils/platformConstants.d.ts +100 -0
- package/lib/presentation/utils/platformConstants.d.ts.map +1 -0
- package/lib/presentation/utils/platformConstants.js +114 -0
- package/lib/presentation/utils/platformConstants.js.map +1 -0
- package/lib/presentation/utils/responsive.d.ts +218 -0
- package/lib/presentation/utils/responsive.d.ts.map +1 -0
- package/lib/presentation/utils/responsive.js +452 -0
- package/lib/presentation/utils/responsive.js.map +1 -0
- package/lib/presentation/utils/variants/compound.d.ts +10 -0
- package/lib/presentation/utils/variants/compound.d.ts.map +1 -0
- package/lib/presentation/utils/variants/compound.js +16 -0
- package/lib/presentation/utils/variants/compound.js.map +1 -0
- package/lib/presentation/utils/variants/core.d.ts +15 -0
- package/lib/presentation/utils/variants/core.d.ts.map +1 -0
- package/lib/presentation/utils/variants/core.js +23 -0
- package/lib/presentation/utils/variants/core.js.map +1 -0
- package/lib/presentation/utils/variants/helpers.d.ts +5 -0
- package/lib/presentation/utils/variants/helpers.d.ts.map +1 -0
- package/lib/presentation/utils/variants/helpers.js +10 -0
- package/lib/presentation/utils/variants/helpers.js.map +1 -0
- package/lib/presentation/utils/variants.d.ts +4 -0
- package/lib/presentation/utils/variants.d.ts.map +1 -0
- package/lib/presentation/utils/variants.js +4 -0
- package/lib/presentation/utils/variants.js.map +1 -0
- package/package.json +38 -4
- package/src/domains/icons/domain/interfaces/IIconAdapter.ts +6 -3
- package/src/domains/icons/infrastructure/adapters/LucideAdapter.ts +1 -1
- package/src/presentation/atoms/AtomicButton.tsx +1 -1
- package/src/presentation/molecules/AtomicConfirmationModal.tsx +1 -1
- package/src/presentation/molecules/languageswitcher/hooks/useLanguageNavigation.ts +1 -2
- package/src/presentation/tokens/core/ColorPalette.ts +2 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LoadingState - Dynamic Icon-Based Loading Component
|
|
3
|
+
*
|
|
4
|
+
* Universal loading component with configurable emoji/icon support
|
|
5
|
+
* Inspired by meditation_timer's breathing animation pattern
|
|
6
|
+
* Theme: {{THEME_NAME}} ({{CATEGORY}} category)
|
|
7
|
+
*
|
|
8
|
+
* Features:
|
|
9
|
+
* - ✅ Dynamic emoji/icon per screen (🏠 Home, ⚙️ Settings, 💪 Workout, etc.)
|
|
10
|
+
* - ✅ Breathing animation effect (scale 1 → 1.15 → 1)
|
|
11
|
+
* - ✅ Size variants (small, medium, large)
|
|
12
|
+
* - ✅ Full screen or inline modes
|
|
13
|
+
* - ✅ Optional loading message
|
|
14
|
+
* - ✅ Theme-aware styling
|
|
15
|
+
*/
|
|
16
|
+
import React, { useRef, useEffect, useMemo } from 'react';
|
|
17
|
+
import { View, StyleSheet, Animated, Easing, } from 'react-native';
|
|
18
|
+
import { useAppDesignTokens } from '../../../hooks/useAppDesignTokens';
|
|
19
|
+
import { AtomicText } from '../../../atoms/AtomicText';
|
|
20
|
+
const SIZE_CONFIG = {
|
|
21
|
+
small: {
|
|
22
|
+
iconSize: 32,
|
|
23
|
+
showMessage: false,
|
|
24
|
+
containerPadding: 16,
|
|
25
|
+
},
|
|
26
|
+
medium: {
|
|
27
|
+
iconSize: 48,
|
|
28
|
+
showMessage: true,
|
|
29
|
+
containerPadding: 24,
|
|
30
|
+
},
|
|
31
|
+
large: {
|
|
32
|
+
iconSize: 64,
|
|
33
|
+
showMessage: true,
|
|
34
|
+
containerPadding: 32,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
// =============================================================================
|
|
38
|
+
// COMPONENT IMPLEMENTATION
|
|
39
|
+
// =============================================================================
|
|
40
|
+
export const LoadingState = ({ icon = '⏳', // Default hourglass icon
|
|
41
|
+
message, size = 'large', fullScreen = false, }) => {
|
|
42
|
+
// ✅ Dynamic theme tokens
|
|
43
|
+
const tokens = useAppDesignTokens();
|
|
44
|
+
// Animation ref for breathing effect
|
|
45
|
+
const scaleAnim = useRef(new Animated.Value(1)).current;
|
|
46
|
+
// Size configuration
|
|
47
|
+
const config = SIZE_CONFIG[size];
|
|
48
|
+
/**
|
|
49
|
+
* Breathing Animation Effect
|
|
50
|
+
* Smoothly scales icon from 1 → 1.15 → 1 in continuous loop
|
|
51
|
+
* Creates calming, natural breathing sensation
|
|
52
|
+
*/
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
const breathingAnimation = Animated.loop(Animated.sequence([
|
|
55
|
+
// Expand (inhale)
|
|
56
|
+
Animated.timing(scaleAnim, {
|
|
57
|
+
toValue: 1.15,
|
|
58
|
+
duration: tokens.animations.slowest,
|
|
59
|
+
easing: Easing.inOut(Easing.ease),
|
|
60
|
+
useNativeDriver: true,
|
|
61
|
+
}),
|
|
62
|
+
// Contract (exhale)
|
|
63
|
+
Animated.timing(scaleAnim, {
|
|
64
|
+
toValue: 1,
|
|
65
|
+
duration: tokens.animations.slowest,
|
|
66
|
+
easing: Easing.inOut(Easing.ease),
|
|
67
|
+
useNativeDriver: true,
|
|
68
|
+
}),
|
|
69
|
+
]));
|
|
70
|
+
breathingAnimation.start();
|
|
71
|
+
return () => {
|
|
72
|
+
breathingAnimation.stop();
|
|
73
|
+
};
|
|
74
|
+
}, [scaleAnim]);
|
|
75
|
+
// Dynamic styles based on theme
|
|
76
|
+
const styles = useMemo(() => getStyles(tokens, config, fullScreen), [tokens, config, fullScreen]);
|
|
77
|
+
return (<View style={styles.container}>
|
|
78
|
+
{/* Animated Icon/Emoji */}
|
|
79
|
+
<Animated.Text style={[
|
|
80
|
+
styles.icon,
|
|
81
|
+
{
|
|
82
|
+
fontSize: config.iconSize,
|
|
83
|
+
transform: [{ scale: scaleAnim }],
|
|
84
|
+
},
|
|
85
|
+
]}>
|
|
86
|
+
{icon}
|
|
87
|
+
</Animated.Text>
|
|
88
|
+
|
|
89
|
+
{/* Optional Loading Message */}
|
|
90
|
+
{config.showMessage && message && (<AtomicText type="bodyMedium" style={styles.message}>
|
|
91
|
+
{message}
|
|
92
|
+
</AtomicText>)}
|
|
93
|
+
</View>);
|
|
94
|
+
};
|
|
95
|
+
// =============================================================================
|
|
96
|
+
// STYLES
|
|
97
|
+
// =============================================================================
|
|
98
|
+
const getStyles = (tokens, config, fullScreen) => StyleSheet.create({
|
|
99
|
+
container: {
|
|
100
|
+
...(fullScreen ? {
|
|
101
|
+
flex: 1,
|
|
102
|
+
justifyContent: 'center',
|
|
103
|
+
alignItems: 'center',
|
|
104
|
+
backgroundColor: tokens.colors.backgroundPrimary,
|
|
105
|
+
} : {
|
|
106
|
+
justifyContent: 'center',
|
|
107
|
+
alignItems: 'center',
|
|
108
|
+
padding: config.containerPadding,
|
|
109
|
+
}),
|
|
110
|
+
},
|
|
111
|
+
icon: {
|
|
112
|
+
textAlign: 'center',
|
|
113
|
+
marginBottom: tokens.spacing.md,
|
|
114
|
+
},
|
|
115
|
+
message: {
|
|
116
|
+
color: tokens.colors.textSecondary,
|
|
117
|
+
textAlign: 'center',
|
|
118
|
+
marginTop: tokens.spacing.sm,
|
|
119
|
+
maxWidth: 300,
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
export default LoadingState;
|
|
123
|
+
//# sourceMappingURL=LoadingState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingState.js","sourceRoot":"","sources":["../../../../../src/presentation/loading/presentation/components/LoadingState.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EACL,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,MAAM,GACP,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,mC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AAC;AAEF,gFAAgF;AAChF,SAAS;AACT,gFAAgF;AAEhF,MAAM,SAAS,GAAG,CAChB,MAA6C,EAC7C,MAAkB,EAClB,UAAmB,EACnB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrB,SAAS,EAAE;QACT,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;YACf,IAAI,EAAE,CAAC;YACP,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;YACpB,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,iBAAiB;SACjD,CAAC,CAAC,CAAC;YACF,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;YACpB,OAAO,EAAE,MAAM,CAAC,gBAAgB;SACjC,CAAC;KACH;IACD,IAAI,EAAE;QACJ,SAAS,EAAE,QAAQ;QACnB,YAAY,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE;KAChC;IACD,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa;QAClC,SAAS,EAAE,QAAQ;QACnB,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE;QAC5B,QAAQ,EAAE,GAAG;KACd;CACF,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useLoading - Loading State Management Hook
|
|
3
|
+
*
|
|
4
|
+
* Centralized hook for managing loading states across the application
|
|
5
|
+
* Theme: {{THEME_NAME}} ({{CATEGORY}} category)
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - ✅ Simple boolean loading state
|
|
9
|
+
* - ✅ Message management
|
|
10
|
+
* - ✅ Icon configuration per context
|
|
11
|
+
* - ✅ Type-safe loading control
|
|
12
|
+
*/
|
|
13
|
+
export interface LoadingConfig {
|
|
14
|
+
isLoading: boolean;
|
|
15
|
+
message?: string;
|
|
16
|
+
icon?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface UseLoadingReturn {
|
|
19
|
+
/**
|
|
20
|
+
* Current loading state
|
|
21
|
+
*/
|
|
22
|
+
isLoading: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Current loading message
|
|
25
|
+
*/
|
|
26
|
+
message: string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Current loading icon
|
|
29
|
+
*/
|
|
30
|
+
icon: string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Start loading with optional message and icon
|
|
33
|
+
*/
|
|
34
|
+
startLoading: (message?: string, icon?: string) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Stop loading and clear message
|
|
37
|
+
*/
|
|
38
|
+
stopLoading: () => void;
|
|
39
|
+
/**
|
|
40
|
+
* Update loading message without affecting state
|
|
41
|
+
*/
|
|
42
|
+
setMessage: (message: string | undefined) => void;
|
|
43
|
+
/**
|
|
44
|
+
* Update loading icon without affecting state
|
|
45
|
+
*/
|
|
46
|
+
setIcon: (icon: string | undefined) => void;
|
|
47
|
+
}
|
|
48
|
+
export declare const useLoading: (initialConfig?: LoadingConfig) => UseLoadingReturn;
|
|
49
|
+
export default useLoading;
|
|
50
|
+
//# sourceMappingURL=useLoading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLoading.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/loading/presentation/hooks/useLoading.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAQH,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAEzB;;OAEG;IACH,YAAY,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAExD;;OAEG;IACH,WAAW,EAAE,MAAM,IAAI,CAAC;IAExB;;OAEG;IACH,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAElD;;OAEG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CAC7C;AAMD,eAAO,MAAM,UAAU,GAAI,gBAAgB,aAAa,KAAG,gBA+B1D,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useLoading - Loading State Management Hook
|
|
3
|
+
*
|
|
4
|
+
* Centralized hook for managing loading states across the application
|
|
5
|
+
* Theme: {{THEME_NAME}} ({{CATEGORY}} category)
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - ✅ Simple boolean loading state
|
|
9
|
+
* - ✅ Message management
|
|
10
|
+
* - ✅ Icon configuration per context
|
|
11
|
+
* - ✅ Type-safe loading control
|
|
12
|
+
*/
|
|
13
|
+
import { useState, useCallback } from 'react';
|
|
14
|
+
// =============================================================================
|
|
15
|
+
// HOOK IMPLEMENTATION
|
|
16
|
+
// =============================================================================
|
|
17
|
+
export const useLoading = (initialConfig) => {
|
|
18
|
+
const [isLoading, setIsLoading] = useState(initialConfig?.isLoading ?? false);
|
|
19
|
+
const [message, setMessage] = useState(initialConfig?.message);
|
|
20
|
+
const [icon, setIcon] = useState(initialConfig?.icon);
|
|
21
|
+
/**
|
|
22
|
+
* Start loading with optional message and icon
|
|
23
|
+
*/
|
|
24
|
+
const startLoading = useCallback((msg, ico) => {
|
|
25
|
+
setIsLoading(true);
|
|
26
|
+
if (msg !== undefined)
|
|
27
|
+
setMessage(msg);
|
|
28
|
+
if (ico !== undefined)
|
|
29
|
+
setIcon(ico);
|
|
30
|
+
}, []);
|
|
31
|
+
/**
|
|
32
|
+
* Stop loading and clear message
|
|
33
|
+
*/
|
|
34
|
+
const stopLoading = useCallback(() => {
|
|
35
|
+
setIsLoading(false);
|
|
36
|
+
setMessage(undefined);
|
|
37
|
+
}, []);
|
|
38
|
+
return {
|
|
39
|
+
isLoading,
|
|
40
|
+
message,
|
|
41
|
+
icon,
|
|
42
|
+
startLoading,
|
|
43
|
+
stopLoading,
|
|
44
|
+
setMessage,
|
|
45
|
+
setIcon,
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export default useLoading;
|
|
49
|
+
//# sourceMappingURL=useLoading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLoading.js","sourceRoot":"","sources":["../../../../../src/presentation/loading/presentation/hooks/useLoading.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAiD9C,gFAAgF;AAChF,sBAAsB;AACtB,gFAAgF;AAEhF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,aAA6B,EAAoB,EAAE;IAC5E,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,aAAa,EAAE,SAAS,IAAI,KAAK,CAAC,CAAC;IAC9E,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAqB,aAAa,EAAE,OAAO,CAAC,CAAC;IACnF,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAqB,aAAa,EAAE,IAAI,CAAC,CAAC;IAE1E;;OAEG;IACH,MAAM,YAAY,GAAG,WAAW,CAAC,CAAC,GAAY,EAAE,GAAY,EAAE,EAAE;QAC9D,YAAY,CAAC,IAAI,CAAC,CAAC;QACnB,IAAI,GAAG,KAAK,SAAS;YAAE,UAAU,CAAC,GAAG,CAAC,CAAC;QACvC,IAAI,GAAG,KAAK,SAAS;YAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP;;OAEG;IACH,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE;QACnC,YAAY,CAAC,KAAK,CAAC,CAAC;QACpB,UAAU,CAAC,SAAS,CAAC,CAAC;IACxB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,SAAS;QACT,OAAO;QACP,IAAI;QACJ,YAAY;QACZ,WAAW;QACX,UAAU;QACV,OAAO;KACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AtomicConfirmationModal - Universal Confirmation Dialog
|
|
3
|
+
*
|
|
4
|
+
* A reusable confirmation modal for destructive and important actions.
|
|
5
|
+
* Follows Material Design 3 dialog patterns and accessibility guidelines.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Multiple variants (default, destructive, warning, success)
|
|
9
|
+
* - Configurable text and icons
|
|
10
|
+
* - Backdrop dismissal
|
|
11
|
+
* - Full keyboard and screen reader support
|
|
12
|
+
* - Theme-aware styling
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* // Destructive confirmation (delete)
|
|
17
|
+
* <AtomicConfirmationModal
|
|
18
|
+
* visible={showDeleteModal}
|
|
19
|
+
* variant="destructive"
|
|
20
|
+
* title="Delete Item?"
|
|
21
|
+
* message="This action cannot be undone. All data will be permanently deleted."
|
|
22
|
+
* confirmText="Delete"
|
|
23
|
+
* cancelText="Cancel"
|
|
24
|
+
* onConfirm={handleDelete}
|
|
25
|
+
* onCancel={() => setShowDeleteModal(false)}
|
|
26
|
+
* />
|
|
27
|
+
*
|
|
28
|
+
* // Generic confirmation
|
|
29
|
+
* <AtomicConfirmationModal
|
|
30
|
+
* visible={showConfirmModal}
|
|
31
|
+
* variant="default"
|
|
32
|
+
* title="Confirm Action"
|
|
33
|
+
* message="Are you sure you want to proceed?"
|
|
34
|
+
* onConfirm={handleConfirm}
|
|
35
|
+
* onCancel={() => setShowConfirmModal(false)}
|
|
36
|
+
* />
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
import React from 'react';
|
|
40
|
+
import { AtomicConfirmationModalProps, ConfirmationModalVariant } from './confirmation-modal/types';
|
|
41
|
+
export type { AtomicConfirmationModalProps };
|
|
42
|
+
export type { ConfirmationModalVariant };
|
|
43
|
+
export declare const AtomicConfirmationModal: React.FC<AtomicConfirmationModalProps>;
|
|
44
|
+
/**
|
|
45
|
+
* Hook for managing confirmation modal state
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* const { showConfirmation, confirmationProps } = useConfirmationModal({
|
|
50
|
+
* title: 'Delete Item?',
|
|
51
|
+
* message: 'This cannot be undone',
|
|
52
|
+
* variant: 'destructive',
|
|
53
|
+
* onConfirm: handleDelete,
|
|
54
|
+
* });
|
|
55
|
+
*
|
|
56
|
+
* // In JSX
|
|
57
|
+
* <AtomicConfirmationModal {...confirmationProps} />
|
|
58
|
+
* <Button onPress={showConfirmation}>Delete</Button>
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export declare const useConfirmationModal: (config: {
|
|
62
|
+
title: string;
|
|
63
|
+
message: string;
|
|
64
|
+
variant?: ConfirmationModalVariant;
|
|
65
|
+
confirmText?: string;
|
|
66
|
+
cancelText?: string;
|
|
67
|
+
onConfirm: () => void;
|
|
68
|
+
}) => {
|
|
69
|
+
showConfirmation: () => void;
|
|
70
|
+
hideConfirmation: () => void;
|
|
71
|
+
confirmationProps: AtomicConfirmationModalProps;
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=AtomicConfirmationModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AtomicConfirmationModal.d.ts","sourceRoot":"","sources":["../../../src/presentation/molecules/AtomicConfirmationModal.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AAapC,YAAY,EAAE,4BAA4B,EAAE,CAAC;AAC7C,YAAY,EAAE,wBAAwB,EAAE,CAAC;AAEzC,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAgJ1E,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,oBAAoB,GAAI,QAAQ;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,wBAAwB,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;;;;CA2BA,CAAC"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AtomicConfirmationModal - Universal Confirmation Dialog
|
|
3
|
+
*
|
|
4
|
+
* A reusable confirmation modal for destructive and important actions.
|
|
5
|
+
* Follows Material Design 3 dialog patterns and accessibility guidelines.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Multiple variants (default, destructive, warning, success)
|
|
9
|
+
* - Configurable text and icons
|
|
10
|
+
* - Backdrop dismissal
|
|
11
|
+
* - Full keyboard and screen reader support
|
|
12
|
+
* - Theme-aware styling
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* // Destructive confirmation (delete)
|
|
17
|
+
* <AtomicConfirmationModal
|
|
18
|
+
* visible={showDeleteModal}
|
|
19
|
+
* variant="destructive"
|
|
20
|
+
* title="Delete Item?"
|
|
21
|
+
* message="This action cannot be undone. All data will be permanently deleted."
|
|
22
|
+
* confirmText="Delete"
|
|
23
|
+
* cancelText="Cancel"
|
|
24
|
+
* onConfirm={handleDelete}
|
|
25
|
+
* onCancel={() => setShowDeleteModal(false)}
|
|
26
|
+
* />
|
|
27
|
+
*
|
|
28
|
+
* // Generic confirmation
|
|
29
|
+
* <AtomicConfirmationModal
|
|
30
|
+
* visible={showConfirmModal}
|
|
31
|
+
* variant="default"
|
|
32
|
+
* title="Confirm Action"
|
|
33
|
+
* message="Are you sure you want to proceed?"
|
|
34
|
+
* onConfirm={handleConfirm}
|
|
35
|
+
* onCancel={() => setShowConfirmModal(false)}
|
|
36
|
+
* />
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
import React from 'react';
|
|
40
|
+
import { View, Modal, TouchableOpacity } from 'react-native';
|
|
41
|
+
import { useAppDesignTokens } from '../hooks/useAppDesignTokens';
|
|
42
|
+
import { useLocalization } from '@umituz/react-native-localization';
|
|
43
|
+
import { AtomicText } from '../atoms/AtomicText';
|
|
44
|
+
import { AtomicButton } from '../atoms/AtomicButton';
|
|
45
|
+
import { AtomicIcon } from '../atoms/AtomicIcon';
|
|
46
|
+
import { getVariantConfig, getModalOverlayStyle, getBackdropStyle, getModalContainerStyle, getIconContainerStyle, getTitleContainerStyle, getMessageContainerStyle, getButtonContainerStyle, getButtonStyle, } from './confirmation-modal/styles/confirmationModalStyles';
|
|
47
|
+
export const AtomicConfirmationModal = ({ visible, title, message, variant = 'default', confirmText, cancelText, icon, onConfirm, onCancel, showBackdrop = true, backdropDismissible = true, style, testID = 'atomic-confirmation-modal', }) => {
|
|
48
|
+
const tokens = useAppDesignTokens();
|
|
49
|
+
const { t } = useLocalization();
|
|
50
|
+
// Get variant-specific configuration (icon and color only)
|
|
51
|
+
const variantConfig = getVariantConfig(variant, tokens);
|
|
52
|
+
// Get locale-aware default text based on variant
|
|
53
|
+
const getDefaultConfirmText = () => {
|
|
54
|
+
switch (variant) {
|
|
55
|
+
case 'destructive':
|
|
56
|
+
return t('general.delete');
|
|
57
|
+
case 'warning':
|
|
58
|
+
return t('general.continue');
|
|
59
|
+
case 'success':
|
|
60
|
+
case 'default':
|
|
61
|
+
default:
|
|
62
|
+
return t('general.confirm');
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
// Determine final text values
|
|
66
|
+
const finalConfirmText = confirmText || getDefaultConfirmText();
|
|
67
|
+
const finalCancelText = cancelText || t('general.cancel');
|
|
68
|
+
// Determine final icon
|
|
69
|
+
const finalIcon = icon || variantConfig.icon;
|
|
70
|
+
// Handle backdrop press
|
|
71
|
+
const handleBackdropPress = () => {
|
|
72
|
+
if (backdropDismissible) {
|
|
73
|
+
onCancel();
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
return (<Modal visible={visible} transparent animationType="fade" onRequestClose={onCancel} statusBarTranslucent testID={testID}>
|
|
77
|
+
<View style={getModalOverlayStyle(tokens)}>
|
|
78
|
+
{/* Backdrop - Tap to dismiss if enabled */}
|
|
79
|
+
{showBackdrop && (<TouchableOpacity style={getBackdropStyle()} activeOpacity={1} onPress={handleBackdropPress} testID={`${testID}-backdrop`}/>)}
|
|
80
|
+
|
|
81
|
+
{/* Modal Container */}
|
|
82
|
+
<View style={[getModalContainerStyle(tokens), style]}>
|
|
83
|
+
{/* Icon */}
|
|
84
|
+
<View style={getIconContainerStyle(tokens)}>
|
|
85
|
+
<AtomicIcon name={finalIcon} size="xl" color={variantConfig.iconColor} testID={`${testID}-icon`}/>
|
|
86
|
+
</View>
|
|
87
|
+
|
|
88
|
+
{/* Title */}
|
|
89
|
+
<View style={getTitleContainerStyle(tokens)}>
|
|
90
|
+
<AtomicText type="titleLarge" style={{
|
|
91
|
+
color: tokens.colors.textPrimary,
|
|
92
|
+
textAlign: 'center',
|
|
93
|
+
fontWeight: tokens.typography.bold,
|
|
94
|
+
}} testID={`${testID}-title`}>
|
|
95
|
+
{title}
|
|
96
|
+
</AtomicText>
|
|
97
|
+
</View>
|
|
98
|
+
|
|
99
|
+
{/* Message */}
|
|
100
|
+
<View style={getMessageContainerStyle(tokens)}>
|
|
101
|
+
<AtomicText type="bodyMedium" style={{
|
|
102
|
+
color: tokens.colors.textSecondary,
|
|
103
|
+
textAlign: 'center',
|
|
104
|
+
lineHeight: tokens.typography.bodyMedium.lineHeight,
|
|
105
|
+
}} testID={`${testID}-message`}>
|
|
106
|
+
{message}
|
|
107
|
+
</AtomicText>
|
|
108
|
+
</View>
|
|
109
|
+
|
|
110
|
+
{/* Action Buttons */}
|
|
111
|
+
<View style={getButtonContainerStyle(tokens)}>
|
|
112
|
+
{/* Cancel Button */}
|
|
113
|
+
<AtomicButton variant="outline" size="md" onPress={onCancel} style={getButtonStyle()} testID={`${testID}-cancel-button`}>
|
|
114
|
+
{finalCancelText}
|
|
115
|
+
</AtomicButton>
|
|
116
|
+
|
|
117
|
+
{/* Confirm Button */}
|
|
118
|
+
<AtomicButton variant={variant === 'destructive' ? 'primary' : 'primary'} size="md" onPress={onConfirm} style={[
|
|
119
|
+
getButtonStyle(),
|
|
120
|
+
...(variant === 'destructive' ? [{ backgroundColor: tokens.colors.error }] : []),
|
|
121
|
+
...(variant === 'warning' ? [{ backgroundColor: tokens.colors.warning }] : []),
|
|
122
|
+
...(variant === 'success' ? [{ backgroundColor: tokens.colors.success }] : []),
|
|
123
|
+
]} testID={`${testID}-confirm-button`}>
|
|
124
|
+
{finalConfirmText}
|
|
125
|
+
</AtomicButton>
|
|
126
|
+
</View>
|
|
127
|
+
</View>
|
|
128
|
+
</View>
|
|
129
|
+
</Modal>);
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Hook for managing confirmation modal state
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```tsx
|
|
136
|
+
* const { showConfirmation, confirmationProps } = useConfirmationModal({
|
|
137
|
+
* title: 'Delete Item?',
|
|
138
|
+
* message: 'This cannot be undone',
|
|
139
|
+
* variant: 'destructive',
|
|
140
|
+
* onConfirm: handleDelete,
|
|
141
|
+
* });
|
|
142
|
+
*
|
|
143
|
+
* // In JSX
|
|
144
|
+
* <AtomicConfirmationModal {...confirmationProps} />
|
|
145
|
+
* <Button onPress={showConfirmation}>Delete</Button>
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
export const useConfirmationModal = (config) => {
|
|
149
|
+
const [visible, setVisible] = React.useState(false);
|
|
150
|
+
const showConfirmation = () => setVisible(true);
|
|
151
|
+
const hideConfirmation = () => setVisible(false);
|
|
152
|
+
const handleConfirm = () => {
|
|
153
|
+
config.onConfirm();
|
|
154
|
+
hideConfirmation();
|
|
155
|
+
};
|
|
156
|
+
const confirmationProps = {
|
|
157
|
+
visible,
|
|
158
|
+
title: config.title,
|
|
159
|
+
message: config.message,
|
|
160
|
+
variant: config.variant || 'default',
|
|
161
|
+
confirmText: config.confirmText,
|
|
162
|
+
cancelText: config.cancelText,
|
|
163
|
+
onConfirm: handleConfirm,
|
|
164
|
+
onCancel: hideConfirmation,
|
|
165
|
+
};
|
|
166
|
+
return {
|
|
167
|
+
showConfirmation,
|
|
168
|
+
hideConfirmation,
|
|
169
|
+
confirmationProps,
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
//# sourceMappingURL=AtomicConfirmationModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AtomicConfirmationModal.js","sourceRoot":"","sources":["../../../src/presentation/molecules/AtomicConfirmationModal.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,YA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ACzB,MAAM,CAAC,SAAS,EAAE,CAAC;QACnB,gBAAgB,EAAE,CAAC;IACrB,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAiC;QACtD,OAAO;QACP,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,SAAS;QACpC,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,SAAS,EAAE,aAAa;QACxB,QAAQ,EAAE,gBAAgB;KAC3B,CAAC;IAEF,OAAO;QACL,gBAAgB;QAChB,gBAAgB;QAChB,iBAAiB;KAClB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EmptyState Molecule - Universal Empty State Display
|
|
3
|
+
*
|
|
4
|
+
* Displays icon, title, and subtitle for empty data scenarios
|
|
5
|
+
* Theme: {{THEME_NAME}} ({{CATEGORY}} category)
|
|
6
|
+
*
|
|
7
|
+
* Atomic Design Level: MOLECULE
|
|
8
|
+
* Composition: Icon + AtomicText + Layout
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* - Empty lists
|
|
12
|
+
* - Empty grids
|
|
13
|
+
* - No search results
|
|
14
|
+
* - No data states
|
|
15
|
+
*/
|
|
16
|
+
import React from 'react';
|
|
17
|
+
import { ViewStyle, TextStyle } from 'react-native';
|
|
18
|
+
export interface EmptyStateProps {
|
|
19
|
+
/** Material icon name */
|
|
20
|
+
icon: string;
|
|
21
|
+
/** Icon size (default: xl) */
|
|
22
|
+
iconSize?: 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
23
|
+
/** Main heading text */
|
|
24
|
+
title: string;
|
|
25
|
+
/** Descriptive subtitle text */
|
|
26
|
+
subtitle?: string;
|
|
27
|
+
/** Custom icon color (default: textTertiary) */
|
|
28
|
+
iconColor?: string;
|
|
29
|
+
/** Custom title color (default: textPrimary) */
|
|
30
|
+
titleColor?: string;
|
|
31
|
+
/** Custom subtitle color (default: textSecondary) */
|
|
32
|
+
subtitleColor?: string;
|
|
33
|
+
/** Container style override */
|
|
34
|
+
style?: ViewStyle;
|
|
35
|
+
/** Title style override */
|
|
36
|
+
titleStyle?: TextStyle;
|
|
37
|
+
/** Subtitle style override */
|
|
38
|
+
subtitleStyle?: TextStyle;
|
|
39
|
+
}
|
|
40
|
+
export declare const EmptyState: React.FC<EmptyStateProps>;
|
|
41
|
+
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/presentation/molecules/EmptyState.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAoB,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAQtE,MAAM,WAAW,eAAe;IAC9B,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IAC7C,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,8BAA8B;IAC9B,aAAa,CAAC,EAAE,SAAS,CAAC;CAC3B;AAMD,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA8ChD,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EmptyState Molecule - Universal Empty State Display
|
|
3
|
+
*
|
|
4
|
+
* Displays icon, title, and subtitle for empty data scenarios
|
|
5
|
+
* Theme: {{THEME_NAME}} ({{CATEGORY}} category)
|
|
6
|
+
*
|
|
7
|
+
* Atomic Design Level: MOLECULE
|
|
8
|
+
* Composition: Icon + AtomicText + Layout
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* - Empty lists
|
|
12
|
+
* - Empty grids
|
|
13
|
+
* - No search results
|
|
14
|
+
* - No data states
|
|
15
|
+
*/
|
|
16
|
+
import React from 'react';
|
|
17
|
+
import { View, StyleSheet } from 'react-native';
|
|
18
|
+
import { AtomicText, AtomicIcon } from '../atoms';
|
|
19
|
+
import { useAppDesignTokens } from '../hooks/useAppDesignTokens';
|
|
20
|
+
// =============================================================================
|
|
21
|
+
// COMPONENT IMPLEMENTATION
|
|
22
|
+
// =============================================================================
|
|
23
|
+
export const EmptyState = ({ icon, iconSize = 'xl', title, subtitle, iconColor, titleColor, subtitleColor, style, titleStyle, subtitleStyle, }) => {
|
|
24
|
+
const tokens = useAppDesignTokens();
|
|
25
|
+
const styles = getStyles(tokens);
|
|
26
|
+
return (<View style={[styles.container, style]}>
|
|
27
|
+
<AtomicIcon name={icon} size={iconSize} customColor={iconColor || tokens.colors.textSecondary}/>
|
|
28
|
+
<AtomicText type="headlineMedium" color={titleColor || tokens.colors.textPrimary} style={StyleSheet.flatten([
|
|
29
|
+
styles.title,
|
|
30
|
+
titleStyle,
|
|
31
|
+
])}>
|
|
32
|
+
{title}
|
|
33
|
+
</AtomicText>
|
|
34
|
+
{subtitle && (<AtomicText type="bodyMedium" color={subtitleColor || tokens.colors.textSecondary} style={StyleSheet.flatten([
|
|
35
|
+
styles.subtitle,
|
|
36
|
+
subtitleStyle,
|
|
37
|
+
])}>
|
|
38
|
+
{subtitle}
|
|
39
|
+
</AtomicText>)}
|
|
40
|
+
</View>);
|
|
41
|
+
};
|
|
42
|
+
// =============================================================================
|
|
43
|
+
// STYLES
|
|
44
|
+
// =============================================================================
|
|
45
|
+
const getStyles = (tokens) => StyleSheet.create({
|
|
46
|
+
container: {
|
|
47
|
+
flex: 1,
|
|
48
|
+
justifyContent: 'center',
|
|
49
|
+
alignItems: 'center',
|
|
50
|
+
paddingVertical: tokens.spacing.xl,
|
|
51
|
+
paddingHorizontal: tokens.spacing.lg,
|
|
52
|
+
},
|
|
53
|
+
title: {
|
|
54
|
+
fontSize: tokens.typography.headingMedium.fontSize,
|
|
55
|
+
fontWeight: tokens.typography.headingMedium.fontWeight,
|
|
56
|
+
marginTop: tokens.spacing.md,
|
|
57
|
+
textAlign: 'center',
|
|
58
|
+
},
|
|
59
|
+
subtitle: {
|
|
60
|
+
fontSize: tokens.typography.bodySmall.fontSize,
|
|
61
|
+
marginTop: tokens.spacing.xs,
|
|
62
|
+
textAlign: 'center',
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
// =============================================================================
|
|
66
|
+
// EXPORTS
|
|
67
|
+
// =============================================================================
|
|
68
|
+
//# sourceMappingURL=EmptyState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.js","sourceRoot":"","sources":["../../../src/presentation/molecules/EmptyState.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAwB,MAAM,cAAc,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AA6BjE,gFAAgF;AAChF,2BAA2B;AAC3B,gFAAgF;AAEhF,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,IAAI,EACJ,QAAQ,GAA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;IAChB,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,eAAe,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE;QAClC,iBAAiB,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE;KACrC;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,MAAM,CAAC,UAAU,CAAC,aAAa,CAAC,QAAQ;QAClD,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,aAAa,CAAC,UAAU;QACtD,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE;QAC5B,SAAS,EAAE,QAAQ;KACpB;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,QAAQ;QAC9C,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE;QAC5B,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC;AAEL,gFAAgF;AAChF,UAAU;AACV,gFAAgF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FormField Molecule - Complete Form Input with Label and Error
|
|
3
|
+
*
|
|
4
|
+
* Combines AtomicText (label/error) + AtomicInput (field)
|
|
5
|
+
* Theme: {{THEME_NAME}} ({{CATEGORY}} category)
|
|
6
|
+
*
|
|
7
|
+
* Atomic Design Level: MOLECULE
|
|
8
|
+
* Composition: AtomicText + AtomicInput
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { ViewStyle } from 'react-native';
|
|
12
|
+
import { AtomicInputProps } from '../atoms/AtomicInput';
|
|
13
|
+
export interface FormFieldProps extends Omit<AtomicInputProps, 'state' | 'label'> {
|
|
14
|
+
label?: string;
|
|
15
|
+
error?: string;
|
|
16
|
+
helperText?: string;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
containerStyle?: ViewStyle;
|
|
19
|
+
style?: ViewStyle;
|
|
20
|
+
}
|
|
21
|
+
export declare const FormField: React.FC<FormFieldProps>;
|
|
22
|
+
//# sourceMappingURL=FormField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../src/presentation/molecules/FormField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,SAAS,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EAAe,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAMrE,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,OAAO,CAAC;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAMD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA8D9C,CAAC"}
|