@sikka/hawa 0.1.1 → 0.1.2-next
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -43
- package/dist/index.css +1385 -0
- package/dist/index.d.mts +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +246 -0
- package/dist/index.mjs +157 -0
- package/package.json +48 -115
- package/.github/workflows/hawa-actions.yml +0 -112
- package/.github/workflows/hawa-publish-push.yml +0 -74
- package/.github/workflows/hawa-publish.yml +0 -48
- package/.prettierrc +0 -28
- package/_config.yml +0 -1
- package/dist/styles.css +0 -3511
- package/es/blocks/Account/HawaApiBox.d.ts +0 -8
- package/es/blocks/Account/UserProfileForm.d.ts +0 -8
- package/es/blocks/Account/UserSettingsForm.d.ts +0 -9
- package/es/blocks/Account/index.d.ts +0 -2
- package/es/blocks/AuthForms/AppLanding.d.ts +0 -14
- package/es/blocks/AuthForms/CodeConfirmation.d.ts +0 -22
- package/es/blocks/AuthForms/NewPasswordForm.d.ts +0 -18
- package/es/blocks/AuthForms/ResetPasswordForm.d.ts +0 -18
- package/es/blocks/AuthForms/SignInBlock.d.ts +0 -2
- package/es/blocks/AuthForms/SignInForm.d.ts +0 -51
- package/es/blocks/AuthForms/SignInPhone.d.ts +0 -13
- package/es/blocks/AuthForms/SignUpForm.d.ts +0 -55
- package/es/blocks/AuthForms/index.d.ts +0 -8
- package/es/blocks/Misc/EmptyState.d.ts +0 -11
- package/es/blocks/Misc/LeadGenerator.d.ts +0 -12
- package/es/blocks/Misc/Newsletter.d.ts +0 -12
- package/es/blocks/Misc/NoPermission.d.ts +0 -10
- package/es/blocks/Misc/NotFound.d.ts +0 -11
- package/es/blocks/Misc/Testimonial.d.ts +0 -6
- package/es/blocks/Misc/index.d.ts +0 -6
- package/es/blocks/Payment/ChargeWalletForm.d.ts +0 -12
- package/es/blocks/Payment/CheckoutForm.d.ts +0 -27
- package/es/blocks/Payment/Confirmation.d.ts +0 -38
- package/es/blocks/Payment/CreditCardForm.d.ts +0 -7
- package/es/blocks/Payment/PayWithWallet.d.ts +0 -8
- package/es/blocks/Payment/SelectPayment.d.ts +0 -26
- package/es/blocks/Payment/index.d.ts +0 -6
- package/es/blocks/Pricing/ComparingPlans.d.ts +0 -39
- package/es/blocks/Pricing/HorizontalPricing.d.ts +0 -47
- package/es/blocks/Pricing/PricingPlans.d.ts +0 -47
- package/es/blocks/Pricing/index.d.ts +0 -3
- package/es/blocks/Referral/ReferralAccount.d.ts +0 -7
- package/es/blocks/Referral/ReferralSettlement.d.ts +0 -8
- package/es/blocks/Referral/ReferralStats.d.ts +0 -8
- package/es/blocks/Referral/index.d.ts +0 -3
- package/es/blocks/index.d.ts +0 -6
- package/es/countries.d.ts +0 -2
- package/es/elements/ArrowCarousel.d.ts +0 -13
- package/es/elements/AutoCompleteField.d.ts +0 -8
- package/es/elements/BackToTop.d.ts +0 -10
- package/es/elements/Breadcrumb.d.ts +0 -12
- package/es/elements/Button.d.ts +0 -12
- package/es/elements/Card.d.ts +0 -10
- package/es/elements/DragDropImages.d.ts +0 -28
- package/es/elements/DraggableCard.d.ts +0 -6
- package/es/elements/FloatingComment.d.ts +0 -32
- package/es/elements/FloatingCommentExec.d.ts +0 -4
- package/es/elements/FloatingCommentSlate.d.ts +0 -19
- package/es/elements/HawaAccordion.d.ts +0 -11
- package/es/elements/HawaAdCard.d.ts +0 -10
- package/es/elements/HawaAlert.d.ts +0 -23
- package/es/elements/HawaButton.d.ts +0 -21
- package/es/elements/HawaCardInput.d.ts +0 -25
- package/es/elements/HawaCheckbox.d.ts +0 -11
- package/es/elements/HawaChip.d.ts +0 -17
- package/es/elements/HawaCodeBlock.d.ts +0 -15
- package/es/elements/HawaColorPicker.d.ts +0 -9
- package/es/elements/HawaCopyrights.d.ts +0 -15
- package/es/elements/HawaDatepicker.d.ts +0 -4
- package/es/elements/HawaDropdownMenu.d.ts +0 -7
- package/es/elements/HawaIconCount.d.ts +0 -9
- package/es/elements/HawaInlineCode.d.ts +0 -6
- package/es/elements/HawaItemCard.d.ts +0 -32
- package/es/elements/HawaLandingCard.d.ts +0 -18
- package/es/elements/HawaLoading.d.ts +0 -8
- package/es/elements/HawaLogoButton.d.ts +0 -10
- package/es/elements/HawaMenu.d.ts +0 -24
- package/es/elements/HawaModal.d.ts +0 -21
- package/es/elements/HawaPanelTabs.d.ts +0 -13
- package/es/elements/HawaPhoneInput.d.ts +0 -11
- package/es/elements/HawaPinInput.d.ts +0 -10
- package/es/elements/HawaPricingCard.d.ts +0 -21
- package/es/elements/HawaRadio.d.ts +0 -16
- package/es/elements/HawaRange.d.ts +0 -12
- package/es/elements/HawaSearchBar.d.ts +0 -4
- package/es/elements/HawaSelect.d.ts +0 -23
- package/es/elements/HawaSettingsRow.d.ts +0 -44
- package/es/elements/HawaSnackbar.d.ts +0 -19
- package/es/elements/HawaStats.d.ts +0 -14
- package/es/elements/HawaStepper.d.ts +0 -8
- package/es/elements/HawaStoreButtons.d.ts +0 -7
- package/es/elements/HawaSwitch.d.ts +0 -7
- package/es/elements/HawaTable.d.ts +0 -45
- package/es/elements/HawaTabs.d.ts +0 -13
- package/es/elements/HawaTextField.d.ts +0 -31
- package/es/elements/HawaTooltip.d.ts +0 -12
- package/es/elements/HawaTypography.d.ts +0 -7
- package/es/elements/Icons.d.ts +0 -19
- package/es/elements/Input.d.ts +0 -5
- package/es/elements/InvoiceAccordion.d.ts +0 -31
- package/es/elements/Label.d.ts +0 -5
- package/es/elements/SubsectionList.d.ts +0 -19
- package/es/elements/TabPanel.d.ts +0 -8
- package/es/elements/Timeline.d.ts +0 -13
- package/es/elements/UsageCard.d.ts +0 -9
- package/es/elements/UserFeedback.d.ts +0 -14
- package/es/elements/index.d.ts +0 -52
- package/es/hooks/index.d.ts +0 -2
- package/es/hooks/useBreakpoint.d.ts +0 -2
- package/es/hooks/useDiscloser.d.ts +0 -7
- package/es/hooks/useHover.d.ts +0 -3
- package/es/hooks/useScrollPosition.d.ts +0 -2
- package/es/hooks/useTable.d.ts +0 -5
- package/es/index.d.ts +0 -4
- package/es/index.es.js +0 -16
- package/es/layout/AppSidebar.d.ts +0 -11
- package/es/layout/Banner.d.ts +0 -14
- package/es/layout/Box.d.ts +0 -2
- package/es/layout/Footer.d.ts +0 -20
- package/es/layout/HawaAppLayout.d.ts +0 -31
- package/es/layout/HawaAppLayoutSimplified.d.ts +0 -33
- package/es/layout/HawaBottomAppBar.d.ts +0 -8
- package/es/layout/HawaContainer.d.ts +0 -10
- package/es/layout/HawaGrid.d.ts +0 -6
- package/es/layout/HawaSiteLayout.d.ts +0 -23
- package/es/layout/index.d.ts +0 -10
- package/es/stories/ElementsStories/Breadcrumb.stories.d.ts +0 -6
- package/es/stories/ManualStories/BlocksIntroduction.stories.d.ts +0 -21
- package/es/stories/ManualStories/Customization.stories.d.ts +0 -21
- package/es/stories/ManualStories/ElementsIntroduction.stories.d.ts +0 -21
- package/es/stories/ManualStories/Installation.stories.d.ts +0 -21
- package/es/stories/ManualStories/LayoutIntroduction.stories.d.ts +0 -21
- package/es/stories/ManualStories/Overview.stories.d.ts +0 -22
- package/es/stories/ManualStories/Usage.stories.d.ts +0 -21
- package/es/util.d.ts +0 -10
- package/lib/blocks/Account/HawaApiBox.d.ts +0 -8
- package/lib/blocks/Account/UserProfileForm.d.ts +0 -8
- package/lib/blocks/Account/UserSettingsForm.d.ts +0 -9
- package/lib/blocks/Account/index.d.ts +0 -2
- package/lib/blocks/AuthForms/AppLanding.d.ts +0 -14
- package/lib/blocks/AuthForms/CodeConfirmation.d.ts +0 -22
- package/lib/blocks/AuthForms/NewPasswordForm.d.ts +0 -18
- package/lib/blocks/AuthForms/ResetPasswordForm.d.ts +0 -18
- package/lib/blocks/AuthForms/SignInBlock.d.ts +0 -2
- package/lib/blocks/AuthForms/SignInForm.d.ts +0 -51
- package/lib/blocks/AuthForms/SignInPhone.d.ts +0 -13
- package/lib/blocks/AuthForms/SignUpForm.d.ts +0 -55
- package/lib/blocks/AuthForms/index.d.ts +0 -8
- package/lib/blocks/Misc/EmptyState.d.ts +0 -11
- package/lib/blocks/Misc/LeadGenerator.d.ts +0 -12
- package/lib/blocks/Misc/Newsletter.d.ts +0 -12
- package/lib/blocks/Misc/NoPermission.d.ts +0 -10
- package/lib/blocks/Misc/NotFound.d.ts +0 -11
- package/lib/blocks/Misc/Testimonial.d.ts +0 -6
- package/lib/blocks/Misc/index.d.ts +0 -6
- package/lib/blocks/Payment/ChargeWalletForm.d.ts +0 -12
- package/lib/blocks/Payment/CheckoutForm.d.ts +0 -27
- package/lib/blocks/Payment/Confirmation.d.ts +0 -38
- package/lib/blocks/Payment/CreditCardForm.d.ts +0 -7
- package/lib/blocks/Payment/PayWithWallet.d.ts +0 -8
- package/lib/blocks/Payment/SelectPayment.d.ts +0 -26
- package/lib/blocks/Payment/index.d.ts +0 -6
- package/lib/blocks/Pricing/ComparingPlans.d.ts +0 -39
- package/lib/blocks/Pricing/HorizontalPricing.d.ts +0 -47
- package/lib/blocks/Pricing/PricingPlans.d.ts +0 -47
- package/lib/blocks/Pricing/index.d.ts +0 -3
- package/lib/blocks/Referral/ReferralAccount.d.ts +0 -7
- package/lib/blocks/Referral/ReferralSettlement.d.ts +0 -8
- package/lib/blocks/Referral/ReferralStats.d.ts +0 -8
- package/lib/blocks/Referral/index.d.ts +0 -3
- package/lib/blocks/index.d.ts +0 -6
- package/lib/countries.d.ts +0 -2
- package/lib/elements/ArrowCarousel.d.ts +0 -13
- package/lib/elements/AutoCompleteField.d.ts +0 -8
- package/lib/elements/BackToTop.d.ts +0 -10
- package/lib/elements/Breadcrumb.d.ts +0 -12
- package/lib/elements/Button.d.ts +0 -12
- package/lib/elements/Card.d.ts +0 -10
- package/lib/elements/DragDropImages.d.ts +0 -28
- package/lib/elements/DraggableCard.d.ts +0 -6
- package/lib/elements/FloatingComment.d.ts +0 -32
- package/lib/elements/FloatingCommentExec.d.ts +0 -4
- package/lib/elements/FloatingCommentSlate.d.ts +0 -19
- package/lib/elements/HawaAccordion.d.ts +0 -11
- package/lib/elements/HawaAdCard.d.ts +0 -10
- package/lib/elements/HawaAlert.d.ts +0 -23
- package/lib/elements/HawaButton.d.ts +0 -21
- package/lib/elements/HawaCardInput.d.ts +0 -25
- package/lib/elements/HawaCheckbox.d.ts +0 -11
- package/lib/elements/HawaChip.d.ts +0 -17
- package/lib/elements/HawaCodeBlock.d.ts +0 -15
- package/lib/elements/HawaColorPicker.d.ts +0 -9
- package/lib/elements/HawaCopyrights.d.ts +0 -15
- package/lib/elements/HawaDatepicker.d.ts +0 -4
- package/lib/elements/HawaDropdownMenu.d.ts +0 -7
- package/lib/elements/HawaIconCount.d.ts +0 -9
- package/lib/elements/HawaInlineCode.d.ts +0 -6
- package/lib/elements/HawaItemCard.d.ts +0 -32
- package/lib/elements/HawaLandingCard.d.ts +0 -18
- package/lib/elements/HawaLoading.d.ts +0 -8
- package/lib/elements/HawaLogoButton.d.ts +0 -10
- package/lib/elements/HawaMenu.d.ts +0 -24
- package/lib/elements/HawaModal.d.ts +0 -21
- package/lib/elements/HawaPanelTabs.d.ts +0 -13
- package/lib/elements/HawaPhoneInput.d.ts +0 -11
- package/lib/elements/HawaPinInput.d.ts +0 -10
- package/lib/elements/HawaPricingCard.d.ts +0 -21
- package/lib/elements/HawaRadio.d.ts +0 -16
- package/lib/elements/HawaRange.d.ts +0 -12
- package/lib/elements/HawaSearchBar.d.ts +0 -4
- package/lib/elements/HawaSelect.d.ts +0 -23
- package/lib/elements/HawaSettingsRow.d.ts +0 -44
- package/lib/elements/HawaSnackbar.d.ts +0 -19
- package/lib/elements/HawaStats.d.ts +0 -14
- package/lib/elements/HawaStepper.d.ts +0 -8
- package/lib/elements/HawaStoreButtons.d.ts +0 -7
- package/lib/elements/HawaSwitch.d.ts +0 -7
- package/lib/elements/HawaTable.d.ts +0 -45
- package/lib/elements/HawaTabs.d.ts +0 -13
- package/lib/elements/HawaTextField.d.ts +0 -31
- package/lib/elements/HawaTooltip.d.ts +0 -12
- package/lib/elements/HawaTypography.d.ts +0 -7
- package/lib/elements/Icons.d.ts +0 -19
- package/lib/elements/Input.d.ts +0 -5
- package/lib/elements/InvoiceAccordion.d.ts +0 -31
- package/lib/elements/Label.d.ts +0 -5
- package/lib/elements/SubsectionList.d.ts +0 -19
- package/lib/elements/TabPanel.d.ts +0 -8
- package/lib/elements/Timeline.d.ts +0 -13
- package/lib/elements/UsageCard.d.ts +0 -9
- package/lib/elements/UserFeedback.d.ts +0 -14
- package/lib/elements/index.d.ts +0 -52
- package/lib/hooks/index.d.ts +0 -2
- package/lib/hooks/useBreakpoint.d.ts +0 -2
- package/lib/hooks/useDiscloser.d.ts +0 -7
- package/lib/hooks/useHover.d.ts +0 -3
- package/lib/hooks/useScrollPosition.d.ts +0 -2
- package/lib/hooks/useTable.d.ts +0 -5
- package/lib/index.d.ts +0 -4
- package/lib/index.js +0 -16
- package/lib/layout/AppSidebar.d.ts +0 -11
- package/lib/layout/Banner.d.ts +0 -14
- package/lib/layout/Box.d.ts +0 -2
- package/lib/layout/Footer.d.ts +0 -20
- package/lib/layout/HawaAppLayout.d.ts +0 -31
- package/lib/layout/HawaAppLayoutSimplified.d.ts +0 -33
- package/lib/layout/HawaBottomAppBar.d.ts +0 -8
- package/lib/layout/HawaContainer.d.ts +0 -10
- package/lib/layout/HawaGrid.d.ts +0 -6
- package/lib/layout/HawaSiteLayout.d.ts +0 -23
- package/lib/layout/index.d.ts +0 -10
- package/lib/stories/ElementsStories/Breadcrumb.stories.d.ts +0 -6
- package/lib/stories/ManualStories/BlocksIntroduction.stories.d.ts +0 -21
- package/lib/stories/ManualStories/Customization.stories.d.ts +0 -21
- package/lib/stories/ManualStories/ElementsIntroduction.stories.d.ts +0 -21
- package/lib/stories/ManualStories/Installation.stories.d.ts +0 -21
- package/lib/stories/ManualStories/LayoutIntroduction.stories.d.ts +0 -21
- package/lib/stories/ManualStories/Overview.stories.d.ts +0 -22
- package/lib/stories/ManualStories/Usage.stories.d.ts +0 -21
- package/lib/util.d.ts +0 -10
- package/postcss.config.js +0 -6
- package/rollup.config.js +0 -61
- package/src/blocks/Account/HawaApiBox.tsx +0 -12
- package/src/blocks/Account/UserProfileForm.tsx +0 -113
- package/src/blocks/Account/UserSettingsForm.tsx +0 -27
- package/src/blocks/Account/index.ts +0 -2
- package/src/blocks/AuthForms/AppLanding.tsx +0 -34
- package/src/blocks/AuthForms/CodeConfirmation.tsx +0 -71
- package/src/blocks/AuthForms/NewPasswordForm.tsx +0 -101
- package/src/blocks/AuthForms/ResetPasswordForm.tsx +0 -89
- package/src/blocks/AuthForms/SignInBlock.tsx +0 -60
- package/src/blocks/AuthForms/SignInForm.tsx +0 -230
- package/src/blocks/AuthForms/SignInPhone.tsx +0 -56
- package/src/blocks/AuthForms/SignUpForm.tsx +0 -342
- package/src/blocks/AuthForms/index.ts +0 -8
- package/src/blocks/Misc/EmptyState.tsx +0 -43
- package/src/blocks/Misc/LeadGenerator.tsx +0 -44
- package/src/blocks/Misc/Newsletter.tsx +0 -50
- package/src/blocks/Misc/NoPermission.tsx +0 -40
- package/src/blocks/Misc/NotFound.tsx +0 -34
- package/src/blocks/Misc/Testimonial.tsx +0 -44
- package/src/blocks/Misc/index.ts +0 -6
- package/src/blocks/Payment/ChargeWalletForm.tsx +0 -82
- package/src/blocks/Payment/CheckoutForm.tsx +0 -260
- package/src/blocks/Payment/Confirmation.tsx +0 -94
- package/src/blocks/Payment/CreditCardForm.tsx +0 -109
- package/src/blocks/Payment/PayWithWallet.tsx +0 -26
- package/src/blocks/Payment/SelectPayment.tsx +0 -84
- package/src/blocks/Payment/index.ts +0 -6
- package/src/blocks/Pricing/ComparingPlans.tsx +0 -154
- package/src/blocks/Pricing/HorizontalPricing.tsx +0 -148
- package/src/blocks/Pricing/PricingPlans.tsx +0 -81
- package/src/blocks/Pricing/index.ts +0 -3
- package/src/blocks/Referral/ReferralAccount.tsx +0 -65
- package/src/blocks/Referral/ReferralSettlement.tsx +0 -170
- package/src/blocks/Referral/ReferralStats.tsx +0 -85
- package/src/blocks/Referral/index.ts +0 -3
- package/src/blocks/index.ts +0 -6
- package/src/countries.ts +0 -1940
- package/src/elements/ArrowCarousel.tsx +0 -94
- package/src/elements/AutoCompleteField.tsx +0 -37
- package/src/elements/BackToTop.tsx +0 -129
- package/src/elements/Breadcrumb.tsx +0 -41
- package/src/elements/Button.tsx +0 -77
- package/src/elements/Card.tsx +0 -87
- package/src/elements/DragDropImages.tsx +0 -251
- package/src/elements/DraggableCard.tsx +0 -27
- package/src/elements/FloatingComment.tsx +0 -1107
- package/src/elements/FloatingCommentExec.tsx +0 -106
- package/src/elements/FloatingCommentSlate.tsx +0 -149
- package/src/elements/HawaAccordion.tsx +0 -57
- package/src/elements/HawaAdCard.tsx +0 -49
- package/src/elements/HawaAlert.tsx +0 -195
- package/src/elements/HawaButton.tsx +0 -241
- package/src/elements/HawaCardInput.tsx +0 -318
- package/src/elements/HawaCheckbox.tsx +0 -54
- package/src/elements/HawaChip.tsx +0 -59
- package/src/elements/HawaCodeBlock.tsx +0 -156
- package/src/elements/HawaColorPicker.tsx +0 -40
- package/src/elements/HawaCopyrights.tsx +0 -30
- package/src/elements/HawaDatepicker.tsx +0 -23
- package/src/elements/HawaDropdownMenu.tsx +0 -267
- package/src/elements/HawaIconCount.tsx +0 -17
- package/src/elements/HawaInlineCode.tsx +0 -9
- package/src/elements/HawaItemCard.tsx +0 -157
- package/src/elements/HawaLandingCard.tsx +0 -68
- package/src/elements/HawaLoading.tsx +0 -83
- package/src/elements/HawaLogoButton.tsx +0 -154
- package/src/elements/HawaMenu.tsx +0 -226
- package/src/elements/HawaModal.tsx +0 -89
- package/src/elements/HawaPanelTabs.tsx +0 -57
- package/src/elements/HawaPhoneInput.tsx +0 -171
- package/src/elements/HawaPinInput.tsx +0 -78
- package/src/elements/HawaPricingCard.tsx +0 -107
- package/src/elements/HawaRadio.tsx +0 -180
- package/src/elements/HawaRange.tsx +0 -49
- package/src/elements/HawaSearchBar.tsx +0 -7
- package/src/elements/HawaSelect.tsx +0 -209
- package/src/elements/HawaSettingsRow.tsx +0 -74
- package/src/elements/HawaSnackbar.tsx +0 -137
- package/src/elements/HawaStats.tsx +0 -72
- package/src/elements/HawaStepper.tsx +0 -109
- package/src/elements/HawaStoreButtons.tsx +0 -129
- package/src/elements/HawaSwitch.tsx +0 -41
- package/src/elements/HawaTable.tsx +0 -587
- package/src/elements/HawaTabs.tsx +0 -143
- package/src/elements/HawaTextField.tsx +0 -148
- package/src/elements/HawaTooltip.tsx +0 -137
- package/src/elements/HawaTypography.tsx +0 -9
- package/src/elements/Icons.tsx +0 -145
- package/src/elements/Input.tsx +0 -25
- package/src/elements/InvoiceAccordion.tsx +0 -155
- package/src/elements/Label.tsx +0 -26
- package/src/elements/SubsectionList.tsx +0 -77
- package/src/elements/TabPanel.tsx +0 -25
- package/src/elements/Timeline.tsx +0 -35
- package/src/elements/UsageCard.tsx +0 -45
- package/src/elements/UserFeedback.tsx +0 -126
- package/src/elements/index.ts +0 -55
- package/src/hooks/index.ts +0 -2
- package/src/hooks/useBreakpoint.ts +0 -24
- package/src/hooks/useDiscloser.ts +0 -21
- package/src/hooks/useHover.ts +0 -25
- package/src/hooks/useScrollPosition.ts +0 -30
- package/src/hooks/useTable.ts +0 -159
- package/src/index.ts +0 -4
- package/src/layout/AppSidebar.tsx +0 -39
- package/src/layout/Banner.tsx +0 -122
- package/src/layout/Box.tsx +0 -5
- package/src/layout/Footer.tsx +0 -71
- package/src/layout/HawaAppLayout.tsx +0 -527
- package/src/layout/HawaAppLayoutSimplified.tsx +0 -568
- package/src/layout/HawaBottomAppBar.tsx +0 -55
- package/src/layout/HawaContainer.tsx +0 -43
- package/src/layout/HawaGrid.tsx +0 -15
- package/src/layout/HawaSiteLayout.tsx +0 -159
- package/src/layout/index.ts +0 -10
- package/src/styles.css +0 -3511
- package/src/tailwind.css +0 -179
- package/src/translations/ar.json +0 -30
- package/src/translations/en.json +0 -29
- package/src/translations/i18n.js +0 -15
- package/src/util.ts +0 -149
- package/tailwind.config.js +0 -227
- package/tools/build-styles.js +0 -17
- package/tsconfig.json +0 -31
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import React, { useState, FC } from "react"
|
|
2
|
-
import { HawaAlert, HawaButton, HawaPinInput } from "../../elements"
|
|
3
|
-
import { HawaContainer } from "../../layout"
|
|
4
|
-
|
|
5
|
-
type TConfirmation = {
|
|
6
|
-
showError?: any
|
|
7
|
-
errorTitle?: any
|
|
8
|
-
errorText?: any
|
|
9
|
-
texts?: {
|
|
10
|
-
checkYourPhone: string
|
|
11
|
-
weSentCode: string
|
|
12
|
-
didntGetCode: string
|
|
13
|
-
resendCode: string
|
|
14
|
-
codeLabel: string
|
|
15
|
-
codePlaceholder: string
|
|
16
|
-
codeRequiredText: string
|
|
17
|
-
confirm: string
|
|
18
|
-
cancel: string
|
|
19
|
-
}
|
|
20
|
-
phoneNumber?: string
|
|
21
|
-
submitConfirmation?: any
|
|
22
|
-
handleSignIn?: any
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const CodeConfirmation: FC<TConfirmation> = (props) => {
|
|
26
|
-
const [pins, setPins] = useState(null)
|
|
27
|
-
return (
|
|
28
|
-
<HawaContainer>
|
|
29
|
-
{props.showError && (
|
|
30
|
-
<HawaAlert
|
|
31
|
-
title={props.errorTitle}
|
|
32
|
-
text={props.errorText}
|
|
33
|
-
severity="error"
|
|
34
|
-
/>
|
|
35
|
-
)}
|
|
36
|
-
<div className="mb-4 dark:text-white">
|
|
37
|
-
<div className="text-lg font-bold">
|
|
38
|
-
{props.texts.checkYourPhone ?? "Please check your phone"}
|
|
39
|
-
</div>
|
|
40
|
-
<div className="text-muted-foreground">
|
|
41
|
-
<span>{props.texts.weSentCode ?? "We've sent a code to "}</span>
|
|
42
|
-
<span>{props.phoneNumber}</span>
|
|
43
|
-
</div>{" "}
|
|
44
|
-
</div>
|
|
45
|
-
<form
|
|
46
|
-
onSubmit={(e) => {
|
|
47
|
-
e.preventDefault()
|
|
48
|
-
if (pins) {
|
|
49
|
-
props.submitConfirmation(pins)
|
|
50
|
-
}
|
|
51
|
-
}}
|
|
52
|
-
>
|
|
53
|
-
<HawaPinInput width="full" digits={6} getPins={(e) => setPins(e)} />
|
|
54
|
-
<div className=" py-2 text-center text-xs text-muted-foreground">
|
|
55
|
-
<span>{props.texts.didntGetCode ?? "Didn't get the code?"}</span>{" "}
|
|
56
|
-
<span className="cursor-pointer text-buttonPrimary-500">
|
|
57
|
-
{props.texts.resendCode ?? "Click to resend"}
|
|
58
|
-
</span>
|
|
59
|
-
</div>
|
|
60
|
-
<div className="mt-4 grid grid-cols-2 gap-2">
|
|
61
|
-
<HawaButton margins={"none"} variant="outlined" width="full">
|
|
62
|
-
{props.texts.cancel ?? "Cancel"}
|
|
63
|
-
</HawaButton>
|
|
64
|
-
<HawaButton margins={"none"} color="primary" width="full">
|
|
65
|
-
{props.texts.confirm ?? "Confirm"}
|
|
66
|
-
</HawaButton>
|
|
67
|
-
</div>
|
|
68
|
-
</form>
|
|
69
|
-
</HawaContainer>
|
|
70
|
-
)
|
|
71
|
-
}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import React, { useState, FC } from "react"
|
|
2
|
-
import { HawaTextField, HawaAlert, HawaButton } from "../../elements"
|
|
3
|
-
import { Controller, FormProvider, useForm } from "react-hook-form"
|
|
4
|
-
import { HawaContainer } from "../../layout"
|
|
5
|
-
|
|
6
|
-
type NewPasswordTypes = {
|
|
7
|
-
handleNewPassword: () => void
|
|
8
|
-
passwordChanged: any
|
|
9
|
-
texts: {
|
|
10
|
-
passwordPlaceholder: string
|
|
11
|
-
updatePassword: string
|
|
12
|
-
passwordRequiredText: string
|
|
13
|
-
passwordLabel: string
|
|
14
|
-
confirmPasswordPlaceholder: string
|
|
15
|
-
confirmPasswordLabel: string
|
|
16
|
-
confirmPasswordRequiredText: string
|
|
17
|
-
passwordMatchError: string
|
|
18
|
-
passwordChanged: string
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const NewPasswordForm: FC<NewPasswordTypes> = (props) => {
|
|
23
|
-
const [matchError, setMatchError] = useState(false)
|
|
24
|
-
const methods = useForm()
|
|
25
|
-
const {
|
|
26
|
-
formState: { errors },
|
|
27
|
-
handleSubmit,
|
|
28
|
-
control,
|
|
29
|
-
} = methods
|
|
30
|
-
|
|
31
|
-
const handleSubmission = (e: any) => {
|
|
32
|
-
if (e.password === e.confirmPassword) {
|
|
33
|
-
props.handleNewPassword()
|
|
34
|
-
} else {
|
|
35
|
-
setMatchError(true)
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return (
|
|
40
|
-
<HawaContainer>
|
|
41
|
-
{" "}
|
|
42
|
-
{matchError && (
|
|
43
|
-
<HawaAlert text={props.texts.passwordMatchError} severity="error" />
|
|
44
|
-
)}
|
|
45
|
-
{props.passwordChanged ? (
|
|
46
|
-
<div className="text-center">{props.texts.passwordChanged}</div>
|
|
47
|
-
) : (
|
|
48
|
-
<FormProvider {...methods}>
|
|
49
|
-
<form onSubmit={handleSubmit(handleSubmission)}>
|
|
50
|
-
<Controller
|
|
51
|
-
control={control}
|
|
52
|
-
name="password"
|
|
53
|
-
render={({ field }) => (
|
|
54
|
-
<HawaTextField
|
|
55
|
-
width="full"
|
|
56
|
-
type="password"
|
|
57
|
-
autoComplete="new-password"
|
|
58
|
-
label={props.texts.passwordLabel}
|
|
59
|
-
placeholder={props.texts.passwordPlaceholder}
|
|
60
|
-
helpertext={errors.password?.message}
|
|
61
|
-
{...field}
|
|
62
|
-
value={field.value ?? ""}
|
|
63
|
-
/>
|
|
64
|
-
)}
|
|
65
|
-
rules={{
|
|
66
|
-
required: props.texts.passwordRequiredText,
|
|
67
|
-
}}
|
|
68
|
-
/>
|
|
69
|
-
<Controller
|
|
70
|
-
control={control}
|
|
71
|
-
name="confirmPassword"
|
|
72
|
-
render={({ field }) => (
|
|
73
|
-
<HawaTextField
|
|
74
|
-
width="full"
|
|
75
|
-
type="password"
|
|
76
|
-
autoComplete="new-password"
|
|
77
|
-
label={props.texts.confirmPasswordLabel}
|
|
78
|
-
placeholder={props.texts.confirmPasswordPlaceholder}
|
|
79
|
-
helpertext={errors.confirmPassword?.message}
|
|
80
|
-
{...field}
|
|
81
|
-
value={field.value ?? ""}
|
|
82
|
-
/>
|
|
83
|
-
)}
|
|
84
|
-
rules={{
|
|
85
|
-
required: props.texts.confirmPasswordRequiredText,
|
|
86
|
-
}}
|
|
87
|
-
/>
|
|
88
|
-
|
|
89
|
-
<HawaButton
|
|
90
|
-
color="primary"
|
|
91
|
-
// type="submit"
|
|
92
|
-
width="full"
|
|
93
|
-
>
|
|
94
|
-
{props.texts.updatePassword}
|
|
95
|
-
</HawaButton>
|
|
96
|
-
</form>
|
|
97
|
-
</FormProvider>
|
|
98
|
-
)}
|
|
99
|
-
</HawaContainer>
|
|
100
|
-
)
|
|
101
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import React, { FC } from "react"
|
|
2
|
-
import { Controller, useForm } from "react-hook-form"
|
|
3
|
-
import { HawaTextField } from "../../elements"
|
|
4
|
-
import {
|
|
5
|
-
Card,
|
|
6
|
-
CardContent,
|
|
7
|
-
CardDescription,
|
|
8
|
-
CardHeader,
|
|
9
|
-
CardTitle,
|
|
10
|
-
} from "../../elements/Card"
|
|
11
|
-
import { Button } from "../../elements/Button"
|
|
12
|
-
|
|
13
|
-
type ResetPasswordType = {
|
|
14
|
-
handleResetPassword: () => void
|
|
15
|
-
handleRouteToSignUp: () => void
|
|
16
|
-
sent: any
|
|
17
|
-
texts: {
|
|
18
|
-
emailLabel: string
|
|
19
|
-
emailPlaceholder: string
|
|
20
|
-
emailRequiredText: string
|
|
21
|
-
emailInvalidText: string
|
|
22
|
-
emailSentText: string
|
|
23
|
-
resetPassword: string
|
|
24
|
-
signUpText: string
|
|
25
|
-
dontHaveAccount: string
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const ResetPasswordForm: FC<ResetPasswordType> = (props) => {
|
|
30
|
-
const methods = useForm()
|
|
31
|
-
const {
|
|
32
|
-
formState: { errors },
|
|
33
|
-
handleSubmit,
|
|
34
|
-
register,
|
|
35
|
-
control,
|
|
36
|
-
} = methods
|
|
37
|
-
return (
|
|
38
|
-
<Card>
|
|
39
|
-
<CardHeader>
|
|
40
|
-
<CardTitle>Reset Password</CardTitle>
|
|
41
|
-
<CardDescription>
|
|
42
|
-
Enter your email to reset your account password
|
|
43
|
-
</CardDescription>
|
|
44
|
-
</CardHeader>
|
|
45
|
-
<CardContent>
|
|
46
|
-
{!props.sent ? (
|
|
47
|
-
<form onSubmit={handleSubmit(props.handleResetPassword)}>
|
|
48
|
-
<Controller
|
|
49
|
-
control={control}
|
|
50
|
-
name="email"
|
|
51
|
-
render={({ field }) => (
|
|
52
|
-
<HawaTextField
|
|
53
|
-
width="full"
|
|
54
|
-
type="text"
|
|
55
|
-
label={props.texts.emailLabel}
|
|
56
|
-
helpertext={errors.email?.message}
|
|
57
|
-
placeholder={props.texts.emailPlaceholder}
|
|
58
|
-
{...field}
|
|
59
|
-
value={field.value ?? ""}
|
|
60
|
-
/>
|
|
61
|
-
)}
|
|
62
|
-
rules={{
|
|
63
|
-
required: props.texts.emailRequiredText,
|
|
64
|
-
pattern: {
|
|
65
|
-
value:
|
|
66
|
-
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
|
67
|
-
message: props.texts.emailInvalidText,
|
|
68
|
-
},
|
|
69
|
-
}}
|
|
70
|
-
/>
|
|
71
|
-
<div className=" pb-2 text-left text-sm dark:text-gray-300">
|
|
72
|
-
{props.texts.dontHaveAccount ?? "Don't have an account? "}
|
|
73
|
-
<span
|
|
74
|
-
onClick={props.handleRouteToSignUp}
|
|
75
|
-
className="cursor-pointer text-blue-600 dark:text-blue-400"
|
|
76
|
-
>
|
|
77
|
-
{props.texts.signUpText ?? "Sign Up"}
|
|
78
|
-
</span>
|
|
79
|
-
</div>
|
|
80
|
-
|
|
81
|
-
<Button className="w-full">{props.texts.resetPassword}</Button>
|
|
82
|
-
</form>
|
|
83
|
-
) : (
|
|
84
|
-
<div className="text-center">{props.texts.emailSentText}</div>
|
|
85
|
-
)}
|
|
86
|
-
</CardContent>
|
|
87
|
-
</Card>
|
|
88
|
-
)
|
|
89
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import { Icons } from "../../elements/Icons"
|
|
4
|
-
import { Button } from "../../elements/Button"
|
|
5
|
-
import {
|
|
6
|
-
Card,
|
|
7
|
-
CardContent,
|
|
8
|
-
CardDescription,
|
|
9
|
-
CardFooter,
|
|
10
|
-
CardHeader,
|
|
11
|
-
CardTitle,
|
|
12
|
-
} from "../../elements/Card"
|
|
13
|
-
import { Input } from "../../elements/Input"
|
|
14
|
-
import { Label } from "../../elements/Label"
|
|
15
|
-
|
|
16
|
-
export function SignInBlock() {
|
|
17
|
-
return (
|
|
18
|
-
<Card>
|
|
19
|
-
<CardHeader className="space-y-1">
|
|
20
|
-
<CardTitle className="text-2xl">Create an account</CardTitle>
|
|
21
|
-
<CardDescription>
|
|
22
|
-
Enter your email below to create your account
|
|
23
|
-
</CardDescription>
|
|
24
|
-
</CardHeader>
|
|
25
|
-
<CardContent className="grid gap-4">
|
|
26
|
-
<div className="grid grid-cols-2 gap-6">
|
|
27
|
-
<Button variant="outline">
|
|
28
|
-
<Icons.gitHub className="mr-2 h-4 w-4" />
|
|
29
|
-
Github
|
|
30
|
-
</Button>
|
|
31
|
-
<Button variant="outline">
|
|
32
|
-
<Icons.google className="mr-2 h-4 w-4" />
|
|
33
|
-
Google
|
|
34
|
-
</Button>
|
|
35
|
-
</div>
|
|
36
|
-
<div className="relative">
|
|
37
|
-
<div className="absolute inset-0 flex items-center">
|
|
38
|
-
<span className="w-full border-t" />
|
|
39
|
-
</div>
|
|
40
|
-
<div className="relative flex justify-center text-xs uppercase">
|
|
41
|
-
<span className="bg-background px-2 text-muted-foreground">
|
|
42
|
-
Or continue with
|
|
43
|
-
</span>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
<div className="grid gap-2">
|
|
47
|
-
<Label htmlFor="email">Email</Label>
|
|
48
|
-
<Input id="email" type="email" placeholder="m@example.com" />
|
|
49
|
-
</div>
|
|
50
|
-
<div className="grid gap-2">
|
|
51
|
-
<Label htmlFor="password">Password</Label>
|
|
52
|
-
<Input id="password" type="password" />
|
|
53
|
-
</div>
|
|
54
|
-
</CardContent>
|
|
55
|
-
<CardFooter>
|
|
56
|
-
<Button className="w-full">Create account</Button>
|
|
57
|
-
</CardFooter>
|
|
58
|
-
</Card>
|
|
59
|
-
)
|
|
60
|
-
}
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
import React, { FC } from "react"
|
|
2
|
-
import {
|
|
3
|
-
HawaTextField,
|
|
4
|
-
HawaLogoButton,
|
|
5
|
-
HawaAlert,
|
|
6
|
-
HawaButton,
|
|
7
|
-
HawaPhoneInput,
|
|
8
|
-
} from "../../elements"
|
|
9
|
-
import { Controller, useForm } from "react-hook-form"
|
|
10
|
-
import { HawaContainer } from "../../layout"
|
|
11
|
-
import { Button } from "../../elements/Button"
|
|
12
|
-
import { FaGithub, FaGoogle } from "react-icons/fa"
|
|
13
|
-
import { Card, CardContent, CardFooter, CardHeader } from "../../elements/Card"
|
|
14
|
-
import { Icons } from "../../elements/Icons"
|
|
15
|
-
import clsx from "clsx"
|
|
16
|
-
|
|
17
|
-
export const SignInForm: FC<SignInFormTypes> = (props) => {
|
|
18
|
-
const {
|
|
19
|
-
formState: { errors },
|
|
20
|
-
handleSubmit,
|
|
21
|
-
control,
|
|
22
|
-
} = useForm()
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<Card dir={props.direction}>
|
|
26
|
-
<CardContent headless>
|
|
27
|
-
<form onSubmit={handleSubmit((e) => props.handleSignIn(e))}>
|
|
28
|
-
{props.showError && (
|
|
29
|
-
<HawaAlert
|
|
30
|
-
title={props.errorTitle}
|
|
31
|
-
text={props.errorText}
|
|
32
|
-
severity="error"
|
|
33
|
-
/>
|
|
34
|
-
)}
|
|
35
|
-
{props.signInType === "email" ? (
|
|
36
|
-
<Controller
|
|
37
|
-
control={control}
|
|
38
|
-
name="email"
|
|
39
|
-
render={({ field }) => (
|
|
40
|
-
<HawaTextField
|
|
41
|
-
width="full"
|
|
42
|
-
type="text"
|
|
43
|
-
autoComplete="email"
|
|
44
|
-
label={props.texts.emailLabel}
|
|
45
|
-
helpertext={errors.email?.message}
|
|
46
|
-
placeholder={props.texts.emailPlaceholder}
|
|
47
|
-
value={field.value ?? ""}
|
|
48
|
-
onChange={field.onChange}
|
|
49
|
-
/>
|
|
50
|
-
)}
|
|
51
|
-
rules={{
|
|
52
|
-
required: props.texts.emailRequiredText,
|
|
53
|
-
pattern: {
|
|
54
|
-
value:
|
|
55
|
-
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
|
56
|
-
message: props.texts.emailInvalidText,
|
|
57
|
-
},
|
|
58
|
-
}}
|
|
59
|
-
/>
|
|
60
|
-
) : props.signInType === "username" ? (
|
|
61
|
-
<Controller
|
|
62
|
-
control={control}
|
|
63
|
-
name="username"
|
|
64
|
-
render={({ field }) => {
|
|
65
|
-
return (
|
|
66
|
-
<HawaTextField
|
|
67
|
-
width="full"
|
|
68
|
-
type="text"
|
|
69
|
-
autoComplete="username"
|
|
70
|
-
label={props.texts.usernameLabel}
|
|
71
|
-
helpertext={errors.username?.message}
|
|
72
|
-
placeholder={props.texts.usernamePlaceholder}
|
|
73
|
-
onChange={field.onChange}
|
|
74
|
-
value={field.value ?? ""}
|
|
75
|
-
/>
|
|
76
|
-
)
|
|
77
|
-
}}
|
|
78
|
-
rules={{
|
|
79
|
-
required: props.texts.usernameRequired,
|
|
80
|
-
}}
|
|
81
|
-
/>
|
|
82
|
-
) : (
|
|
83
|
-
<Controller
|
|
84
|
-
control={control}
|
|
85
|
-
name="phone"
|
|
86
|
-
render={({ field }) => <HawaPhoneInput label="Phone number" />}
|
|
87
|
-
rules={{ required: props.texts.phoneRequiredText }}
|
|
88
|
-
/>
|
|
89
|
-
)}
|
|
90
|
-
{props.signInType !== "phone" && (
|
|
91
|
-
<>
|
|
92
|
-
<Controller
|
|
93
|
-
control={control}
|
|
94
|
-
name="password"
|
|
95
|
-
render={({ field }) => (
|
|
96
|
-
<HawaTextField
|
|
97
|
-
width="full"
|
|
98
|
-
autoComplete="current-password"
|
|
99
|
-
type="password"
|
|
100
|
-
label={props.texts.passwordLabel}
|
|
101
|
-
placeholder={props.texts.passwordPlaceholder}
|
|
102
|
-
helpertext={errors.password?.message}
|
|
103
|
-
onChange={field.onChange}
|
|
104
|
-
value={field.value ?? ""}
|
|
105
|
-
/>
|
|
106
|
-
)}
|
|
107
|
-
rules={{
|
|
108
|
-
required: props.texts.passwordRequiredText,
|
|
109
|
-
minLength: 5,
|
|
110
|
-
}}
|
|
111
|
-
/>
|
|
112
|
-
{!props.withoutResetPassword && (
|
|
113
|
-
<div
|
|
114
|
-
onClick={props.handleForgotPassword}
|
|
115
|
-
className="mb-3 w-fit cursor-pointer text-xs dark:text-gray-300"
|
|
116
|
-
>
|
|
117
|
-
{props.texts.forgotPasswordText}
|
|
118
|
-
</div>
|
|
119
|
-
)}
|
|
120
|
-
</>
|
|
121
|
-
)}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
<Button className="w-full" isLoading={props.isLoading}>
|
|
125
|
-
{props.texts.signInText}
|
|
126
|
-
</Button>
|
|
127
|
-
{!props.withoutSignUp && (
|
|
128
|
-
<div className="p-3 text-center text-sm font-semibold dark:text-gray-300">
|
|
129
|
-
{props.texts.newUserText}{" "}
|
|
130
|
-
<span
|
|
131
|
-
onClick={props.handleRouteToSignUp}
|
|
132
|
-
className="cursor-pointer text-blue-600 dark:text-blue-400"
|
|
133
|
-
>
|
|
134
|
-
{props.texts.createAccount}
|
|
135
|
-
</span>
|
|
136
|
-
</div>
|
|
137
|
-
)}
|
|
138
|
-
</form>
|
|
139
|
-
</CardContent>
|
|
140
|
-
|
|
141
|
-
{/* 3rd Party Sign Auth Buttons */}
|
|
142
|
-
{props.viaGithub || props.viaGoogle || props.viaTwitter ? (
|
|
143
|
-
<CardFooter className="grid grid-cols-1 gap-2 ">
|
|
144
|
-
{props.viaGoogle && (
|
|
145
|
-
<Button variant="outline" onClick={props.handleGoogleSignIn}>
|
|
146
|
-
<Icons.google
|
|
147
|
-
className={clsx(
|
|
148
|
-
"h-4 w-4",
|
|
149
|
-
props.direction === "rtl" ? "ml-2" : "mr-2"
|
|
150
|
-
)}
|
|
151
|
-
/>
|
|
152
|
-
{props.texts.signInViaGoogleLabel}
|
|
153
|
-
</Button>
|
|
154
|
-
)}
|
|
155
|
-
{props.viaGithub && (
|
|
156
|
-
<Button variant="outline" onClick={props.handleGithubSignIn}>
|
|
157
|
-
<Icons.gitHub
|
|
158
|
-
className={clsx(
|
|
159
|
-
"h-4 w-4",
|
|
160
|
-
props.direction === "rtl" ? "ml-2" : "mr-2"
|
|
161
|
-
)}
|
|
162
|
-
/>
|
|
163
|
-
{props.texts.signInViaGithubLabel}
|
|
164
|
-
</Button>
|
|
165
|
-
)}
|
|
166
|
-
{props.viaTwitter && (
|
|
167
|
-
<Button variant="outline" onClick={props.handleTwitterSignIn}>
|
|
168
|
-
<Icons.twitter
|
|
169
|
-
className={clsx(
|
|
170
|
-
"h-4 w-4",
|
|
171
|
-
props.direction === "rtl" ? "ml-2" : "mr-2"
|
|
172
|
-
)}
|
|
173
|
-
/>
|
|
174
|
-
{props.texts.signInViaTwitterLabel}
|
|
175
|
-
</Button>
|
|
176
|
-
)}
|
|
177
|
-
</CardFooter>
|
|
178
|
-
) : null}
|
|
179
|
-
</Card>
|
|
180
|
-
)
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
type SignInFormTypes = {
|
|
184
|
-
direction?: "rtl" | "ltr"
|
|
185
|
-
showError?: any
|
|
186
|
-
errorTitle?: string
|
|
187
|
-
errorText?: string
|
|
188
|
-
signInType?: "email" | "username" | "phone"
|
|
189
|
-
texts?: {
|
|
190
|
-
emailLabel?: string
|
|
191
|
-
emailPlaceholder?: string
|
|
192
|
-
emailRequiredText?: string
|
|
193
|
-
emailInvalidText?: string
|
|
194
|
-
usernameLabel?: string
|
|
195
|
-
usernamePlaceholder?: string
|
|
196
|
-
usernameRequired?: string
|
|
197
|
-
phoneRequiredText?: string
|
|
198
|
-
passwordLabel?: string
|
|
199
|
-
passwordPlaceholder?: string
|
|
200
|
-
passwordRequiredText?: string
|
|
201
|
-
forgotPasswordText?: string
|
|
202
|
-
newUserText?: string
|
|
203
|
-
createAccount?: string
|
|
204
|
-
signInText?: string
|
|
205
|
-
signInViaGoogleLabel?: string
|
|
206
|
-
signInViaGithubLabel?: string
|
|
207
|
-
signInViaTwitterLabel?: string
|
|
208
|
-
}
|
|
209
|
-
withoutResetPassword?: boolean
|
|
210
|
-
withoutSignUp?: boolean
|
|
211
|
-
/**
|
|
212
|
-
*show spinner if true
|
|
213
|
-
*/
|
|
214
|
-
isLoading?: any
|
|
215
|
-
viaGoogle?: boolean
|
|
216
|
-
viaGithub?: boolean
|
|
217
|
-
viaTwitter?: boolean
|
|
218
|
-
/**
|
|
219
|
-
* Handle the sign in .
|
|
220
|
-
*/
|
|
221
|
-
handleSignIn?: (e: any) => void
|
|
222
|
-
/**
|
|
223
|
-
* Handle routing to sign up page
|
|
224
|
-
*/
|
|
225
|
-
handleRouteToSignUp?: () => void
|
|
226
|
-
handleForgotPassword?: () => void
|
|
227
|
-
handleGoogleSignIn?: () => void
|
|
228
|
-
handleGithubSignIn?: () => void
|
|
229
|
-
handleTwitterSignIn?: () => void
|
|
230
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React, { useState, FC } from "react"
|
|
2
|
-
import { Controller, useForm } from "react-hook-form"
|
|
3
|
-
import { HawaButton, HawaPhoneInput } from "../../elements"
|
|
4
|
-
import { HawaContainer } from "../../layout"
|
|
5
|
-
|
|
6
|
-
type SignInPhoneTypes = {
|
|
7
|
-
value: any
|
|
8
|
-
onSubmit: any
|
|
9
|
-
country: any
|
|
10
|
-
label: any
|
|
11
|
-
handlePhoneChange: any
|
|
12
|
-
phoneRequiredText: any
|
|
13
|
-
SignInButtonText: any
|
|
14
|
-
handleSignIn: any
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export const SignInPhone: FC<SignInPhoneTypes> = (props) => {
|
|
18
|
-
const methods = useForm()
|
|
19
|
-
const {
|
|
20
|
-
formState: { errors },
|
|
21
|
-
handleSubmit,
|
|
22
|
-
control,
|
|
23
|
-
} = methods
|
|
24
|
-
|
|
25
|
-
const [userPhone, setUserPhone] = useState("")
|
|
26
|
-
return (
|
|
27
|
-
<HawaContainer>
|
|
28
|
-
<form
|
|
29
|
-
onSubmit={(e) => {
|
|
30
|
-
e.preventDefault()
|
|
31
|
-
props.handleSignIn(userPhone)
|
|
32
|
-
}}
|
|
33
|
-
>
|
|
34
|
-
<Controller
|
|
35
|
-
control={control}
|
|
36
|
-
name="phone"
|
|
37
|
-
render={({ field }) => (
|
|
38
|
-
<HawaPhoneInput
|
|
39
|
-
country={props.country ?? ""}
|
|
40
|
-
label={props.label ?? ""}
|
|
41
|
-
handleChange={(e: any) => setUserPhone(e.target.value)}
|
|
42
|
-
{...field}
|
|
43
|
-
/>
|
|
44
|
-
)}
|
|
45
|
-
rules={{
|
|
46
|
-
required: props.phoneRequiredText,
|
|
47
|
-
}}
|
|
48
|
-
/>
|
|
49
|
-
<div className="mt-2"></div>
|
|
50
|
-
<HawaButton color="primary" width="full">
|
|
51
|
-
{props.SignInButtonText}
|
|
52
|
-
</HawaButton>
|
|
53
|
-
</form>
|
|
54
|
-
</HawaContainer>
|
|
55
|
-
)
|
|
56
|
-
}
|