@ankhorage/zora 11.0.0 → 12.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +2 -1
- package/dist/constants.d.ts +5 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +12 -0
- package/dist/constants.js.map +1 -1
- package/dist/{patterns/auth → features/auth/adapters/inbound}/AuthForm.d.ts +3 -3
- package/dist/features/auth/adapters/inbound/AuthForm.d.ts.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/AuthForm.js +2 -2
- package/dist/features/auth/adapters/inbound/AuthForm.js.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/AuthFormField.d.ts +2 -2
- package/dist/features/auth/adapters/inbound/AuthFormField.d.ts.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/AuthFormField.js +2 -2
- package/dist/features/auth/adapters/inbound/AuthFormField.js.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/ForgotPasswordForm.d.ts +1 -1
- package/dist/features/auth/adapters/inbound/ForgotPasswordForm.d.ts.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/ForgotPasswordForm.js +5 -5
- package/dist/features/auth/adapters/inbound/ForgotPasswordForm.js.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderButton.d.ts +1 -1
- package/dist/features/auth/adapters/inbound/OAuthProviderButton.d.ts.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderButton.js +3 -3
- package/dist/features/auth/adapters/inbound/OAuthProviderButton.js.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderList.d.ts +1 -1
- package/dist/features/auth/adapters/inbound/OAuthProviderList.d.ts.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderList.js +2 -2
- package/dist/features/auth/adapters/inbound/OAuthProviderList.js.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/OtpForm.d.ts +1 -1
- package/dist/features/auth/adapters/inbound/OtpForm.d.ts.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/OtpForm.js +4 -4
- package/dist/features/auth/adapters/inbound/OtpForm.js.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/SignInForm.d.ts +1 -1
- package/dist/features/auth/adapters/inbound/SignInForm.d.ts.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/SignInForm.js +5 -5
- package/dist/features/auth/adapters/inbound/SignInForm.js.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/SignUpForm.d.ts +1 -1
- package/dist/features/auth/adapters/inbound/SignUpForm.d.ts.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/SignUpForm.js +3 -3
- package/dist/features/auth/adapters/inbound/SignUpForm.js.map +1 -0
- package/dist/features/auth/forgotPasswordFormMeta.d.ts +79 -0
- package/dist/features/auth/forgotPasswordFormMeta.d.ts.map +1 -0
- package/dist/features/auth/forgotPasswordFormMeta.js +48 -0
- package/dist/features/auth/forgotPasswordFormMeta.js.map +1 -0
- package/dist/features/auth/oauthProviderButtonMeta.d.ts +83 -0
- package/dist/features/auth/oauthProviderButtonMeta.d.ts.map +1 -0
- package/dist/features/auth/oauthProviderButtonMeta.js +61 -0
- package/dist/features/auth/oauthProviderButtonMeta.js.map +1 -0
- package/dist/features/auth/oauthProviderListMeta.d.ts +109 -0
- package/dist/features/auth/oauthProviderListMeta.d.ts.map +1 -0
- package/dist/features/auth/oauthProviderListMeta.js +66 -0
- package/dist/features/auth/oauthProviderListMeta.js.map +1 -0
- package/dist/features/auth/otpFormMeta.d.ts +89 -0
- package/dist/features/auth/otpFormMeta.d.ts.map +1 -0
- package/dist/features/auth/otpFormMeta.js +54 -0
- package/dist/features/auth/otpFormMeta.js.map +1 -0
- package/dist/features/auth/public.d.ts +9 -0
- package/dist/features/auth/public.d.ts.map +1 -0
- package/dist/features/auth/public.js +8 -0
- package/dist/features/auth/public.js.map +1 -0
- package/dist/features/auth/signInFormMeta.d.ts +100 -0
- package/dist/features/auth/signInFormMeta.d.ts.map +1 -0
- package/dist/features/auth/signInFormMeta.js +62 -0
- package/dist/features/auth/signInFormMeta.js.map +1 -0
- package/dist/features/auth/signUpFormMeta.d.ts +111 -0
- package/dist/features/auth/signUpFormMeta.d.ts.map +1 -0
- package/dist/features/auth/signUpFormMeta.js +66 -0
- package/dist/features/auth/signUpFormMeta.js.map +1 -0
- package/dist/{patterns/auth/utils.d.ts → features/auth/utils/authForm.d.ts} +3 -3
- package/dist/features/auth/utils/authForm.d.ts.map +1 -0
- package/dist/{patterns/auth/utils.js → features/auth/utils/authForm.js} +1 -1
- package/dist/features/auth/utils/authForm.js.map +1 -0
- package/dist/{patterns/auth → features/auth/utils}/oauthProviders.d.ts +1 -1
- package/dist/features/auth/utils/oauthProviders.d.ts.map +1 -0
- package/dist/features/auth/utils/oauthProviders.js.map +1 -0
- package/dist/features/bottom-sheet/bottomSheetMeta.d.ts +1 -1
- package/dist/features/card/cardMeta.d.ts +1 -1
- package/dist/features/card/mediaCardMeta.d.ts +1 -1
- package/dist/features/card/postCardMeta.d.ts +1 -1
- package/dist/features/data-table/adapters/inbound/DataTable.d.ts.map +1 -1
- package/dist/features/data-table/adapters/inbound/DataTable.js +1 -1
- package/dist/features/data-table/adapters/inbound/DataTable.js.map +1 -1
- package/dist/{components/date-picker → features/date-picker/adapters/inbound}/DatePicker.d.ts +1 -1
- package/dist/features/date-picker/adapters/inbound/DatePicker.d.ts.map +1 -0
- package/dist/{components/date-picker → features/date-picker/adapters/inbound}/DatePicker.js +23 -26
- package/dist/features/date-picker/adapters/inbound/DatePicker.js.map +1 -0
- package/dist/features/date-picker/datePickerMeta.d.ts +83 -0
- package/dist/features/date-picker/datePickerMeta.d.ts.map +1 -0
- package/dist/features/date-picker/datePickerMeta.js +57 -0
- package/dist/features/date-picker/datePickerMeta.js.map +1 -0
- package/dist/features/date-picker/public.d.ts +3 -0
- package/dist/features/date-picker/public.d.ts.map +1 -0
- package/dist/features/date-picker/public.js +2 -0
- package/dist/features/date-picker/public.js.map +1 -0
- package/dist/features/date-picker/utils/localDate.d.ts +5 -0
- package/dist/features/date-picker/utils/localDate.d.ts.map +1 -0
- package/dist/features/date-picker/utils/localDate.js +27 -0
- package/dist/features/date-picker/utils/localDate.js.map +1 -0
- package/dist/{components/gradient → features/gradient/adapters/inbound}/Gradient.d.ts +1 -1
- package/dist/features/gradient/adapters/inbound/Gradient.d.ts.map +1 -0
- package/dist/{components/gradient → features/gradient/adapters/inbound}/Gradient.js +2 -2
- package/dist/features/gradient/adapters/inbound/Gradient.js.map +1 -0
- package/dist/{components/gradient → features/gradient/adapters/inbound}/GradientRendererContext.d.ts +3 -2
- package/dist/features/gradient/adapters/inbound/GradientRendererContext.d.ts.map +1 -0
- package/dist/{components/gradient → features/gradient/adapters/inbound}/GradientRendererContext.js +2 -1
- package/dist/features/gradient/adapters/inbound/GradientRendererContext.js.map +1 -0
- package/dist/features/gradient/gradientMeta.d.ts +48 -0
- package/dist/features/gradient/gradientMeta.d.ts.map +1 -0
- package/dist/features/gradient/gradientMeta.js +25 -0
- package/dist/features/gradient/gradientMeta.js.map +1 -0
- package/dist/features/gradient/public.d.ts +4 -0
- package/dist/features/gradient/public.d.ts.map +1 -0
- package/dist/features/gradient/public.js +3 -0
- package/dist/features/gradient/public.js.map +1 -0
- package/dist/{patterns/hero → features/hero/adapters/inbound}/Hero.d.ts +1 -1
- package/dist/features/hero/adapters/inbound/Hero.d.ts.map +1 -0
- package/dist/{patterns/hero → features/hero/adapters/inbound}/Hero.js +5 -6
- package/dist/features/hero/adapters/inbound/Hero.js.map +1 -0
- package/dist/{patterns/hero/meta.d.ts → features/hero/heroMeta.d.ts} +1 -1
- package/dist/features/hero/heroMeta.d.ts.map +1 -0
- package/dist/{patterns/hero/meta.js → features/hero/heroMeta.js} +1 -1
- package/dist/features/hero/heroMeta.js.map +1 -0
- package/dist/features/hero/public.d.ts +3 -0
- package/dist/features/hero/public.d.ts.map +1 -0
- package/dist/features/hero/public.js +2 -0
- package/dist/features/hero/public.js.map +1 -0
- package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.d.ts +1 -1
- package/dist/features/layout/boxMeta.d.ts +1 -1
- package/dist/features/layout/containerMeta.d.ts +1 -1
- package/dist/features/layout/gridMeta.d.ts +1 -1
- package/dist/features/layout/stackMeta.d.ts +1 -1
- package/dist/features/list/flatListMeta.d.ts +1 -1
- package/dist/features/list/sectionListMeta.d.ts +1 -1
- package/dist/{patterns/missing-element → features/missing-element/adapters/inbound}/MissingElement.d.ts +1 -1
- package/dist/features/missing-element/adapters/inbound/MissingElement.d.ts.map +1 -0
- package/dist/{patterns/missing-element → features/missing-element/adapters/inbound}/MissingElement.js +5 -5
- package/dist/features/missing-element/adapters/inbound/MissingElement.js.map +1 -0
- package/dist/{patterns/missing-element/meta.d.ts → features/missing-element/missingElementMeta.d.ts} +1 -1
- package/dist/features/missing-element/missingElementMeta.d.ts.map +1 -0
- package/dist/{patterns/missing-element/meta.js → features/missing-element/missingElementMeta.js} +1 -1
- package/dist/features/missing-element/missingElementMeta.js.map +1 -0
- package/dist/features/missing-element/public.d.ts +3 -0
- package/dist/features/missing-element/public.d.ts.map +1 -0
- package/dist/features/missing-element/public.js +2 -0
- package/dist/features/missing-element/public.js.map +1 -0
- package/dist/{components/skeleton → features/skeleton/adapters/inbound}/Skeleton.d.ts +1 -1
- package/dist/features/skeleton/adapters/inbound/Skeleton.d.ts.map +1 -0
- package/dist/{components/skeleton → features/skeleton/adapters/inbound}/Skeleton.js +3 -3
- package/dist/features/skeleton/adapters/inbound/Skeleton.js.map +1 -0
- package/dist/{components/skeleton → features/skeleton/adapters/inbound}/SkeletonCard.d.ts +1 -1
- package/dist/features/skeleton/adapters/inbound/SkeletonCard.d.ts.map +1 -0
- package/dist/{components/skeleton → features/skeleton/adapters/inbound}/SkeletonCard.js +4 -4
- package/dist/features/skeleton/adapters/inbound/SkeletonCard.js.map +1 -0
- package/dist/{components/skeleton → features/skeleton/adapters/inbound}/SkeletonList.d.ts +1 -1
- package/dist/features/skeleton/adapters/inbound/SkeletonList.d.ts.map +1 -0
- package/dist/{components/skeleton → features/skeleton/adapters/inbound}/SkeletonList.js +2 -2
- package/dist/features/skeleton/adapters/inbound/SkeletonList.js.map +1 -0
- package/dist/{components/skeleton → features/skeleton/adapters/inbound}/SkeletonText.d.ts +1 -1
- package/dist/features/skeleton/adapters/inbound/SkeletonText.d.ts.map +1 -0
- package/dist/{components/skeleton → features/skeleton/adapters/inbound}/SkeletonText.js +2 -2
- package/dist/features/skeleton/adapters/inbound/SkeletonText.js.map +1 -0
- package/dist/features/skeleton/public.d.ts +6 -0
- package/dist/features/skeleton/public.d.ts.map +1 -0
- package/dist/features/skeleton/public.js +5 -0
- package/dist/features/skeleton/public.js.map +1 -0
- package/dist/features/skeleton/skeletonMeta.d.ts +178 -0
- package/dist/features/skeleton/skeletonMeta.d.ts.map +1 -0
- package/dist/features/skeleton/skeletonMeta.js +84 -0
- package/dist/features/skeleton/skeletonMeta.js.map +1 -0
- package/dist/features/surface/surfaceMeta.d.ts +1 -1
- package/dist/{components/time-picker → features/time-picker/adapters/inbound}/TimePicker.d.ts +1 -1
- package/dist/features/time-picker/adapters/inbound/TimePicker.d.ts.map +1 -0
- package/dist/{components/time-picker → features/time-picker/adapters/inbound}/TimePicker.js +8 -11
- package/dist/features/time-picker/adapters/inbound/TimePicker.js.map +1 -0
- package/dist/features/time-picker/public.d.ts +3 -0
- package/dist/features/time-picker/public.d.ts.map +1 -0
- package/dist/features/time-picker/public.js +2 -0
- package/dist/features/time-picker/public.js.map +1 -0
- package/dist/features/time-picker/timePickerMeta.d.ts +90 -0
- package/dist/features/time-picker/timePickerMeta.d.ts.map +1 -0
- package/dist/features/time-picker/timePickerMeta.js +64 -0
- package/dist/features/time-picker/timePickerMeta.js.map +1 -0
- package/dist/index.d.ts +9 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/layout/screen/meta.d.ts +1 -1
- package/dist/layout/screen-section/meta.d.ts +1 -1
- package/dist/metadata/allowedChildren.d.ts +3 -3
- package/dist/metadata/allowedChildren.d.ts.map +1 -1
- package/dist/metadata/allowedChildren.js +14 -0
- package/dist/metadata/allowedChildren.js.map +1 -1
- package/dist/metadata/bindableComponentMeta.d.ts +2 -2
- package/dist/metadata/componentMeta.d.ts.map +1 -1
- package/dist/metadata/componentMeta.js +12 -7
- package/dist/metadata/componentMeta.js.map +1 -1
- package/dist/patterns/message-bubble/meta.d.ts +1 -1
- package/dist/patterns/notice/meta.d.ts +1 -1
- package/dist/patterns/panel/meta.d.ts +1 -1
- package/dist/patterns/reader/meta.d.ts +2 -2
- package/dist/patterns/scanner/meta.d.ts +2 -2
- package/dist/registry.js +7 -7
- package/dist/registry.js.map +1 -1
- package/dist/{patterns/auth/types.d.ts → types/auth.d.ts} +8 -8
- package/dist/types/auth.d.ts.map +1 -0
- package/dist/types/auth.js +2 -0
- package/dist/types/auth.js.map +1 -0
- package/dist/{components/date-picker/types.d.ts → types/date-picker.d.ts} +6 -6
- package/dist/types/date-picker.d.ts.map +1 -0
- package/dist/types/date-picker.js +2 -0
- package/dist/types/date-picker.js.map +1 -0
- package/dist/{components/gradient/types.d.ts → types/gradient.d.ts} +3 -3
- package/dist/types/gradient.d.ts.map +1 -0
- package/dist/types/gradient.js +2 -0
- package/dist/types/gradient.js.map +1 -0
- package/dist/{patterns/hero/types.d.ts → types/hero.d.ts} +3 -3
- package/dist/types/hero.d.ts.map +1 -0
- package/dist/types/hero.js +2 -0
- package/dist/types/hero.js.map +1 -0
- package/dist/{patterns/missing-element/types.d.ts → types/missing-element.d.ts} +2 -2
- package/dist/types/missing-element.d.ts.map +1 -0
- package/dist/types/missing-element.js +2 -0
- package/dist/types/missing-element.js.map +1 -0
- package/dist/{components/skeleton/types.d.ts → types/skeleton.d.ts} +3 -3
- package/dist/types/skeleton.d.ts.map +1 -0
- package/dist/types/skeleton.js +2 -0
- package/dist/types/skeleton.js.map +1 -0
- package/dist/{components/time-picker/types.d.ts → types/time-picker.d.ts} +2 -2
- package/dist/types/time-picker.d.ts.map +1 -0
- package/dist/types/time-picker.js +2 -0
- package/dist/types/time-picker.js.map +1 -0
- package/package.json +1 -1
- package/src/constants.ts +12 -0
- package/src/expo57Migration.test.ts +1 -1
- package/src/featureManifest.test.ts +14 -0
- package/src/{patterns/auth → features/auth/adapters/inbound}/AuthForm.tsx +5 -5
- package/src/{patterns/auth → features/auth/adapters/inbound}/AuthFormField.tsx +4 -4
- package/src/{patterns/auth → features/auth/adapters/inbound}/ForgotPasswordForm.tsx +8 -8
- package/src/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderButton.tsx +4 -4
- package/src/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderList.tsx +3 -3
- package/src/{patterns/auth → features/auth/adapters/inbound}/OtpForm.tsx +6 -6
- package/src/{patterns/auth → features/auth/adapters/inbound}/SignInForm.tsx +8 -8
- package/src/{patterns/auth → features/auth/adapters/inbound}/SignUpForm.tsx +5 -5
- package/src/features/auth/forgotPasswordFormMeta.ts +49 -0
- package/src/features/auth/oauthProviderButtonMeta.ts +62 -0
- package/src/features/auth/oauthProviderListMeta.ts +67 -0
- package/src/features/auth/otpFormMeta.ts +55 -0
- package/src/features/auth/public.test.ts +34 -0
- package/src/{patterns/auth/index.ts → features/auth/public.ts} +12 -12
- package/src/features/auth/signInFormMeta.ts +63 -0
- package/src/features/auth/signUpFormMeta.ts +67 -0
- package/src/{patterns/auth/utils.ts → features/auth/utils/authForm.ts} +2 -2
- package/src/{patterns/auth → features/auth/utils}/oauthProviders.test.ts +1 -1
- package/src/{patterns/auth → features/auth/utils}/oauthProviders.ts +1 -1
- package/src/features/bottom-sheet/public.test.ts +2 -2
- package/src/features/data-table/adapters/inbound/DataTable.tsx +1 -1
- package/src/{components/date-picker → features/date-picker/adapters/inbound}/DatePicker.tsx +41 -32
- package/src/features/date-picker/datePickerMeta.ts +58 -0
- package/src/features/date-picker/public.test.ts +15 -0
- package/src/features/date-picker/public.ts +2 -0
- package/src/features/date-picker/utils/localDate.test.ts +18 -0
- package/src/features/date-picker/utils/localDate.ts +29 -0
- package/src/{components/gradient → features/gradient/adapters/inbound}/Gradient.tsx +3 -3
- package/src/{components/gradient → features/gradient/adapters/inbound}/GradientRendererContext.tsx +3 -2
- package/src/features/gradient/gradientMeta.ts +26 -0
- package/src/features/gradient/public.test.ts +15 -0
- package/src/{components/gradient/index.ts → features/gradient/public.ts} +3 -3
- package/src/{patterns/hero → features/hero/adapters/inbound}/Hero.tsx +6 -7
- package/src/features/hero/public.ts +2 -0
- package/src/{patterns → features}/missing-element/MissingElement.test.ts +6 -4
- package/src/{patterns/missing-element → features/missing-element/adapters/inbound}/MissingElement.tsx +6 -6
- package/src/features/missing-element/public.ts +2 -0
- package/src/{components/skeleton → features/skeleton/adapters/inbound}/Skeleton.tsx +4 -4
- package/src/{components/skeleton → features/skeleton/adapters/inbound}/SkeletonCard.tsx +5 -5
- package/src/{components/skeleton → features/skeleton/adapters/inbound}/SkeletonList.tsx +3 -3
- package/src/{components/skeleton → features/skeleton/adapters/inbound}/SkeletonText.tsx +3 -3
- package/src/features/skeleton/public.test.ts +24 -0
- package/src/features/skeleton/public.ts +13 -0
- package/src/features/skeleton/skeletonMeta.ts +88 -0
- package/src/{components/time-picker → features/time-picker/adapters/inbound}/TimePicker.tsx +9 -12
- package/src/features/time-picker/public.test.ts +14 -0
- package/src/features/time-picker/public.ts +2 -0
- package/src/features/time-picker/timePickerMeta.ts +65 -0
- package/src/index.ts +72 -58
- package/src/interactionPolicy.test.ts +3 -3
- package/src/metadata/allowedChildren.ts +14 -0
- package/src/metadata/componentMeta.test.ts +13 -0
- package/src/metadata/componentMeta.ts +17 -19
- package/src/registry.ts +14 -14
- package/src/theme/themeScopeStructure.test.ts +7 -5
- package/src/{patterns/auth/types.ts → types/auth.ts} +7 -7
- package/src/{components/date-picker/types.ts → types/date-picker.ts} +5 -5
- package/src/{components/gradient/types.ts → types/gradient.ts} +2 -2
- package/src/{patterns/hero/types.ts → types/hero.ts} +2 -2
- package/src/{patterns/missing-element/types.ts → types/missing-element.ts} +1 -1
- package/src/{components/skeleton/types.ts → types/skeleton.ts} +2 -2
- package/src/{components/time-picker/types.ts → types/time-picker.ts} +1 -1
- package/dist/components/date-picker/DatePicker.d.ts.map +0 -1
- package/dist/components/date-picker/DatePicker.js.map +0 -1
- package/dist/components/date-picker/index.d.ts +0 -3
- package/dist/components/date-picker/index.d.ts.map +0 -1
- package/dist/components/date-picker/index.js +0 -2
- package/dist/components/date-picker/index.js.map +0 -1
- package/dist/components/date-picker/meta.d.ts +0 -9
- package/dist/components/date-picker/meta.d.ts.map +0 -1
- package/dist/components/date-picker/meta.js +0 -9
- package/dist/components/date-picker/meta.js.map +0 -1
- package/dist/components/date-picker/types.d.ts.map +0 -1
- package/dist/components/date-picker/types.js +0 -2
- package/dist/components/date-picker/types.js.map +0 -1
- package/dist/components/gradient/Gradient.d.ts.map +0 -1
- package/dist/components/gradient/Gradient.js.map +0 -1
- package/dist/components/gradient/GradientRendererContext.d.ts.map +0 -1
- package/dist/components/gradient/GradientRendererContext.js.map +0 -1
- package/dist/components/gradient/index.d.ts +0 -4
- package/dist/components/gradient/index.d.ts.map +0 -1
- package/dist/components/gradient/index.js +0 -3
- package/dist/components/gradient/index.js.map +0 -1
- package/dist/components/gradient/meta.d.ts +0 -9
- package/dist/components/gradient/meta.d.ts.map +0 -1
- package/dist/components/gradient/meta.js +0 -9
- package/dist/components/gradient/meta.js.map +0 -1
- package/dist/components/gradient/types.d.ts.map +0 -1
- package/dist/components/gradient/types.js +0 -2
- package/dist/components/gradient/types.js.map +0 -1
- package/dist/components/skeleton/Skeleton.d.ts.map +0 -1
- package/dist/components/skeleton/Skeleton.js.map +0 -1
- package/dist/components/skeleton/SkeletonCard.d.ts.map +0 -1
- package/dist/components/skeleton/SkeletonCard.js.map +0 -1
- package/dist/components/skeleton/SkeletonList.d.ts.map +0 -1
- package/dist/components/skeleton/SkeletonList.js.map +0 -1
- package/dist/components/skeleton/SkeletonText.d.ts.map +0 -1
- package/dist/components/skeleton/SkeletonText.js.map +0 -1
- package/dist/components/skeleton/index.d.ts +0 -6
- package/dist/components/skeleton/index.d.ts.map +0 -1
- package/dist/components/skeleton/index.js +0 -5
- package/dist/components/skeleton/index.js.map +0 -1
- package/dist/components/skeleton/meta.d.ts +0 -33
- package/dist/components/skeleton/meta.d.ts.map +0 -1
- package/dist/components/skeleton/meta.js +0 -33
- package/dist/components/skeleton/meta.js.map +0 -1
- package/dist/components/skeleton/types.d.ts.map +0 -1
- package/dist/components/skeleton/types.js +0 -2
- package/dist/components/skeleton/types.js.map +0 -1
- package/dist/components/time-picker/TimePicker.d.ts.map +0 -1
- package/dist/components/time-picker/TimePicker.js.map +0 -1
- package/dist/components/time-picker/index.d.ts +0 -3
- package/dist/components/time-picker/index.d.ts.map +0 -1
- package/dist/components/time-picker/index.js +0 -2
- package/dist/components/time-picker/index.js.map +0 -1
- package/dist/components/time-picker/meta.d.ts +0 -9
- package/dist/components/time-picker/meta.d.ts.map +0 -1
- package/dist/components/time-picker/meta.js +0 -9
- package/dist/components/time-picker/meta.js.map +0 -1
- package/dist/components/time-picker/types.d.ts.map +0 -1
- package/dist/components/time-picker/types.js +0 -2
- package/dist/components/time-picker/types.js.map +0 -1
- package/dist/patterns/auth/AuthForm.d.ts.map +0 -1
- package/dist/patterns/auth/AuthForm.js.map +0 -1
- package/dist/patterns/auth/AuthFormField.d.ts.map +0 -1
- package/dist/patterns/auth/AuthFormField.js.map +0 -1
- package/dist/patterns/auth/ForgotPasswordForm.d.ts.map +0 -1
- package/dist/patterns/auth/ForgotPasswordForm.js.map +0 -1
- package/dist/patterns/auth/OAuthProviderButton.d.ts.map +0 -1
- package/dist/patterns/auth/OAuthProviderButton.js.map +0 -1
- package/dist/patterns/auth/OAuthProviderList.d.ts.map +0 -1
- package/dist/patterns/auth/OAuthProviderList.js.map +0 -1
- package/dist/patterns/auth/OtpForm.d.ts.map +0 -1
- package/dist/patterns/auth/OtpForm.js.map +0 -1
- package/dist/patterns/auth/SignInForm.d.ts.map +0 -1
- package/dist/patterns/auth/SignInForm.js.map +0 -1
- package/dist/patterns/auth/SignUpForm.d.ts.map +0 -1
- package/dist/patterns/auth/SignUpForm.js.map +0 -1
- package/dist/patterns/auth/index.d.ts +0 -9
- package/dist/patterns/auth/index.d.ts.map +0 -1
- package/dist/patterns/auth/index.js +0 -8
- package/dist/patterns/auth/index.js.map +0 -1
- package/dist/patterns/auth/meta.d.ts +0 -49
- package/dist/patterns/auth/meta.d.ts.map +0 -1
- package/dist/patterns/auth/meta.js +0 -50
- package/dist/patterns/auth/meta.js.map +0 -1
- package/dist/patterns/auth/oauthProviders.d.ts.map +0 -1
- package/dist/patterns/auth/oauthProviders.js.map +0 -1
- package/dist/patterns/auth/types.d.ts.map +0 -1
- package/dist/patterns/auth/types.js +0 -2
- package/dist/patterns/auth/types.js.map +0 -1
- package/dist/patterns/auth/utils.d.ts.map +0 -1
- package/dist/patterns/auth/utils.js.map +0 -1
- package/dist/patterns/hero/Hero.d.ts.map +0 -1
- package/dist/patterns/hero/Hero.js.map +0 -1
- package/dist/patterns/hero/index.d.ts +0 -3
- package/dist/patterns/hero/index.d.ts.map +0 -1
- package/dist/patterns/hero/index.js +0 -2
- package/dist/patterns/hero/index.js.map +0 -1
- package/dist/patterns/hero/meta.d.ts.map +0 -1
- package/dist/patterns/hero/meta.js.map +0 -1
- package/dist/patterns/hero/types.d.ts.map +0 -1
- package/dist/patterns/hero/types.js +0 -2
- package/dist/patterns/hero/types.js.map +0 -1
- package/dist/patterns/missing-element/MissingElement.d.ts.map +0 -1
- package/dist/patterns/missing-element/MissingElement.js.map +0 -1
- package/dist/patterns/missing-element/index.d.ts +0 -3
- package/dist/patterns/missing-element/index.d.ts.map +0 -1
- package/dist/patterns/missing-element/index.js +0 -2
- package/dist/patterns/missing-element/index.js.map +0 -1
- package/dist/patterns/missing-element/meta.d.ts.map +0 -1
- package/dist/patterns/missing-element/meta.js.map +0 -1
- package/dist/patterns/missing-element/types.d.ts.map +0 -1
- package/dist/patterns/missing-element/types.js +0 -2
- package/dist/patterns/missing-element/types.js.map +0 -1
- package/src/components/date-picker/index.ts +0 -2
- package/src/components/date-picker/meta.ts +0 -10
- package/src/components/gradient/meta.ts +0 -10
- package/src/components/skeleton/index.ts +0 -13
- package/src/components/skeleton/meta.ts +0 -37
- package/src/components/time-picker/index.ts +0 -2
- package/src/components/time-picker/meta.ts +0 -10
- package/src/patterns/auth/meta.ts +0 -57
- package/src/patterns/hero/index.ts +0 -2
- package/src/patterns/missing-element/index.ts +0 -2
- /package/dist/{patterns/auth → features/auth/utils}/oauthProviders.js +0 -0
- /package/src/{patterns/hero/meta.ts → features/hero/heroMeta.ts} +0 -0
- /package/src/{patterns/missing-element/meta.ts → features/missing-element/missingElementMeta.ts} +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ZoraComponentMeta } from '../../metadata';
|
|
2
|
+
|
|
3
|
+
export const forgotPasswordFormMeta = {
|
|
4
|
+
name: 'ForgotPasswordForm',
|
|
5
|
+
category: 'pattern',
|
|
6
|
+
description: 'Collects an account identifier to start password recovery.',
|
|
7
|
+
directManifestNode: true,
|
|
8
|
+
allowedChildren: [],
|
|
9
|
+
blueprint: {
|
|
10
|
+
label: 'Forgot password form',
|
|
11
|
+
defaultProps: {
|
|
12
|
+
identifiers: ['email'],
|
|
13
|
+
identifierLabel: 'Email',
|
|
14
|
+
signInLabel: 'Sign in',
|
|
15
|
+
submitLabel: 'Send code',
|
|
16
|
+
loading: false,
|
|
17
|
+
disabled: false,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
events: {
|
|
21
|
+
submit: {
|
|
22
|
+
label: 'Submit',
|
|
23
|
+
eventType: 'forgotPasswordForm.submit',
|
|
24
|
+
payloadFields: [
|
|
25
|
+
{ path: 'identifier', type: 'string', label: 'Identifier' },
|
|
26
|
+
{ path: 'identifierKind', type: 'string', label: 'Identifier kind' },
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
signIn: {
|
|
30
|
+
label: 'Sign in',
|
|
31
|
+
eventType: 'forgotPasswordForm.signIn',
|
|
32
|
+
payloadFields: [],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
props: {
|
|
36
|
+
identifiers: {
|
|
37
|
+
type: 'array',
|
|
38
|
+
category: 'Authentication',
|
|
39
|
+
label: 'Identifiers',
|
|
40
|
+
default: ['email'],
|
|
41
|
+
},
|
|
42
|
+
identifierLabel: { type: 'string', category: 'Content', label: 'Identifier label' },
|
|
43
|
+
signInLabel: { type: 'string', category: 'Content', label: 'Sign-in label' },
|
|
44
|
+
submitLabel: { type: 'string', category: 'Content', label: 'Submit label' },
|
|
45
|
+
error: { type: 'string', category: 'State', label: 'Error' },
|
|
46
|
+
loading: { type: 'boolean', category: 'State', label: 'Loading', default: false },
|
|
47
|
+
disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },
|
|
48
|
+
},
|
|
49
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ZORA_COLORS } from '../../internal/colorModel';
|
|
2
|
+
import type { ZoraComponentMeta } from '../../metadata';
|
|
3
|
+
|
|
4
|
+
export const oauthProviderButtonMeta = {
|
|
5
|
+
name: 'OAuthProviderButton',
|
|
6
|
+
category: 'pattern',
|
|
7
|
+
description: 'Renders a provider-branded OAuth action button.',
|
|
8
|
+
directManifestNode: true,
|
|
9
|
+
allowedChildren: [],
|
|
10
|
+
blueprint: {
|
|
11
|
+
label: 'OAuth provider button',
|
|
12
|
+
defaultProps: {
|
|
13
|
+
providerId: 'google',
|
|
14
|
+
fullWidth: true,
|
|
15
|
+
size: 'l',
|
|
16
|
+
variant: 'outline',
|
|
17
|
+
color: 'neutral',
|
|
18
|
+
loading: false,
|
|
19
|
+
disabled: false,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
events: {
|
|
23
|
+
press: {
|
|
24
|
+
label: 'Press',
|
|
25
|
+
eventType: 'oauthProviderButton.press',
|
|
26
|
+
payloadFields: [{ path: 'providerId', type: 'string', label: 'Provider ID' }],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
props: {
|
|
30
|
+
providerId: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
category: 'Authentication',
|
|
33
|
+
label: 'Provider ID',
|
|
34
|
+
default: 'google',
|
|
35
|
+
},
|
|
36
|
+
label: { type: 'string', category: 'Content', label: 'Label' },
|
|
37
|
+
disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },
|
|
38
|
+
loading: { type: 'boolean', category: 'State', label: 'Loading', default: false },
|
|
39
|
+
fullWidth: { type: 'boolean', category: 'Layout', label: 'Full width', default: true },
|
|
40
|
+
size: {
|
|
41
|
+
type: 'enum',
|
|
42
|
+
category: 'Style',
|
|
43
|
+
label: 'Size',
|
|
44
|
+
enum: ['s', 'm', 'l'],
|
|
45
|
+
default: 'l',
|
|
46
|
+
},
|
|
47
|
+
variant: {
|
|
48
|
+
type: 'enum',
|
|
49
|
+
category: 'Style',
|
|
50
|
+
label: 'Variant',
|
|
51
|
+
enum: ['solid', 'outline', 'ghost', 'soft'],
|
|
52
|
+
default: 'outline',
|
|
53
|
+
},
|
|
54
|
+
color: {
|
|
55
|
+
type: 'enum',
|
|
56
|
+
category: 'Style',
|
|
57
|
+
label: 'Color',
|
|
58
|
+
enum: [...ZORA_COLORS],
|
|
59
|
+
default: 'neutral',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { ZORA_COLORS } from '../../internal/colorModel';
|
|
2
|
+
import type { ZoraComponentMeta } from '../../metadata';
|
|
3
|
+
|
|
4
|
+
export const oauthProviderListMeta = {
|
|
5
|
+
name: 'OAuthProviderList',
|
|
6
|
+
category: 'pattern',
|
|
7
|
+
description: 'Renders a configurable group of OAuth provider actions.',
|
|
8
|
+
directManifestNode: true,
|
|
9
|
+
allowedChildren: [],
|
|
10
|
+
blueprint: {
|
|
11
|
+
label: 'OAuth provider list',
|
|
12
|
+
defaultProps: {
|
|
13
|
+
providers: [{ id: 'google', label: 'Continue with Google' }],
|
|
14
|
+
layout: 'stack',
|
|
15
|
+
loading: false,
|
|
16
|
+
disabled: false,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
events: {
|
|
20
|
+
providerPress: {
|
|
21
|
+
label: 'Provider press',
|
|
22
|
+
eventType: 'oauthProviderList.providerPress',
|
|
23
|
+
payloadFields: [{ path: 'providerId', type: 'string', label: 'Provider ID' }],
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
providers: {
|
|
28
|
+
type: 'array',
|
|
29
|
+
category: 'Authentication',
|
|
30
|
+
label: 'Providers',
|
|
31
|
+
itemSchema: [
|
|
32
|
+
{ key: 'id', schema: { type: 'string', category: 'Identity', label: 'Provider ID' } },
|
|
33
|
+
{ key: 'label', schema: { type: 'string', category: 'Content', label: 'Label' } },
|
|
34
|
+
{ key: 'disabled', schema: { type: 'boolean', category: 'State', label: 'Disabled' } },
|
|
35
|
+
{ key: 'loading', schema: { type: 'boolean', category: 'State', label: 'Loading' } },
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },
|
|
39
|
+
loading: { type: 'boolean', category: 'State', label: 'Loading', default: false },
|
|
40
|
+
fullWidth: { type: 'boolean', category: 'Layout', label: 'Full width' },
|
|
41
|
+
layout: {
|
|
42
|
+
type: 'enum',
|
|
43
|
+
category: 'Layout',
|
|
44
|
+
label: 'Layout',
|
|
45
|
+
enum: ['stack', 'inline'],
|
|
46
|
+
default: 'stack',
|
|
47
|
+
},
|
|
48
|
+
size: {
|
|
49
|
+
type: 'enum',
|
|
50
|
+
category: 'Style',
|
|
51
|
+
label: 'Size',
|
|
52
|
+
enum: ['s', 'm', 'l'],
|
|
53
|
+
},
|
|
54
|
+
variant: {
|
|
55
|
+
type: 'enum',
|
|
56
|
+
category: 'Style',
|
|
57
|
+
label: 'Variant',
|
|
58
|
+
enum: ['solid', 'outline', 'ghost', 'soft'],
|
|
59
|
+
},
|
|
60
|
+
color: {
|
|
61
|
+
type: 'enum',
|
|
62
|
+
category: 'Style',
|
|
63
|
+
label: 'Color',
|
|
64
|
+
enum: [...ZORA_COLORS],
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ZoraComponentMeta } from '../../metadata';
|
|
2
|
+
|
|
3
|
+
export const otpFormMeta = {
|
|
4
|
+
name: 'OtpForm',
|
|
5
|
+
category: 'pattern',
|
|
6
|
+
description: 'Collects and verifies a one-time passcode with an optional resend action.',
|
|
7
|
+
directManifestNode: true,
|
|
8
|
+
allowedChildren: [],
|
|
9
|
+
blueprint: {
|
|
10
|
+
label: 'OTP form',
|
|
11
|
+
defaultProps: {
|
|
12
|
+
length: 6,
|
|
13
|
+
otpLabel: 'Code',
|
|
14
|
+
resendLabel: 'Resend code',
|
|
15
|
+
submitLabel: 'Verify code',
|
|
16
|
+
resendDisabled: false,
|
|
17
|
+
resendLoading: false,
|
|
18
|
+
loading: false,
|
|
19
|
+
disabled: false,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
events: {
|
|
23
|
+
submit: {
|
|
24
|
+
label: 'Submit',
|
|
25
|
+
eventType: 'otpForm.submit',
|
|
26
|
+
payloadFields: [{ path: 'otp', type: 'string', label: 'One-time passcode' }],
|
|
27
|
+
},
|
|
28
|
+
resend: {
|
|
29
|
+
label: 'Resend',
|
|
30
|
+
eventType: 'otpForm.resend',
|
|
31
|
+
payloadFields: [],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
props: {
|
|
35
|
+
length: { type: 'number', category: 'Validation', label: 'Code length', default: 6 },
|
|
36
|
+
otpLabel: { type: 'string', category: 'Content', label: 'Code label' },
|
|
37
|
+
resendLabel: { type: 'string', category: 'Content', label: 'Resend label' },
|
|
38
|
+
submitLabel: { type: 'string', category: 'Content', label: 'Submit label' },
|
|
39
|
+
error: { type: 'string', category: 'State', label: 'Error' },
|
|
40
|
+
resendDisabled: {
|
|
41
|
+
type: 'boolean',
|
|
42
|
+
category: 'State',
|
|
43
|
+
label: 'Resend disabled',
|
|
44
|
+
default: false,
|
|
45
|
+
},
|
|
46
|
+
resendLoading: {
|
|
47
|
+
type: 'boolean',
|
|
48
|
+
category: 'State',
|
|
49
|
+
label: 'Resend loading',
|
|
50
|
+
default: false,
|
|
51
|
+
},
|
|
52
|
+
loading: { type: 'boolean', category: 'State', label: 'Loading', default: false },
|
|
53
|
+
disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },
|
|
54
|
+
},
|
|
55
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { expect, test } from 'bun:test';
|
|
2
|
+
|
|
3
|
+
import { ZORA_COMPONENT_META } from '../../metadata/componentMeta';
|
|
4
|
+
|
|
5
|
+
const AUTH_MANIFEST_ELEMENTS = [
|
|
6
|
+
'ForgotPasswordForm',
|
|
7
|
+
'OAuthProviderButton',
|
|
8
|
+
'OAuthProviderList',
|
|
9
|
+
'OtpForm',
|
|
10
|
+
'SignInForm',
|
|
11
|
+
'SignUpForm',
|
|
12
|
+
] as const;
|
|
13
|
+
const authMetaByName = new Map(Object.entries(ZORA_COMPONENT_META));
|
|
14
|
+
|
|
15
|
+
test('auth solutions are direct manifest leaf nodes with authoring schemas', () => {
|
|
16
|
+
for (const name of AUTH_MANIFEST_ELEMENTS) {
|
|
17
|
+
const meta = authMetaByName.get(name);
|
|
18
|
+
expect(meta?.directManifestNode, name).toBe(true);
|
|
19
|
+
expect(meta?.allowedChildren, name).toEqual([]);
|
|
20
|
+
expect(Object.keys(meta?.props ?? {}).length, name).toBeGreaterThan(0);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
test('auth solution events expose their actionable boundaries', () => {
|
|
25
|
+
expect(ZORA_COMPONENT_META.SignInForm?.events?.submit?.payloadFields).toContainEqual({
|
|
26
|
+
path: 'secret',
|
|
27
|
+
type: 'string',
|
|
28
|
+
label: 'Secret',
|
|
29
|
+
});
|
|
30
|
+
expect(ZORA_COMPONENT_META.OtpForm?.events?.resend?.eventType).toBe('otpForm.resend');
|
|
31
|
+
expect(ZORA_COMPONENT_META.OAuthProviderList?.events?.providerPress?.payloadFields).toEqual([
|
|
32
|
+
{ path: 'providerId', type: 'string', label: 'Provider ID' },
|
|
33
|
+
]);
|
|
34
|
+
});
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
export { ForgotPasswordForm } from './ForgotPasswordForm';
|
|
2
|
-
export { OAuthProviderButton } from './OAuthProviderButton';
|
|
3
|
-
export { OAuthProviderList } from './OAuthProviderList';
|
|
4
|
-
export {
|
|
5
|
-
DEFAULT_OAUTH_PROVIDER_ICONS,
|
|
6
|
-
resolveOAuthProviderIcon,
|
|
7
|
-
resolveOAuthProviderLabel,
|
|
8
|
-
} from './oauthProviders';
|
|
9
|
-
export { OtpForm } from './OtpForm';
|
|
10
|
-
export { SignInForm } from './SignInForm';
|
|
11
|
-
export { SignUpForm } from './SignUpForm';
|
|
12
1
|
export type {
|
|
13
2
|
AuthFormBaseProps,
|
|
14
3
|
AuthIdentifierKind,
|
|
@@ -26,4 +15,15 @@ export type {
|
|
|
26
15
|
SignUpFormField,
|
|
27
16
|
SignUpFormProps,
|
|
28
17
|
SignUpFormValues,
|
|
29
|
-
} from '
|
|
18
|
+
} from '../../types/auth';
|
|
19
|
+
export { ForgotPasswordForm } from './adapters/inbound/ForgotPasswordForm';
|
|
20
|
+
export { OAuthProviderButton } from './adapters/inbound/OAuthProviderButton';
|
|
21
|
+
export { OAuthProviderList } from './adapters/inbound/OAuthProviderList';
|
|
22
|
+
export { OtpForm } from './adapters/inbound/OtpForm';
|
|
23
|
+
export { SignInForm } from './adapters/inbound/SignInForm';
|
|
24
|
+
export { SignUpForm } from './adapters/inbound/SignUpForm';
|
|
25
|
+
export {
|
|
26
|
+
DEFAULT_OAUTH_PROVIDER_ICONS,
|
|
27
|
+
resolveOAuthProviderIcon,
|
|
28
|
+
resolveOAuthProviderLabel,
|
|
29
|
+
} from './utils/oauthProviders';
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { ZoraComponentMeta } from '../../metadata';
|
|
2
|
+
|
|
3
|
+
export const signInFormMeta = {
|
|
4
|
+
name: 'SignInForm',
|
|
5
|
+
category: 'pattern',
|
|
6
|
+
description: 'Collects an account identifier and secret for sign-in.',
|
|
7
|
+
directManifestNode: true,
|
|
8
|
+
allowedChildren: [],
|
|
9
|
+
blueprint: {
|
|
10
|
+
label: 'Sign-in form',
|
|
11
|
+
defaultProps: {
|
|
12
|
+
identifiers: ['email'],
|
|
13
|
+
identifierLabel: 'Email',
|
|
14
|
+
secretLabel: 'Password',
|
|
15
|
+
forgotPasswordLabel: 'Forgot password',
|
|
16
|
+
signUpLabel: 'Sign up',
|
|
17
|
+
submitLabel: 'Sign in',
|
|
18
|
+
loading: false,
|
|
19
|
+
disabled: false,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
events: {
|
|
23
|
+
submit: {
|
|
24
|
+
label: 'Submit',
|
|
25
|
+
eventType: 'signInForm.submit',
|
|
26
|
+
payloadFields: [
|
|
27
|
+
{ path: 'identifier', type: 'string', label: 'Identifier' },
|
|
28
|
+
{ path: 'identifierKind', type: 'string', label: 'Identifier kind' },
|
|
29
|
+
{ path: 'secret', type: 'string', label: 'Secret' },
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
forgotPassword: {
|
|
33
|
+
label: 'Forgot password',
|
|
34
|
+
eventType: 'signInForm.forgotPassword',
|
|
35
|
+
payloadFields: [],
|
|
36
|
+
},
|
|
37
|
+
signUp: {
|
|
38
|
+
label: 'Sign up',
|
|
39
|
+
eventType: 'signInForm.signUp',
|
|
40
|
+
payloadFields: [],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
props: {
|
|
44
|
+
identifiers: {
|
|
45
|
+
type: 'array',
|
|
46
|
+
category: 'Authentication',
|
|
47
|
+
label: 'Identifiers',
|
|
48
|
+
default: ['email'],
|
|
49
|
+
},
|
|
50
|
+
identifierLabel: { type: 'string', category: 'Content', label: 'Identifier label' },
|
|
51
|
+
secretLabel: { type: 'string', category: 'Content', label: 'Secret label' },
|
|
52
|
+
forgotPasswordLabel: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
category: 'Content',
|
|
55
|
+
label: 'Forgot-password label',
|
|
56
|
+
},
|
|
57
|
+
signUpLabel: { type: 'string', category: 'Content', label: 'Sign-up label' },
|
|
58
|
+
submitLabel: { type: 'string', category: 'Content', label: 'Submit label' },
|
|
59
|
+
error: { type: 'string', category: 'State', label: 'Error' },
|
|
60
|
+
loading: { type: 'boolean', category: 'State', label: 'Loading', default: false },
|
|
61
|
+
disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },
|
|
62
|
+
},
|
|
63
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { ZoraComponentMeta } from '../../metadata';
|
|
2
|
+
|
|
3
|
+
export const signUpFormMeta = {
|
|
4
|
+
name: 'SignUpForm',
|
|
5
|
+
category: 'pattern',
|
|
6
|
+
description: 'Collects configurable account fields for sign-up.',
|
|
7
|
+
directManifestNode: true,
|
|
8
|
+
allowedChildren: [],
|
|
9
|
+
blueprint: {
|
|
10
|
+
label: 'Sign-up form',
|
|
11
|
+
defaultProps: {
|
|
12
|
+
signInLabel: 'Sign in',
|
|
13
|
+
submitLabel: 'Sign up',
|
|
14
|
+
loading: false,
|
|
15
|
+
disabled: false,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
events: {
|
|
19
|
+
submit: {
|
|
20
|
+
label: 'Submit',
|
|
21
|
+
eventType: 'signUpForm.submit',
|
|
22
|
+
payloadFields: [{ path: 'values', type: 'record', label: 'Values' }],
|
|
23
|
+
},
|
|
24
|
+
signIn: {
|
|
25
|
+
label: 'Sign in',
|
|
26
|
+
eventType: 'signUpForm.signIn',
|
|
27
|
+
payloadFields: [],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
props: {
|
|
31
|
+
fields: {
|
|
32
|
+
type: 'array',
|
|
33
|
+
category: 'Authentication',
|
|
34
|
+
label: 'Fields',
|
|
35
|
+
itemSchema: [
|
|
36
|
+
{ key: 'name', schema: { type: 'string', category: 'Identity', label: 'Name' } },
|
|
37
|
+
{ key: 'label', schema: { type: 'string', category: 'Content', label: 'Label' } },
|
|
38
|
+
{
|
|
39
|
+
key: 'type',
|
|
40
|
+
schema: {
|
|
41
|
+
type: 'enum',
|
|
42
|
+
category: 'Authentication',
|
|
43
|
+
label: 'Type',
|
|
44
|
+
enum: ['email', 'number', 'otp', 'password', 'tel', 'text', 'url'],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
key: 'placeholder',
|
|
49
|
+
schema: { type: 'string', category: 'Content', label: 'Placeholder' },
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
key: 'required',
|
|
53
|
+
schema: { type: 'boolean', category: 'Validation', label: 'Required' },
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
key: 'disabled',
|
|
57
|
+
schema: { type: 'boolean', category: 'State', label: 'Disabled' },
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
signInLabel: { type: 'string', category: 'Content', label: 'Sign-in label' },
|
|
62
|
+
submitLabel: { type: 'string', category: 'Content', label: 'Submit label' },
|
|
63
|
+
error: { type: 'string', category: 'State', label: 'Error' },
|
|
64
|
+
loading: { type: 'boolean', category: 'State', label: 'Loading', default: false },
|
|
65
|
+
disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },
|
|
66
|
+
},
|
|
67
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { AuthIdentifierKind } from '../../../types/auth';
|
|
2
|
+
import type { FormFieldConfig, ValidationRule } from '../../../types/form';
|
|
3
3
|
|
|
4
4
|
export const defaultIdentifiers = ['email'] as const satisfies readonly AuthIdentifierKind[];
|
|
5
5
|
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
resolveOAuthProviderLabel,
|
|
7
7
|
} from './oauthProviders';
|
|
8
8
|
|
|
9
|
-
describe('OAuth provider
|
|
9
|
+
describe('Auth OAuth provider helpers', () => {
|
|
10
10
|
it('resolves known provider labels', () => {
|
|
11
11
|
expect(resolveOAuthProviderLabel('google')).toBe('Google');
|
|
12
12
|
expect(resolveOAuthProviderLabel('github')).toBe('GitHub');
|
|
@@ -25,8 +25,8 @@ describe('ZORA BottomSheet public contract', () => {
|
|
|
25
25
|
test('installs the shared provider and removes picker ActionSheet dependencies', async () => {
|
|
26
26
|
const [provider, datePicker, timePicker] = await Promise.all([
|
|
27
27
|
Bun.file('src/theme/ZoraProvider.tsx').text(),
|
|
28
|
-
Bun.file('src/
|
|
29
|
-
Bun.file('src/
|
|
28
|
+
Bun.file('src/features/date-picker/adapters/inbound/DatePicker.tsx').text(),
|
|
29
|
+
Bun.file('src/features/time-picker/adapters/inbound/TimePicker.tsx').text(),
|
|
30
30
|
]);
|
|
31
31
|
|
|
32
32
|
expect(provider).toContain('<BottomSheetProvider>{children}</BottomSheetProvider>');
|
|
@@ -3,7 +3,6 @@ import React from 'react';
|
|
|
3
3
|
import { ScrollView, type ViewStyle } from 'react-native';
|
|
4
4
|
|
|
5
5
|
import { DropdownMenu, type MenuAction } from '../../../../components/menu';
|
|
6
|
-
import { SkeletonList } from '../../../../components/skeleton';
|
|
7
6
|
import { Show } from '../../../../foundation';
|
|
8
7
|
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
9
8
|
import type {
|
|
@@ -20,6 +19,7 @@ import { IconButton } from '../../../button/public';
|
|
|
20
19
|
import { Card } from '../../../card/public';
|
|
21
20
|
import { EmptyState } from '../../../empty-state/public';
|
|
22
21
|
import { Box, Stack } from '../../../layout/public';
|
|
22
|
+
import { SkeletonList } from '../../../skeleton/public';
|
|
23
23
|
import { Text, type TextAlign } from '../../../typography/public';
|
|
24
24
|
import { resolveDataTableRowKey } from '../../utils/resolveDataTableRowKey';
|
|
25
25
|
/***
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Field } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
4
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
5
|
+
import type { DatePickerProps } from '../../../../types/date-picker';
|
|
6
|
+
import { useBottomSheet } from '../../../bottom-sheet/public';
|
|
7
|
+
import { Button } from '../../../button/public';
|
|
8
|
+
import { Box, Stack } from '../../../layout/public';
|
|
9
|
+
import { Text } from '../../../typography/public';
|
|
10
|
+
import { formatLocalDate, parseLocalDate } from '../../utils/localDate';
|
|
10
11
|
|
|
11
12
|
const WEEKDAY_LABELS = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'] as const;
|
|
12
13
|
const DAY_CELL_WIDTH = 42;
|
|
@@ -27,15 +28,14 @@ function renderLabel(label: React.ReactNode, description: React.ReactNode | unde
|
|
|
27
28
|
);
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
/***
|
|
31
|
-
function
|
|
32
|
-
return
|
|
31
|
+
/*** Compare two values by local calendar day. */
|
|
32
|
+
function isSameLocalDay(left: string | null, right: Date): boolean {
|
|
33
|
+
return left === formatLocalDate(right);
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
/***
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
return startOfLocalDay(left).getTime() === startOfLocalDay(right).getTime();
|
|
36
|
+
/*** Normalize a Date to the start of its local calendar day for range comparisons. */
|
|
37
|
+
function startOfLocalDay(value: Date): Date {
|
|
38
|
+
return new Date(value.getFullYear(), value.getMonth(), value.getDate());
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/*** Report whether one local calendar day precedes another. */
|
|
@@ -65,28 +65,27 @@ function formatMonthLabel(value: Date): string {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/*** Format a selected date with the platform locale defaults. */
|
|
68
|
-
function formatDefaultDate(value:
|
|
69
|
-
return value
|
|
68
|
+
function formatDefaultDate(value: string): string {
|
|
69
|
+
return parseLocalDate(value)?.toLocaleDateString() ?? value;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
/*** Build the padded calendar grid for one month. */
|
|
73
73
|
function createMonthDays(month: Date): (Date | null)[] {
|
|
74
74
|
const firstDay = new Date(month.getFullYear(), month.getMonth(), 1);
|
|
75
75
|
const dayCount = new Date(month.getFullYear(), month.getMonth() + 1, 0).getDate();
|
|
76
|
-
const
|
|
76
|
+
const populatedLength = firstDay.getDay() + dayCount;
|
|
77
|
+
const paddedLength = Math.ceil(populatedLength / 7) * 7;
|
|
77
78
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
return days;
|
|
79
|
+
return Array.from({ length: paddedLength }, (_, index) =>
|
|
80
|
+
index < firstDay.getDay()
|
|
81
|
+
? null
|
|
82
|
+
: new Date(month.getFullYear(), month.getMonth(), index - firstDay.getDay() + 1),
|
|
83
|
+
);
|
|
85
84
|
}
|
|
86
85
|
|
|
87
86
|
/*** Resolve the month initially shown by the calendar sheet. */
|
|
88
|
-
function resolveInitialMonth(value:
|
|
89
|
-
const base = value ?? minDate ?? new Date();
|
|
87
|
+
function resolveInitialMonth(value: string | null, minDate: string | undefined): Date {
|
|
88
|
+
const base = parseLocalDate(value) ?? parseLocalDate(minDate) ?? new Date();
|
|
90
89
|
return new Date(base.getFullYear(), base.getMonth(), 1);
|
|
91
90
|
}
|
|
92
91
|
|
|
@@ -142,7 +141,7 @@ function DatePickerInner({
|
|
|
142
141
|
minDate={minDate}
|
|
143
142
|
onDismiss={dismiss}
|
|
144
143
|
onSelect={(date) => {
|
|
145
|
-
onValueChange?.(
|
|
144
|
+
onValueChange?.(formatLocalDate(date));
|
|
146
145
|
dismiss();
|
|
147
146
|
}}
|
|
148
147
|
testID={testID}
|
|
@@ -197,6 +196,8 @@ function DatePickerSheet({
|
|
|
197
196
|
}: DatePickerSheetProps) {
|
|
198
197
|
const [displayMonth, setDisplayMonth] = React.useState(() => resolveInitialMonth(value, minDate));
|
|
199
198
|
const monthDays = React.useMemo(() => createMonthDays(displayMonth), [displayMonth]);
|
|
199
|
+
const resolvedMaxDate = React.useMemo(() => parseLocalDate(maxDate), [maxDate]);
|
|
200
|
+
const resolvedMinDate = React.useMemo(() => parseLocalDate(minDate), [minDate]);
|
|
200
201
|
|
|
201
202
|
return (
|
|
202
203
|
<Stack gap="m" p="m" testID={testID ? `${testID}-sheet` : undefined}>
|
|
@@ -204,15 +205,15 @@ function DatePickerSheet({
|
|
|
204
205
|
<DatePickerMonthNavigation
|
|
205
206
|
displayMonth={displayMonth}
|
|
206
207
|
interactionPolicy={interactionPolicy}
|
|
207
|
-
maxDate={
|
|
208
|
-
minDate={
|
|
208
|
+
maxDate={resolvedMaxDate}
|
|
209
|
+
minDate={resolvedMinDate}
|
|
209
210
|
onMonthChange={setDisplayMonth}
|
|
210
211
|
/>
|
|
211
212
|
<DatePickerWeekdays />
|
|
212
213
|
<DatePickerCalendar
|
|
213
214
|
interactionPolicy={interactionPolicy}
|
|
214
|
-
maxDate={
|
|
215
|
-
minDate={
|
|
215
|
+
maxDate={resolvedMaxDate}
|
|
216
|
+
minDate={resolvedMinDate}
|
|
216
217
|
monthDays={monthDays}
|
|
217
218
|
onSelect={onSelect}
|
|
218
219
|
testID={testID}
|
|
@@ -254,8 +255,11 @@ function DatePickerMonthNavigation({
|
|
|
254
255
|
maxDate,
|
|
255
256
|
minDate,
|
|
256
257
|
onMonthChange,
|
|
257
|
-
}:
|
|
258
|
+
}: {
|
|
258
259
|
displayMonth: Date;
|
|
260
|
+
interactionPolicy: DatePickerProps['interactionPolicy'];
|
|
261
|
+
maxDate: Date | undefined;
|
|
262
|
+
minDate: Date | undefined;
|
|
259
263
|
onMonthChange: (month: Date) => void;
|
|
260
264
|
}) {
|
|
261
265
|
const previousMonth = new Date(displayMonth.getFullYear(), displayMonth.getMonth() - 1, 1);
|
|
@@ -312,9 +316,14 @@ function DatePickerCalendar({
|
|
|
312
316
|
onSelect,
|
|
313
317
|
testID,
|
|
314
318
|
value,
|
|
315
|
-
}:
|
|
319
|
+
}: {
|
|
320
|
+
interactionPolicy: DatePickerProps['interactionPolicy'];
|
|
321
|
+
maxDate: Date | undefined;
|
|
322
|
+
minDate: Date | undefined;
|
|
316
323
|
monthDays: readonly (Date | null)[];
|
|
317
324
|
onSelect: (value: Date) => void;
|
|
325
|
+
testID: string | undefined;
|
|
326
|
+
value: DatePickerProps['value'];
|
|
318
327
|
}) {
|
|
319
328
|
return (
|
|
320
329
|
<Stack direction="row" gap="xs" wrap="wrap">
|