@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,58 @@
|
|
|
1
|
+
import type { ZoraComponentMeta } from '../../metadata';
|
|
2
|
+
|
|
3
|
+
export const datePickerMeta = {
|
|
4
|
+
name: 'DatePicker',
|
|
5
|
+
category: 'component',
|
|
6
|
+
description: 'Captures a local calendar date through the shared BottomSheet picker host.',
|
|
7
|
+
directManifestNode: true,
|
|
8
|
+
allowedChildren: [],
|
|
9
|
+
blueprint: {
|
|
10
|
+
label: 'Date picker',
|
|
11
|
+
defaultProps: {
|
|
12
|
+
value: null,
|
|
13
|
+
placeholder: 'Choose date',
|
|
14
|
+
disabled: false,
|
|
15
|
+
required: false,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
events: {
|
|
19
|
+
valueChange: {
|
|
20
|
+
label: 'Value change',
|
|
21
|
+
eventType: 'datePicker.valueChange',
|
|
22
|
+
description: 'Emitted when a local calendar date is selected.',
|
|
23
|
+
payloadFields: [{ path: 'value', type: 'string', label: 'Value' }],
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
value: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
category: 'State',
|
|
30
|
+
label: 'Value',
|
|
31
|
+
default: null,
|
|
32
|
+
authoring: { authority: 'instance' },
|
|
33
|
+
},
|
|
34
|
+
label: { type: 'string', category: 'Content', label: 'Label' },
|
|
35
|
+
description: { type: 'string', category: 'Content', label: 'Description' },
|
|
36
|
+
error: { type: 'string', category: 'Validation', label: 'Error' },
|
|
37
|
+
placeholder: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
category: 'Content',
|
|
40
|
+
label: 'Placeholder',
|
|
41
|
+
default: 'Choose date',
|
|
42
|
+
},
|
|
43
|
+
minDate: { type: 'string', category: 'Validation', label: 'Minimum date' },
|
|
44
|
+
maxDate: { type: 'string', category: 'Validation', label: 'Maximum date' },
|
|
45
|
+
disabled: {
|
|
46
|
+
type: 'boolean',
|
|
47
|
+
category: 'State',
|
|
48
|
+
label: 'Disabled',
|
|
49
|
+
default: false,
|
|
50
|
+
},
|
|
51
|
+
required: {
|
|
52
|
+
type: 'boolean',
|
|
53
|
+
category: 'Validation',
|
|
54
|
+
label: 'Required',
|
|
55
|
+
default: false,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { expect, test } from 'bun:test';
|
|
2
|
+
|
|
3
|
+
import { ZORA_COMPONENT_META } from '../../metadata/componentMeta';
|
|
4
|
+
|
|
5
|
+
test('DatePicker exposes a serializable manifest contract through the shared BottomSheet', async () => {
|
|
6
|
+
const source = await Bun.file('src/features/date-picker/adapters/inbound/DatePicker.tsx').text();
|
|
7
|
+
const meta = ZORA_COMPONENT_META.DatePicker;
|
|
8
|
+
|
|
9
|
+
expect(meta.directManifestNode).toBe(true);
|
|
10
|
+
expect(meta.props.value?.type).toBe('string');
|
|
11
|
+
expect(meta.events?.valueChange?.eventType).toBe('datePicker.valueChange');
|
|
12
|
+
expect(meta.bindings?.props?.value?.value.type).toBe('string');
|
|
13
|
+
expect(source).toContain('useBottomSheet()');
|
|
14
|
+
expect(source).toContain('formatLocalDate(date)');
|
|
15
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { describe, expect, test } from 'bun:test';
|
|
2
|
+
|
|
3
|
+
import { formatLocalDate, parseLocalDate } from './localDate';
|
|
4
|
+
|
|
5
|
+
describe('local date serialization', () => {
|
|
6
|
+
test('round-trips a valid YYYY-MM-DD value without a UTC conversion', () => {
|
|
7
|
+
const parsed = parseLocalDate('2026-09-13');
|
|
8
|
+
|
|
9
|
+
expect(parsed).toBeDefined();
|
|
10
|
+
expect(parsed ? formatLocalDate(parsed) : undefined).toBe('2026-09-13');
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
test('rejects malformed and impossible calendar dates', () => {
|
|
14
|
+
expect(parseLocalDate('2026-2-03')).toBeUndefined();
|
|
15
|
+
expect(parseLocalDate('2026-02-30')).toBeUndefined();
|
|
16
|
+
expect(parseLocalDate(null)).toBeUndefined();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const LOCAL_DATE_PATTERN = /^(\d{4})-(\d{2})-(\d{2})$/u;
|
|
2
|
+
|
|
3
|
+
/*** Parse a calendar date without applying a UTC offset. */
|
|
4
|
+
export function parseLocalDate(value: string | null | undefined): Date | undefined {
|
|
5
|
+
if (!value) return undefined;
|
|
6
|
+
|
|
7
|
+
const match = LOCAL_DATE_PATTERN.exec(value);
|
|
8
|
+
if (!match) return undefined;
|
|
9
|
+
|
|
10
|
+
const year = Number(match[1]);
|
|
11
|
+
const month = Number(match[2]);
|
|
12
|
+
const day = Number(match[3]);
|
|
13
|
+
const parsed = new Date(year, month - 1, day);
|
|
14
|
+
parsed.setFullYear(year);
|
|
15
|
+
|
|
16
|
+
return parsed.getFullYear() === year &&
|
|
17
|
+
parsed.getMonth() === month - 1 &&
|
|
18
|
+
parsed.getDate() === day
|
|
19
|
+
? parsed
|
|
20
|
+
: undefined;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/*** Serialize a Date as a local calendar date suitable for manifest state. */
|
|
24
|
+
export function formatLocalDate(value: Date): string {
|
|
25
|
+
const year = String(value.getFullYear()).padStart(4, '0');
|
|
26
|
+
const month = String(value.getMonth() + 1).padStart(2, '0');
|
|
27
|
+
const day = String(value.getDate()).padStart(2, '0');
|
|
28
|
+
return `${year}-${month}-${day}`;
|
|
29
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
4
|
+
import type { GradientProps } from '../../../../types/gradient';
|
|
5
|
+
import { Box } from '../../../layout/public';
|
|
5
6
|
import { useGradientRenderer } from './GradientRendererContext';
|
|
6
|
-
import type { GradientProps } from './types';
|
|
7
7
|
|
|
8
8
|
function GradientInner({
|
|
9
9
|
themeId: _themeId,
|
package/src/{components/gradient → features/gradient/adapters/inbound}/GradientRendererContext.tsx
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { createContext, use } from 'react';
|
|
2
2
|
|
|
3
|
-
import type { GradientRenderer, GradientRendererProviderProps } from '
|
|
3
|
+
import type { GradientRenderer, GradientRendererProviderProps } from '../../../../types/gradient';
|
|
4
4
|
|
|
5
5
|
const GradientRendererContext = createContext<GradientRenderer | null>(null);
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/***
|
|
8
8
|
* Supplies the host-owned renderer used by `Gradient`.
|
|
9
9
|
*
|
|
10
10
|
* Expo apps can adapt `expo-linear-gradient` here, while standalone React
|
|
@@ -14,6 +14,7 @@ export function GradientRendererProvider({ children, renderer }: GradientRendere
|
|
|
14
14
|
return <GradientRendererContext value={renderer}>{children}</GradientRendererContext>;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
/*** Resolves the host-owned gradient renderer for a Gradient instance. */
|
|
17
18
|
export function useGradientRenderer(): GradientRenderer {
|
|
18
19
|
const renderer = use(GradientRendererContext);
|
|
19
20
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ZoraComponentMeta } from '../../metadata';
|
|
2
|
+
import { CONTAINER_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';
|
|
3
|
+
|
|
4
|
+
export const gradientMeta = {
|
|
5
|
+
name: 'Gradient',
|
|
6
|
+
category: 'component',
|
|
7
|
+
description: 'Renders a host-backed gradient container for nested manifest content.',
|
|
8
|
+
directManifestNode: true,
|
|
9
|
+
allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],
|
|
10
|
+
blueprint: {
|
|
11
|
+
label: 'Gradient',
|
|
12
|
+
},
|
|
13
|
+
props: {
|
|
14
|
+
colors: {
|
|
15
|
+
type: 'array',
|
|
16
|
+
category: 'Style',
|
|
17
|
+
label: 'Colors',
|
|
18
|
+
},
|
|
19
|
+
locations: { type: 'array', category: 'Style', label: 'Locations' },
|
|
20
|
+
width: { type: 'number', category: 'Layout', label: 'Width' },
|
|
21
|
+
height: { type: 'number', category: 'Layout', label: 'Height' },
|
|
22
|
+
minHeight: { type: 'number', category: 'Layout', label: 'Minimum height' },
|
|
23
|
+
radius: { type: 'radius', category: 'Style', label: 'Corner radius' },
|
|
24
|
+
p: { type: 'spacing', category: 'Layout', label: 'Padding' },
|
|
25
|
+
},
|
|
26
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { expect, test } from 'bun:test';
|
|
2
|
+
|
|
3
|
+
import { ZORA_COMPONENT_META } from '../../metadata/componentMeta';
|
|
4
|
+
|
|
5
|
+
test('Gradient is a direct manifest container with serializable colors', () => {
|
|
6
|
+
const meta = ZORA_COMPONENT_META.Gradient;
|
|
7
|
+
|
|
8
|
+
expect(meta?.directManifestNode).toBe(true);
|
|
9
|
+
expect(meta?.allowedChildren.length).toBeGreaterThan(0);
|
|
10
|
+
expect(meta?.props.colors).toEqual({
|
|
11
|
+
type: 'array',
|
|
12
|
+
category: 'Style',
|
|
13
|
+
label: 'Colors',
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export { Gradient } from './Gradient';
|
|
2
|
-
export { GradientRendererProvider } from './GradientRendererContext';
|
|
3
1
|
export type {
|
|
4
2
|
GradientColor,
|
|
5
3
|
GradientColors,
|
|
@@ -9,4 +7,6 @@ export type {
|
|
|
9
7
|
GradientRenderer,
|
|
10
8
|
GradientRendererProps,
|
|
11
9
|
GradientRendererProviderProps,
|
|
12
|
-
} from '
|
|
10
|
+
} from '../../types/gradient';
|
|
11
|
+
export { Gradient } from './adapters/inbound/Gradient';
|
|
12
|
+
export { GradientRendererProvider } from './adapters/inbound/GradientRendererContext';
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import type { HeroAction, HeroAlign, HeroProps } from './types';
|
|
3
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
4
|
+
import type { HeroAction, HeroAlign, HeroProps } from '../../../../types/hero';
|
|
5
|
+
import { Button } from '../../../button/public';
|
|
6
|
+
import { Card } from '../../../card/public';
|
|
7
|
+
import { Box, Grid, Stack } from '../../../layout/public';
|
|
8
|
+
import { Heading, Text } from '../../../typography/public';
|
|
10
9
|
|
|
11
10
|
function HeroInner({
|
|
12
11
|
themeId: _themeId,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, expect, test } from 'bun:test';
|
|
2
2
|
|
|
3
3
|
import { ZORA_BINDABLE_COMPONENT_META, ZORA_COMPONENT_META } from '../../metadata';
|
|
4
|
-
import { missingElementMeta } from './
|
|
4
|
+
import { missingElementMeta } from './missingElementMeta';
|
|
5
5
|
|
|
6
6
|
describe('MissingElement draft contract', () => {
|
|
7
7
|
test('is a release-blocking manifest leaf distinct from completed states', () => {
|
|
@@ -41,7 +41,9 @@ describe('MissingElement draft contract', () => {
|
|
|
41
41
|
});
|
|
42
42
|
|
|
43
43
|
test('visibly and accessibly identifies the gap while preserving its minimum dimensions', async () => {
|
|
44
|
-
const source = await Bun.file(
|
|
44
|
+
const source = await Bun.file(
|
|
45
|
+
'src/features/missing-element/adapters/inbound/MissingElement.tsx',
|
|
46
|
+
).text();
|
|
45
47
|
|
|
46
48
|
expect(source).toContain('accessibilityLabel={accessibilityLabel}');
|
|
47
49
|
expect(source).toContain('accessibilityRole="text"');
|
|
@@ -54,8 +56,8 @@ describe('MissingElement draft contract', () => {
|
|
|
54
56
|
|
|
55
57
|
test('accepts the canonical interaction policy without owning interactive behavior', async () => {
|
|
56
58
|
const [source, types] = await Promise.all([
|
|
57
|
-
Bun.file('src/
|
|
58
|
-
Bun.file('src/
|
|
59
|
+
Bun.file('src/features/missing-element/adapters/inbound/MissingElement.tsx').text(),
|
|
60
|
+
Bun.file('src/types/missing-element.ts').text(),
|
|
59
61
|
]);
|
|
60
62
|
|
|
61
63
|
expect(types).toContain('MissingElementProps extends ZoraBaseProps');
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
4
|
+
import { useZoraTheme } from '../../../../theme/useZoraTheme';
|
|
5
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
6
|
+
import type { MissingElementProps } from '../../../../types/missing-element';
|
|
7
|
+
import { Badge } from '../../../badge/public';
|
|
8
|
+
import { Box, Stack } from '../../../layout/public';
|
|
9
|
+
import { Text } from '../../../typography/public';
|
|
10
10
|
|
|
11
11
|
/***
|
|
12
12
|
* Renders the visible, non-interactive body of a draft missing-element marker.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
3
|
+
import { useZoraTheme } from '../../../../theme/useZoraTheme';
|
|
4
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
5
|
+
import type { SkeletonProps } from '../../../../types/skeleton';
|
|
6
|
+
import { Box } from '../../../layout/public';
|
|
7
7
|
|
|
8
8
|
function SkeletonInner({
|
|
9
9
|
themeId: _themeId,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
4
|
+
import type { SkeletonCardProps } from '../../../../types/skeleton';
|
|
5
|
+
import { ButtonGroup } from '../../../button/public';
|
|
6
|
+
import { Card } from '../../../card/public';
|
|
7
|
+
import { Stack } from '../../../layout/public';
|
|
7
8
|
import { Skeleton } from './Skeleton';
|
|
8
9
|
import { SkeletonText } from './SkeletonText';
|
|
9
|
-
import type { SkeletonCardProps } from './types';
|
|
10
10
|
|
|
11
11
|
function SkeletonCardInner({
|
|
12
12
|
themeId: _themeId,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import { List, type ListRowProps } from '
|
|
4
|
-
import { withZoraThemeScope } from '
|
|
3
|
+
import { List, type ListRowProps } from '../../../../patterns/list';
|
|
4
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
5
|
+
import type { SkeletonListProps } from '../../../../types/skeleton';
|
|
5
6
|
import { Skeleton } from './Skeleton';
|
|
6
7
|
import { SkeletonText } from './SkeletonText';
|
|
7
|
-
import type { SkeletonListProps } from './types';
|
|
8
8
|
|
|
9
9
|
function clampRows(rows: number): number {
|
|
10
10
|
if (!Number.isFinite(rows)) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
4
|
+
import type { SkeletonTextProps } from '../../../../types/skeleton';
|
|
5
|
+
import { Stack } from '../../../layout/public';
|
|
5
6
|
import { Skeleton } from './Skeleton';
|
|
6
|
-
import type { SkeletonTextProps } from './types';
|
|
7
7
|
|
|
8
8
|
function clampLines(lines: number): number {
|
|
9
9
|
if (!Number.isFinite(lines)) {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { expect, test } from 'bun:test';
|
|
2
|
+
|
|
3
|
+
import { ZORA_COMPONENT_META } from '../../metadata/componentMeta';
|
|
4
|
+
|
|
5
|
+
test('skeletons support direct authoring and automatic feature loading states', async () => {
|
|
6
|
+
const [dataTableSource, publicSource] = await Promise.all([
|
|
7
|
+
Bun.file('src/features/data-table/adapters/inbound/DataTable.tsx').text(),
|
|
8
|
+
Bun.file('src/features/skeleton/public.ts').text(),
|
|
9
|
+
]);
|
|
10
|
+
|
|
11
|
+
expect(ZORA_COMPONENT_META.Skeleton.directManifestNode).toBe(true);
|
|
12
|
+
expect(ZORA_COMPONENT_META.SkeletonCard.directManifestNode).toBe(true);
|
|
13
|
+
expect(ZORA_COMPONENT_META.SkeletonList.directManifestNode).toBe(true);
|
|
14
|
+
expect(ZORA_COMPONENT_META.SkeletonText.directManifestNode).toBe(true);
|
|
15
|
+
expect(publicSource).toContain('Skeleton');
|
|
16
|
+
expect(publicSource).toContain('SkeletonCard');
|
|
17
|
+
expect(publicSource).toContain('SkeletonList');
|
|
18
|
+
expect(publicSource).toContain('SkeletonText');
|
|
19
|
+
expect(ZORA_COMPONENT_META.SkeletonList.bindings?.props?.rows?.value.type).toBe('number');
|
|
20
|
+
|
|
21
|
+
expect(dataTableSource).toContain("from '../../../skeleton/public'");
|
|
22
|
+
expect(dataTableSource).toContain('if (loading)');
|
|
23
|
+
expect(dataTableSource).toContain('<SkeletonList rows={loadingRows}');
|
|
24
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type {
|
|
2
|
+
SkeletonCardProps,
|
|
3
|
+
SkeletonDimension,
|
|
4
|
+
SkeletonListProps,
|
|
5
|
+
SkeletonListVariant,
|
|
6
|
+
SkeletonProps,
|
|
7
|
+
SkeletonRadius,
|
|
8
|
+
SkeletonTextProps,
|
|
9
|
+
} from '../../types/skeleton';
|
|
10
|
+
export { Skeleton } from './adapters/inbound/Skeleton';
|
|
11
|
+
export { SkeletonCard } from './adapters/inbound/SkeletonCard';
|
|
12
|
+
export { SkeletonList } from './adapters/inbound/SkeletonList';
|
|
13
|
+
export { SkeletonText } from './adapters/inbound/SkeletonText';
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { ZoraComponentMeta } from '../../metadata';
|
|
2
|
+
|
|
3
|
+
export const skeletonMeta = {
|
|
4
|
+
name: 'Skeleton',
|
|
5
|
+
category: 'component',
|
|
6
|
+
description: 'Generic visual placeholder for a loading content region.',
|
|
7
|
+
directManifestNode: true,
|
|
8
|
+
allowedChildren: [],
|
|
9
|
+
blueprint: {
|
|
10
|
+
label: 'Skeleton',
|
|
11
|
+
defaultProps: { height: 16, radius: 'm' },
|
|
12
|
+
},
|
|
13
|
+
props: {
|
|
14
|
+
width: { type: 'number', category: 'Layout', label: 'Width' },
|
|
15
|
+
height: { type: 'number', category: 'Layout', label: 'Height', default: 16 },
|
|
16
|
+
radius: { type: 'radius', category: 'Appearance', label: 'Radius', default: 'm' },
|
|
17
|
+
},
|
|
18
|
+
} as const satisfies ZoraComponentMeta;
|
|
19
|
+
|
|
20
|
+
export const skeletonTextMeta = {
|
|
21
|
+
name: 'SkeletonText',
|
|
22
|
+
category: 'component',
|
|
23
|
+
description: 'Multi-line placeholder for loading text content.',
|
|
24
|
+
directManifestNode: true,
|
|
25
|
+
allowedChildren: [],
|
|
26
|
+
blueprint: {
|
|
27
|
+
label: 'Skeleton text',
|
|
28
|
+
defaultProps: { lines: 3, lineHeight: 12, gap: 'xs' },
|
|
29
|
+
},
|
|
30
|
+
props: {
|
|
31
|
+
lines: { type: 'number', category: 'Content', label: 'Lines', default: 3 },
|
|
32
|
+
lineHeight: { type: 'number', category: 'Layout', label: 'Line height', default: 12 },
|
|
33
|
+
gap: { type: 'spacing', category: 'Spacing', label: 'Gap', default: 'xs' },
|
|
34
|
+
width: { type: 'number', category: 'Layout', label: 'Width' },
|
|
35
|
+
lastLineWidth: { type: 'number', category: 'Layout', label: 'Last line width' },
|
|
36
|
+
},
|
|
37
|
+
} as const satisfies ZoraComponentMeta;
|
|
38
|
+
|
|
39
|
+
export const skeletonCardMeta = {
|
|
40
|
+
name: 'SkeletonCard',
|
|
41
|
+
category: 'component',
|
|
42
|
+
description: 'Card-shaped placeholder for loading media, copy, and actions.',
|
|
43
|
+
directManifestNode: true,
|
|
44
|
+
allowedChildren: [],
|
|
45
|
+
blueprint: {
|
|
46
|
+
label: 'Skeleton card',
|
|
47
|
+
defaultProps: { media: false, actions: false, lines: 3, compact: false },
|
|
48
|
+
},
|
|
49
|
+
props: {
|
|
50
|
+
media: { type: 'boolean', category: 'Content', label: 'Media', default: false },
|
|
51
|
+
actions: { type: 'boolean', category: 'Content', label: 'Actions', default: false },
|
|
52
|
+
lines: { type: 'number', category: 'Content', label: 'Lines', default: 3 },
|
|
53
|
+
compact: { type: 'boolean', category: 'Layout', label: 'Compact', default: false },
|
|
54
|
+
},
|
|
55
|
+
} as const satisfies ZoraComponentMeta;
|
|
56
|
+
|
|
57
|
+
export const skeletonListMeta = {
|
|
58
|
+
name: 'SkeletonList',
|
|
59
|
+
category: 'component',
|
|
60
|
+
description: 'List-shaped placeholder for loading rows with optional leading content.',
|
|
61
|
+
directManifestNode: true,
|
|
62
|
+
allowedChildren: [],
|
|
63
|
+
blueprint: {
|
|
64
|
+
label: 'Skeleton list',
|
|
65
|
+
defaultProps: {
|
|
66
|
+
rows: 5,
|
|
67
|
+
avatar: false,
|
|
68
|
+
media: false,
|
|
69
|
+
lines: 2,
|
|
70
|
+
variant: 'divider',
|
|
71
|
+
compact: false,
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
props: {
|
|
75
|
+
rows: { type: 'number', category: 'Content', label: 'Rows', default: 5 },
|
|
76
|
+
avatar: { type: 'boolean', category: 'Content', label: 'Avatar', default: false },
|
|
77
|
+
media: { type: 'boolean', category: 'Content', label: 'Media', default: false },
|
|
78
|
+
lines: { type: 'number', category: 'Content', label: 'Lines', default: 2 },
|
|
79
|
+
variant: {
|
|
80
|
+
type: 'enum',
|
|
81
|
+
category: 'Appearance',
|
|
82
|
+
label: 'Variant',
|
|
83
|
+
enum: ['divider', 'card'],
|
|
84
|
+
default: 'divider',
|
|
85
|
+
},
|
|
86
|
+
compact: { type: 'boolean', category: 'Layout', label: 'Compact', default: false },
|
|
87
|
+
},
|
|
88
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -2,12 +2,12 @@ import { Field } from '@ankhorage/surface';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ScrollView, StyleSheet } from 'react-native';
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
5
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
6
|
+
import type { TimePickerProps } from '../../../../types/time-picker';
|
|
7
|
+
import { useBottomSheet } from '../../../bottom-sheet/public';
|
|
8
|
+
import { Button } from '../../../button/public';
|
|
9
|
+
import { Stack } from '../../../layout/public';
|
|
10
|
+
import { Text } from '../../../typography/public';
|
|
11
11
|
|
|
12
12
|
const MINUTES_PER_DAY = 24 * 60;
|
|
13
13
|
const DEFAULT_STEP_MINUTES = 30;
|
|
@@ -64,12 +64,9 @@ function generateTimeOptions({
|
|
|
64
64
|
const step = resolveStepMinutes(stepMinutes);
|
|
65
65
|
const min = parseTimeToMinutes(minTime) ?? 0;
|
|
66
66
|
const max = parseTimeToMinutes(maxTime) ?? MINUTES_PER_DAY - 1;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
if (minute >= min && minute <= max) options.push(formatMinutes(minute));
|
|
71
|
-
}
|
|
72
|
-
return options;
|
|
67
|
+
return Array.from({ length: Math.ceil(MINUTES_PER_DAY / step) }, (_, index) => index * step)
|
|
68
|
+
.filter((minute) => minute >= min && minute <= max)
|
|
69
|
+
.map(formatMinutes);
|
|
73
70
|
}
|
|
74
71
|
|
|
75
72
|
function TimePickerInner({
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { expect, test } from 'bun:test';
|
|
2
|
+
|
|
3
|
+
import { ZORA_COMPONENT_META } from '../../metadata/componentMeta';
|
|
4
|
+
|
|
5
|
+
test('TimePicker exposes a serializable manifest contract through the shared BottomSheet', async () => {
|
|
6
|
+
const source = await Bun.file('src/features/time-picker/adapters/inbound/TimePicker.tsx').text();
|
|
7
|
+
const meta = ZORA_COMPONENT_META.TimePicker;
|
|
8
|
+
|
|
9
|
+
expect(meta.directManifestNode).toBe(true);
|
|
10
|
+
expect(meta.props.value?.type).toBe('string');
|
|
11
|
+
expect(meta.events?.valueChange?.eventType).toBe('timePicker.valueChange');
|
|
12
|
+
expect(meta.bindings?.props?.value?.value.type).toBe('string');
|
|
13
|
+
expect(source).toContain('useBottomSheet()');
|
|
14
|
+
});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { ZoraComponentMeta } from '../../metadata';
|
|
2
|
+
|
|
3
|
+
export const timePickerMeta = {
|
|
4
|
+
name: 'TimePicker',
|
|
5
|
+
category: 'component',
|
|
6
|
+
description: 'Captures a local HH:mm time through the shared BottomSheet picker host.',
|
|
7
|
+
directManifestNode: true,
|
|
8
|
+
allowedChildren: [],
|
|
9
|
+
blueprint: {
|
|
10
|
+
label: 'Time picker',
|
|
11
|
+
defaultProps: {
|
|
12
|
+
value: null,
|
|
13
|
+
placeholder: 'Choose time',
|
|
14
|
+
stepMinutes: 30,
|
|
15
|
+
disabled: false,
|
|
16
|
+
required: false,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
events: {
|
|
20
|
+
valueChange: {
|
|
21
|
+
label: 'Value change',
|
|
22
|
+
eventType: 'timePicker.valueChange',
|
|
23
|
+
description: 'Emitted when an HH:mm time value is selected.',
|
|
24
|
+
payloadFields: [{ path: 'value', type: 'string', label: 'Value' }],
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
props: {
|
|
28
|
+
value: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
category: 'State',
|
|
31
|
+
label: 'Value',
|
|
32
|
+
default: null,
|
|
33
|
+
authoring: { authority: 'instance' },
|
|
34
|
+
},
|
|
35
|
+
label: { type: 'string', category: 'Content', label: 'Label' },
|
|
36
|
+
description: { type: 'string', category: 'Content', label: 'Description' },
|
|
37
|
+
error: { type: 'string', category: 'Validation', label: 'Error' },
|
|
38
|
+
placeholder: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
category: 'Content',
|
|
41
|
+
label: 'Placeholder',
|
|
42
|
+
default: 'Choose time',
|
|
43
|
+
},
|
|
44
|
+
minTime: { type: 'string', category: 'Validation', label: 'Minimum time' },
|
|
45
|
+
maxTime: { type: 'string', category: 'Validation', label: 'Maximum time' },
|
|
46
|
+
stepMinutes: {
|
|
47
|
+
type: 'number',
|
|
48
|
+
category: 'Behavior',
|
|
49
|
+
label: 'Step in minutes',
|
|
50
|
+
default: 30,
|
|
51
|
+
},
|
|
52
|
+
disabled: {
|
|
53
|
+
type: 'boolean',
|
|
54
|
+
category: 'State',
|
|
55
|
+
label: 'Disabled',
|
|
56
|
+
default: false,
|
|
57
|
+
},
|
|
58
|
+
required: {
|
|
59
|
+
type: 'boolean',
|
|
60
|
+
category: 'Validation',
|
|
61
|
+
label: 'Required',
|
|
62
|
+
default: false,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
} as const satisfies ZoraComponentMeta;
|