@ankhorage/zora 10.0.0 → 12.0.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 +20 -0
- package/README.md +2 -1
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +4 -0
- package/dist/constants.js.map +1 -1
- 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/features/form/adapters/inbound/Form.d.ts +5 -0
- package/dist/features/form/adapters/inbound/Form.d.ts.map +1 -0
- package/dist/features/form/adapters/inbound/Form.js +18 -0
- package/dist/features/form/adapters/inbound/Form.js.map +1 -0
- package/dist/{components/form → features/form/adapters/inbound}/FormActions.d.ts +1 -1
- package/dist/features/form/adapters/inbound/FormActions.d.ts.map +1 -0
- package/dist/{components/form → features/form/adapters/inbound}/FormActions.js +3 -3
- package/dist/features/form/adapters/inbound/FormActions.js.map +1 -0
- package/dist/features/form/adapters/inbound/FormError.d.ts +5 -0
- package/dist/features/form/adapters/inbound/FormError.d.ts.map +1 -0
- package/dist/features/form/adapters/inbound/FormError.js +18 -0
- package/dist/features/form/adapters/inbound/FormError.js.map +1 -0
- package/dist/features/form/adapters/inbound/FormField.d.ts +5 -0
- package/dist/features/form/adapters/inbound/FormField.d.ts.map +1 -0
- package/dist/{patterns/form-field → features/form/adapters/inbound}/FormField.js +5 -4
- package/dist/features/form/adapters/inbound/FormField.js.map +1 -0
- package/dist/features/form/formActionsMeta.d.ts +9 -0
- package/dist/features/form/formActionsMeta.d.ts.map +1 -0
- package/dist/features/form/formActionsMeta.js +9 -0
- package/dist/features/form/formActionsMeta.js.map +1 -0
- package/dist/features/form/formErrorMeta.d.ts +32 -0
- package/dist/features/form/formErrorMeta.d.ts.map +1 -0
- package/dist/features/form/formErrorMeta.js +19 -0
- package/dist/features/form/formErrorMeta.js.map +1 -0
- package/dist/{components/form/meta.d.ts → features/form/formFieldMeta.d.ts} +28 -39
- package/dist/features/form/formFieldMeta.d.ts.map +1 -0
- package/dist/features/form/formFieldMeta.js +35 -0
- package/dist/features/form/formFieldMeta.js.map +1 -0
- package/dist/features/form/formMeta.d.ts +61 -0
- package/dist/features/form/formMeta.d.ts.map +1 -0
- package/dist/features/form/formMeta.js +34 -0
- package/dist/features/form/formMeta.js.map +1 -0
- package/dist/features/form/public.d.ts +8 -0
- package/dist/features/form/public.d.ts.map +1 -0
- package/dist/features/form/public.js +7 -0
- package/dist/features/form/public.js.map +1 -0
- package/dist/{components → features}/form/useFormController.d.ts +1 -1
- package/dist/features/form/useFormController.d.ts.map +1 -0
- package/dist/{components → features}/form/useFormController.js +1 -1
- package/dist/features/form/useFormController.js.map +1 -0
- package/dist/{components/form → features/form/utils}/validation.d.ts +1 -1
- package/dist/features/form/utils/validation.d.ts.map +1 -0
- package/dist/{components/form → features/form/utils}/validation.js +2 -4
- package/dist/features/form/utils/validation.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/features/uploader/adapters/inbound/Uploader.d.ts.map +1 -1
- package/dist/features/uploader/adapters/inbound/Uploader.js +1 -1
- package/dist/features/uploader/adapters/inbound/Uploader.js.map +1 -1
- package/dist/index.d.ts +7 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -6
- 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 +8 -1
- 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 +9 -6
- package/dist/metadata/componentMeta.js.map +1 -1
- package/dist/patterns/auth/AuthForm.d.ts +21 -0
- package/dist/patterns/auth/AuthForm.d.ts.map +1 -0
- package/dist/patterns/auth/AuthForm.js +19 -0
- package/dist/patterns/auth/AuthForm.js.map +1 -0
- package/dist/patterns/auth/AuthFormField.d.ts +16 -0
- package/dist/patterns/auth/AuthFormField.d.ts.map +1 -0
- package/dist/patterns/auth/AuthFormField.js +38 -0
- package/dist/patterns/auth/AuthFormField.js.map +1 -0
- package/dist/patterns/auth/ForgotPasswordForm.d.ts.map +1 -1
- package/dist/patterns/auth/ForgotPasswordForm.js +2 -2
- package/dist/patterns/auth/ForgotPasswordForm.js.map +1 -1
- package/dist/patterns/auth/OtpForm.d.ts.map +1 -1
- package/dist/patterns/auth/OtpForm.js +2 -2
- package/dist/patterns/auth/OtpForm.js.map +1 -1
- package/dist/patterns/auth/SignInForm.d.ts.map +1 -1
- package/dist/patterns/auth/SignInForm.js +2 -2
- package/dist/patterns/auth/SignInForm.js.map +1 -1
- package/dist/patterns/auth/SignUpForm.d.ts.map +1 -1
- package/dist/patterns/auth/SignUpForm.js +2 -2
- package/dist/patterns/auth/SignUpForm.js.map +1 -1
- package/dist/patterns/auth/types.d.ts +1 -1
- package/dist/patterns/auth/types.d.ts.map +1 -1
- package/dist/patterns/auth/types.js.map +1 -1
- package/dist/patterns/auth/utils.d.ts +1 -1
- package/dist/patterns/auth/utils.d.ts.map +1 -1
- package/dist/patterns/auth/utils.js.map +1 -1
- package/dist/patterns/inspector-field/InspectorField.js +1 -1
- package/dist/patterns/inspector-field/InspectorField.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 +6 -6
- package/dist/registry.js.map +1 -1
- 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/form/types.d.ts → types/form.d.ts} +12 -28
- package/dist/types/form.d.ts.map +1 -0
- package/dist/types/form.js +2 -0
- package/dist/types/form.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 +2 -1
- package/src/audit.test.ts +2 -4
- package/src/constants.ts +4 -0
- package/src/featureManifest.test.ts +19 -0
- 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/features/form/adapters/inbound/Form.tsx +39 -0
- package/src/{components/form → features/form/adapters/inbound}/FormActions.tsx +4 -4
- package/src/features/form/adapters/inbound/FormError.tsx +22 -0
- package/src/{patterns/form-field → features/form/adapters/inbound}/FormField.tsx +6 -4
- package/src/{components/date-picker/meta.ts → features/form/formActionsMeta.ts} +3 -4
- package/src/features/form/formErrorMeta.ts +19 -0
- package/src/features/form/formFieldMeta.ts +35 -0
- package/src/features/form/formMeta.ts +34 -0
- package/src/{components/form/index.ts → features/form/public.ts} +6 -7
- package/src/{components → features}/form/useFormController.ts +2 -2
- package/src/{components/form → features/form/utils}/validation.test.ts +4 -1
- package/src/{components/form → features/form/utils}/validation.ts +4 -8
- 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/features/uploader/adapters/inbound/Uploader.tsx +1 -1
- package/src/index.ts +58 -45
- package/src/interactionPolicy.test.ts +3 -3
- package/src/metadata/allowedChildren.ts +8 -1
- package/src/metadata/componentMeta.test.ts +24 -1
- package/src/metadata/componentMeta.ts +14 -11
- package/src/patterns/auth/AuthForm.tsx +68 -0
- package/src/patterns/auth/AuthFormField.tsx +81 -0
- package/src/patterns/auth/ForgotPasswordForm.tsx +3 -2
- package/src/patterns/auth/OtpForm.tsx +3 -2
- package/src/patterns/auth/SignInForm.tsx +3 -2
- package/src/patterns/auth/SignUpForm.tsx +3 -2
- package/src/patterns/auth/types.ts +1 -1
- package/src/patterns/auth/utils.ts +1 -1
- package/src/patterns/inspector-field/InspectorField.tsx +1 -1
- package/src/registry.ts +6 -6
- package/src/theme/themeScopeStructure.test.ts +5 -7
- package/src/{components/date-picker/types.ts → types/date-picker.ts} +5 -5
- package/src/{components/form/types.ts → types/form.ts} +12 -36
- 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/form/Form.d.ts +0 -7
- package/dist/components/form/Form.d.ts.map +0 -1
- package/dist/components/form/Form.js +0 -34
- package/dist/components/form/Form.js.map +0 -1
- package/dist/components/form/FormActions.d.ts.map +0 -1
- package/dist/components/form/FormActions.js.map +0 -1
- package/dist/components/form/FormError.d.ts +0 -7
- package/dist/components/form/FormError.d.ts.map +0 -1
- package/dist/components/form/FormError.js +0 -21
- package/dist/components/form/FormError.js.map +0 -1
- package/dist/components/form/FormField.d.ts +0 -7
- package/dist/components/form/FormField.d.ts.map +0 -1
- package/dist/components/form/FormField.js +0 -81
- package/dist/components/form/FormField.js.map +0 -1
- package/dist/components/form/index.d.ts +0 -8
- package/dist/components/form/index.d.ts.map +0 -1
- package/dist/components/form/index.js +0 -7
- package/dist/components/form/index.js.map +0 -1
- package/dist/components/form/meta.d.ts.map +0 -1
- package/dist/components/form/meta.js +0 -94
- package/dist/components/form/meta.js.map +0 -1
- package/dist/components/form/types.d.ts.map +0 -1
- package/dist/components/form/types.js +0 -2
- package/dist/components/form/types.js.map +0 -1
- package/dist/components/form/useFormController.d.ts.map +0 -1
- package/dist/components/form/useFormController.js.map +0 -1
- package/dist/components/form/validation.d.ts.map +0 -1
- package/dist/components/form/validation.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/form-field/FormField.d.ts +0 -4
- package/dist/patterns/form-field/FormField.d.ts.map +0 -1
- package/dist/patterns/form-field/FormField.js.map +0 -1
- package/dist/patterns/form-field/index.d.ts +0 -2
- package/dist/patterns/form-field/index.d.ts.map +0 -1
- package/dist/patterns/form-field/index.js +0 -2
- package/dist/patterns/form-field/index.js.map +0 -1
- package/dist/patterns/form-field/types.d.ts +0 -9
- package/dist/patterns/form-field/types.d.ts.map +0 -1
- package/dist/patterns/form-field/types.js +0 -2
- package/dist/patterns/form-field/types.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/form/Form.tsx +0 -74
- package/src/components/form/FormError.tsx +0 -34
- package/src/components/form/FormField.tsx +0 -157
- package/src/components/form/meta.ts +0 -98
- 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/form-field/index.ts +0 -1
- package/src/patterns/form-field/types.ts +0 -16
- package/src/patterns/hero/index.ts +0 -2
- package/src/patterns/missing-element/index.ts +0 -2
- /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
|
@@ -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;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
import { Modal } from '../../../../components/modal';
|
|
4
|
-
import { FormField } from '../../../../patterns/form-field';
|
|
5
4
|
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
6
5
|
import type { UploadAsset, UploaderProps, UploadType } from '../../../../types/upload';
|
|
7
6
|
import { Button } from '../../../button/public';
|
|
7
|
+
import { FormField } from '../../../form/public';
|
|
8
8
|
import { Icon } from '../../../icon/public';
|
|
9
9
|
import { Image } from '../../../image/public';
|
|
10
10
|
import { Box, Stack } from '../../../layout/public';
|
package/src/index.ts
CHANGED
|
@@ -2,35 +2,6 @@ export type { AppBarMode, AppBarOverflowAction, AppBarProps } from './components
|
|
|
2
2
|
export { AppBar } from './components/app-bar';
|
|
3
3
|
export type { BreadcrumbItem, BreadcrumbsProps } from './components/breadcrumbs';
|
|
4
4
|
export { Breadcrumbs } from './components/breadcrumbs';
|
|
5
|
-
export type { DatePickerProps, DatePickerValue } from './components/date-picker';
|
|
6
|
-
export { DatePicker } from './components/date-picker';
|
|
7
|
-
export type {
|
|
8
|
-
FormActionsProps,
|
|
9
|
-
FormErrorProps,
|
|
10
|
-
FormErrors,
|
|
11
|
-
FormFieldConfig,
|
|
12
|
-
FormFieldControlProps,
|
|
13
|
-
FormFieldInputType,
|
|
14
|
-
FormFieldProps,
|
|
15
|
-
FormProps,
|
|
16
|
-
FormValidationErrors,
|
|
17
|
-
FormValidationResult,
|
|
18
|
-
FormValues,
|
|
19
|
-
UseFormControllerOptions,
|
|
20
|
-
UseFormControllerResult,
|
|
21
|
-
ValidationRule,
|
|
22
|
-
} from './components/form';
|
|
23
|
-
export {
|
|
24
|
-
Form,
|
|
25
|
-
FormActions,
|
|
26
|
-
FormError,
|
|
27
|
-
FormField,
|
|
28
|
-
hasRequiredRule,
|
|
29
|
-
useFormController,
|
|
30
|
-
validateField,
|
|
31
|
-
validateFields,
|
|
32
|
-
validateValue,
|
|
33
|
-
} from './components/form';
|
|
34
5
|
export type {
|
|
35
6
|
GradientColor,
|
|
36
7
|
GradientColors,
|
|
@@ -54,20 +25,8 @@ export type { SearchBarProps } from './components/search-bar';
|
|
|
54
25
|
export { SearchBar } from './components/search-bar';
|
|
55
26
|
export type { SelectOption, SelectProps } from './components/select';
|
|
56
27
|
export { Select } from './components/select';
|
|
57
|
-
export type {
|
|
58
|
-
SkeletonCardProps,
|
|
59
|
-
SkeletonDimension,
|
|
60
|
-
SkeletonListProps,
|
|
61
|
-
SkeletonListVariant,
|
|
62
|
-
SkeletonProps,
|
|
63
|
-
SkeletonRadius,
|
|
64
|
-
SkeletonTextProps,
|
|
65
|
-
} from './components/skeleton';
|
|
66
|
-
export { Skeleton, SkeletonCard, SkeletonList, SkeletonText } from './components/skeleton';
|
|
67
28
|
export type { TabItem, TabsProps, TabsVariant } from './components/tabs';
|
|
68
29
|
export { Tabs } from './components/tabs';
|
|
69
|
-
export type { TimePickerProps, TimePickerValue } from './components/time-picker';
|
|
70
|
-
export { TimePicker } from './components/time-picker';
|
|
71
30
|
export type { ToastOptions, ToastProps, ToastProviderProps, ToastStatus } from './components/toast';
|
|
72
31
|
export { Toast, ToastProvider, useToast } from './components/toast';
|
|
73
32
|
export type { ToolbarActionProps, ToolbarPosition, ToolbarProps } from './components/toolbar';
|
|
@@ -127,6 +86,11 @@ export type {
|
|
|
127
86
|
DataTableSortState,
|
|
128
87
|
} from './features/data-table/public';
|
|
129
88
|
export { DataTable } from './features/data-table/public';
|
|
89
|
+
export {
|
|
90
|
+
DatePicker,
|
|
91
|
+
type DatePickerProps,
|
|
92
|
+
type DatePickerValue,
|
|
93
|
+
} from './features/date-picker/public';
|
|
130
94
|
export {
|
|
131
95
|
EmptyState,
|
|
132
96
|
type EmptyStateAction,
|
|
@@ -139,6 +103,32 @@ export {
|
|
|
139
103
|
type CheckboxGroupProps,
|
|
140
104
|
type CheckboxProps,
|
|
141
105
|
} from './features/form/checkbox/public';
|
|
106
|
+
export type {
|
|
107
|
+
FormActionsProps,
|
|
108
|
+
FormErrorProps,
|
|
109
|
+
FormErrors,
|
|
110
|
+
FormFieldConfig,
|
|
111
|
+
FormFieldInputType,
|
|
112
|
+
FormFieldProps,
|
|
113
|
+
FormProps,
|
|
114
|
+
FormValidationErrors,
|
|
115
|
+
FormValidationResult,
|
|
116
|
+
FormValues,
|
|
117
|
+
UseFormControllerOptions,
|
|
118
|
+
UseFormControllerResult,
|
|
119
|
+
ValidationRule,
|
|
120
|
+
} from './features/form/public';
|
|
121
|
+
export {
|
|
122
|
+
Form,
|
|
123
|
+
FormActions,
|
|
124
|
+
FormError,
|
|
125
|
+
FormField,
|
|
126
|
+
hasRequiredRule,
|
|
127
|
+
useFormController,
|
|
128
|
+
validateField,
|
|
129
|
+
validateFields,
|
|
130
|
+
validateValue,
|
|
131
|
+
} from './features/form/public';
|
|
142
132
|
export {
|
|
143
133
|
Radio,
|
|
144
134
|
RadioGroup,
|
|
@@ -151,6 +141,14 @@ export {
|
|
|
151
141
|
type TextInputProps,
|
|
152
142
|
type TextInputTrailingAction,
|
|
153
143
|
} from './features/form/text-input/public';
|
|
144
|
+
export {
|
|
145
|
+
Hero,
|
|
146
|
+
type HeroAction,
|
|
147
|
+
type HeroAlign,
|
|
148
|
+
type HeroLayout,
|
|
149
|
+
type HeroProps,
|
|
150
|
+
type HeroTone,
|
|
151
|
+
} from './features/hero/public';
|
|
154
152
|
export type { IconProps } from './features/icon/public';
|
|
155
153
|
export { Icon } from './features/icon/public';
|
|
156
154
|
export type { ImageFit, ImageProps, SurfaceImageSource } from './features/image/public';
|
|
@@ -184,14 +182,33 @@ export type {
|
|
|
184
182
|
ManifestSectionListProps,
|
|
185
183
|
} from './features/list/public';
|
|
186
184
|
export { FlatList, SectionList } from './features/list/public';
|
|
185
|
+
export { MissingElement, type MissingElementProps } from './features/missing-element/public';
|
|
187
186
|
export {
|
|
188
187
|
Progress,
|
|
189
188
|
type ProgressProps,
|
|
190
189
|
ProgressRing,
|
|
191
190
|
type ProgressRingProps,
|
|
192
191
|
} from './features/progress/public';
|
|
192
|
+
export {
|
|
193
|
+
Skeleton,
|
|
194
|
+
SkeletonCard,
|
|
195
|
+
type SkeletonCardProps,
|
|
196
|
+
type SkeletonDimension,
|
|
197
|
+
SkeletonList,
|
|
198
|
+
type SkeletonListProps,
|
|
199
|
+
type SkeletonListVariant,
|
|
200
|
+
type SkeletonProps,
|
|
201
|
+
type SkeletonRadius,
|
|
202
|
+
SkeletonText,
|
|
203
|
+
type SkeletonTextProps,
|
|
204
|
+
} from './features/skeleton/public';
|
|
193
205
|
export type { SurfaceProps, SurfaceVariant } from './features/surface/public';
|
|
194
206
|
export { Surface } from './features/surface/public';
|
|
207
|
+
export {
|
|
208
|
+
TimePicker,
|
|
209
|
+
type TimePickerProps,
|
|
210
|
+
type TimePickerValue,
|
|
211
|
+
} from './features/time-picker/public';
|
|
195
212
|
export type {
|
|
196
213
|
HeadingAlign,
|
|
197
214
|
HeadingColor,
|
|
@@ -321,8 +338,6 @@ export type { DisclosureSectionProps } from './patterns/disclosure-section';
|
|
|
321
338
|
export { DisclosureSection } from './patterns/disclosure-section';
|
|
322
339
|
export type { FilterBarProps } from './patterns/filter-bar';
|
|
323
340
|
export { FilterBar } from './patterns/filter-bar';
|
|
324
|
-
export type { HeroAction, HeroAlign, HeroLayout, HeroProps, HeroTone } from './patterns/hero';
|
|
325
|
-
export { Hero } from './patterns/hero';
|
|
326
341
|
export type { InspectorFieldProps } from './patterns/inspector-field';
|
|
327
342
|
export { InspectorField } from './patterns/inspector-field';
|
|
328
343
|
export type {
|
|
@@ -341,8 +356,6 @@ export type {
|
|
|
341
356
|
MessageBubbleStatus,
|
|
342
357
|
} from './patterns/message-bubble';
|
|
343
358
|
export { MessageBubble } from './patterns/message-bubble';
|
|
344
|
-
export type { MissingElementProps } from './patterns/missing-element';
|
|
345
|
-
export { MissingElement } from './patterns/missing-element';
|
|
346
359
|
export type { NoticeProps } from './patterns/notice';
|
|
347
360
|
export { Notice } from './patterns/notice';
|
|
348
361
|
export type { PanelProps } from './patterns/panel';
|
|
@@ -40,7 +40,7 @@ describe('InteractionPolicy declaration', () => {
|
|
|
40
40
|
readComponent('app-bar', 'types.ts'),
|
|
41
41
|
readComponent('breadcrumbs', 'types.ts'),
|
|
42
42
|
readSource('types/empty-state.ts'),
|
|
43
|
-
|
|
43
|
+
readSource('types/hero.ts'),
|
|
44
44
|
readSource('types/product-card.ts'),
|
|
45
45
|
readPattern('reader', 'types.ts'),
|
|
46
46
|
readPattern('scanner', 'types.ts'),
|
|
@@ -115,14 +115,14 @@ describe('EmptyState', () => {
|
|
|
115
115
|
|
|
116
116
|
describe('Hero', () => {
|
|
117
117
|
test('forwards interactionPolicy to Card', () => {
|
|
118
|
-
const source =
|
|
118
|
+
const source = readSource('features/hero/adapters/inbound/Hero.tsx');
|
|
119
119
|
|
|
120
120
|
expect(source).not.toMatch(/interactionPolicy:\s*_interactionPolicy/);
|
|
121
121
|
expect(source).toMatch(/<Card[\s\S]*?interactionPolicy=\{interactionPolicy\}/);
|
|
122
122
|
});
|
|
123
123
|
|
|
124
124
|
test('passes interactionPolicy through renderAction to internal Buttons', () => {
|
|
125
|
-
const source =
|
|
125
|
+
const source = readSource('features/hero/adapters/inbound/Hero.tsx');
|
|
126
126
|
|
|
127
127
|
expect(source).toMatch(
|
|
128
128
|
/function renderAction\([\s\S]*?interactionPolicy: HeroProps\['interactionPolicy'\]/,
|
|
@@ -9,6 +9,11 @@ export const CONTAINER_ALLOWED_CHILDREN = [
|
|
|
9
9
|
'Chip',
|
|
10
10
|
'ChipGroup',
|
|
11
11
|
'DataTable',
|
|
12
|
+
'DatePicker',
|
|
13
|
+
'Skeleton',
|
|
14
|
+
'SkeletonCard',
|
|
15
|
+
'SkeletonList',
|
|
16
|
+
'SkeletonText',
|
|
12
17
|
'IconButton',
|
|
13
18
|
'Uploader',
|
|
14
19
|
'FlatList',
|
|
@@ -24,13 +29,15 @@ export const CONTAINER_ALLOWED_CHILDREN = [
|
|
|
24
29
|
'Heading',
|
|
25
30
|
'Icon',
|
|
26
31
|
'Image',
|
|
32
|
+
'Hero',
|
|
27
33
|
'KeyboardAvoidingView',
|
|
28
34
|
'Button',
|
|
29
35
|
'ButtonGroup',
|
|
30
36
|
'RadioGroup',
|
|
31
37
|
'ThemeModeToggle',
|
|
32
38
|
'TextInput',
|
|
33
|
-
'
|
|
39
|
+
'TimePicker',
|
|
40
|
+
'Form',
|
|
34
41
|
'Card',
|
|
35
42
|
'Panel',
|
|
36
43
|
'Notice',
|
|
@@ -51,7 +51,7 @@ describe('ZORA_COMPONENT_META event metadata', () => {
|
|
|
51
51
|
const eventType: ZoraComponentEventPayloadKind = event?.eventType ?? 'form.submit';
|
|
52
52
|
|
|
53
53
|
expect(eventType).toBe('form.submit');
|
|
54
|
-
expect(event?.payloadFields
|
|
54
|
+
expect(event?.payloadFields).toEqual([]);
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
test('declares button event metadata', () => {
|
|
@@ -100,6 +100,21 @@ describe('ZORA_COMPONENT_META requirement metadata', () => {
|
|
|
100
100
|
});
|
|
101
101
|
|
|
102
102
|
describe('ZORA_COMPONENT_META invariants', () => {
|
|
103
|
+
test('keeps form nodes in their canonical hierarchy', () => {
|
|
104
|
+
expect(ZORA_COMPONENT_META.Form.allowedChildren).toEqual(['FormError', 'FormField']);
|
|
105
|
+
expect(ZORA_COMPONENT_META.FormField.allowedChildren).toEqual([
|
|
106
|
+
'Checkbox',
|
|
107
|
+
'CheckboxGroup',
|
|
108
|
+
'RadioGroup',
|
|
109
|
+
'TextInput',
|
|
110
|
+
]);
|
|
111
|
+
for (const [name, meta] of Object.entries(ZORA_COMPONENT_META)) {
|
|
112
|
+
if (name === 'Form') continue;
|
|
113
|
+
expect(meta.allowedChildren).not.toContain('FormError');
|
|
114
|
+
expect(meta.allowedChildren).not.toContain('FormField');
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
|
|
103
118
|
test('every key matches meta.name', () => {
|
|
104
119
|
for (const [key, meta] of Object.entries(ZORA_COMPONENT_META)) {
|
|
105
120
|
expect(meta.name).toBe(key);
|
|
@@ -128,6 +143,11 @@ describe('ZORA_COMPONENT_META invariants', () => {
|
|
|
128
143
|
'Chip',
|
|
129
144
|
'ChipGroup',
|
|
130
145
|
'DataTable',
|
|
146
|
+
'DatePicker',
|
|
147
|
+
'Skeleton',
|
|
148
|
+
'SkeletonCard',
|
|
149
|
+
'SkeletonList',
|
|
150
|
+
'SkeletonText',
|
|
131
151
|
'IconButton',
|
|
132
152
|
'MetricCard',
|
|
133
153
|
'Uploader',
|
|
@@ -136,6 +156,7 @@ describe('ZORA_COMPONENT_META invariants', () => {
|
|
|
136
156
|
'EmptyState',
|
|
137
157
|
'Hero',
|
|
138
158
|
'Button',
|
|
159
|
+
'FormError',
|
|
139
160
|
'Checkbox',
|
|
140
161
|
'CheckboxGroup',
|
|
141
162
|
'Radio',
|
|
@@ -155,9 +176,11 @@ describe('ZORA_COMPONENT_META invariants', () => {
|
|
|
155
176
|
'ProgressRing',
|
|
156
177
|
'ReaderSurface',
|
|
157
178
|
'MissingElement',
|
|
179
|
+
'TimePicker',
|
|
158
180
|
]);
|
|
159
181
|
|
|
160
182
|
const expectedContainerNodes = new Set([
|
|
183
|
+
'Form',
|
|
161
184
|
'Surface',
|
|
162
185
|
'MediaCard',
|
|
163
186
|
'FlatList',
|