@ankhorage/zora 10.0.0 → 11.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 +10 -0
- package/README.md +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -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/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/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/features/surface/surfaceMeta.d.ts +1 -1
- 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 +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- 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 +1 -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 +4 -1
- 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 +1 -1
- package/dist/registry.js.map +1 -1
- 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/package.json +2 -1
- package/src/audit.test.ts +2 -4
- package/src/constants.ts +1 -0
- package/src/featureManifest.test.ts +7 -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/features/form/formActionsMeta.ts +9 -0
- 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/features/uploader/adapters/inbound/Uploader.tsx +1 -1
- package/src/index.ts +26 -27
- package/src/metadata/allowedChildren.ts +1 -1
- package/src/metadata/componentMeta.test.ts +18 -1
- package/src/metadata/componentMeta.ts +4 -1
- 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 +1 -1
- package/src/theme/themeScopeStructure.test.ts +5 -7
- package/src/{components/form/types.ts → types/form.ts} +12 -36
- 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/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/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/patterns/form-field/index.ts +0 -1
- package/src/patterns/form-field/types.ts +0 -16
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const CONTAINER_ALLOWED_CHILDREN: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "
|
|
1
|
+
export declare const CONTAINER_ALLOWED_CHILDREN: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
2
2
|
export declare const CONTENT_RAIL_ALLOWED_CHILDREN: readonly ["Chip", "ChipGroup", "MediaCard", "MetricCard", "Avatar", "AvatarGroup", "Badge", "Button", "IconButton", "Box", "Stack", "Card", "Panel", "Image", "ProductCard", "PostCard", "ChatListItem", "MessageBubble", "MissingElement"];
|
|
3
|
-
export declare const SCREEN_SECTION_ALLOWED_CHILDREN: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "
|
|
4
|
-
export declare const SCREEN_ALLOWED_CHILDREN: readonly ["ScreenSection", "ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "
|
|
3
|
+
export declare const SCREEN_SECTION_ALLOWED_CHILDREN: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
4
|
+
export declare const SCREEN_ALLOWED_CHILDREN: readonly ["ScreenSection", "ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
5
5
|
//# sourceMappingURL=allowedChildren.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allowedChildren.d.ts","sourceRoot":"","sources":["../../src/metadata/allowedChildren.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"allowedChildren.d.ts","sourceRoot":"","sources":["../../src/metadata/allowedChildren.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,glBA8C7B,CAAC;AAEX,eAAO,MAAM,6BAA6B,6OAoBhC,CAAC;AAEX,eAAO,MAAM,+BAA+B,glBAA2C,CAAC;AAExF,eAAO,MAAM,uBAAuB,imBAA4D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allowedChildren.js","sourceRoot":"","sources":["../../src/metadata/allowedChildren.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,mBAAmB;IACnB,SAAS;IACT,QAAQ;IACR,aAAa;IACb,OAAO;IACP,WAAW;IACX,YAAY;IACZ,MAAM;IACN,WAAW;IACX,WAAW;IACX,YAAY;IACZ,UAAU;IACV,UAAU;IACV,aAAa;IACb,aAAa;IACb,aAAa;IACb,KAAK;IACL,OAAO;IACP,MAAM;IACN,WAAW;IACX,SAAS;IACT,MAAM;IACN,SAAS;IACT,MAAM;IACN,OAAO;IACP,sBAAsB;IACtB,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,iBAAiB;IACjB,WAAW;IACX,
|
|
1
|
+
{"version":3,"file":"allowedChildren.js","sourceRoot":"","sources":["../../src/metadata/allowedChildren.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,mBAAmB;IACnB,SAAS;IACT,QAAQ;IACR,aAAa;IACb,OAAO;IACP,WAAW;IACX,YAAY;IACZ,MAAM;IACN,WAAW;IACX,WAAW;IACX,YAAY;IACZ,UAAU;IACV,UAAU;IACV,aAAa;IACb,aAAa;IACb,aAAa;IACb,KAAK;IACL,OAAO;IACP,MAAM;IACN,WAAW;IACX,SAAS;IACT,MAAM;IACN,SAAS;IACT,MAAM;IACN,OAAO;IACP,sBAAsB;IACtB,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,iBAAiB;IACjB,WAAW;IACX,MAAM;IACN,MAAM;IACN,OAAO;IACP,QAAQ;IACR,YAAY;IACZ,eAAe;IACf,aAAa;IACb,UAAU;IACV,cAAc;IACd,eAAe;IACf,cAAc;IACd,eAAe;IACf,aAAa;IACb,gBAAgB;CACR,CAAC;AAEX,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,MAAM;IACN,WAAW;IACX,WAAW;IACX,YAAY;IACZ,QAAQ;IACR,aAAa;IACb,OAAO;IACP,QAAQ;IACR,YAAY;IACZ,KAAK;IACL,OAAO;IACP,MAAM;IACN,OAAO;IACP,OAAO;IACP,aAAa;IACb,UAAU;IACV,cAAc;IACd,eAAe;IACf,gBAAgB;CACR,CAAC;AAEX,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,GAAG,0BAA0B,CAAU,CAAC;AAExF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,eAAe,EAAE,GAAG,0BAA0B,CAAU,CAAC","sourcesContent":["export const CONTAINER_ALLOWED_CHILDREN = [\n 'ActivityIndicator',\n 'Surface',\n 'Avatar',\n 'AvatarGroup',\n 'Badge',\n 'MediaCard',\n 'MetricCard',\n 'Chip',\n 'ChipGroup',\n 'DataTable',\n 'IconButton',\n 'Uploader',\n 'FlatList',\n 'SectionList',\n 'BottomSheet',\n 'ProductCard',\n 'Box',\n 'Stack',\n 'Grid',\n 'Container',\n 'Divider',\n 'Text',\n 'Heading',\n 'Icon',\n 'Image',\n 'KeyboardAvoidingView',\n 'Button',\n 'ButtonGroup',\n 'RadioGroup',\n 'ThemeModeToggle',\n 'TextInput',\n 'Form',\n 'Card',\n 'Panel',\n 'Notice',\n 'EmptyState',\n 'SectionHeader',\n 'SettingsRow',\n 'PostCard',\n 'ChatListItem',\n 'MessageBubble',\n 'ProgressRing',\n 'ReaderSurface',\n 'ContentRail',\n 'MissingElement',\n] as const;\n\nexport const CONTENT_RAIL_ALLOWED_CHILDREN = [\n 'Chip',\n 'ChipGroup',\n 'MediaCard',\n 'MetricCard',\n 'Avatar',\n 'AvatarGroup',\n 'Badge',\n 'Button',\n 'IconButton',\n 'Box',\n 'Stack',\n 'Card',\n 'Panel',\n 'Image',\n 'ProductCard',\n 'PostCard',\n 'ChatListItem',\n 'MessageBubble',\n 'MissingElement',\n] as const;\n\nexport const SCREEN_SECTION_ALLOWED_CHILDREN = [...CONTAINER_ALLOWED_CHILDREN] as const;\n\nexport const SCREEN_ALLOWED_CHILDREN = ['ScreenSection', ...CONTAINER_ALLOWED_CHILDREN] as const;\n"]}
|
|
@@ -807,11 +807,11 @@ export declare const ZORA_BINDABLE_COMPONENT_META: {
|
|
|
807
807
|
};
|
|
808
808
|
readonly headerActions: {
|
|
809
809
|
readonly label: "Header actions";
|
|
810
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "
|
|
810
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
811
811
|
};
|
|
812
812
|
readonly footerActions: {
|
|
813
813
|
readonly label: "Footer actions";
|
|
814
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "
|
|
814
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
815
815
|
};
|
|
816
816
|
};
|
|
817
817
|
readonly props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"componentMeta.d.ts","sourceRoot":"","sources":["../../src/metadata/componentMeta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"componentMeta.d.ts","sourceRoot":"","sources":["../../src/metadata/componentMeta.ts"],"names":[],"mappings":"AAuGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEzD,eAAO,MAAM,mBAAmB,EAAE,yBA4GhC,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { appBarMeta } from '../components/app-bar/meta';
|
|
2
2
|
import { breadcrumbsMeta } from '../components/breadcrumbs/meta';
|
|
3
3
|
import { datePickerMeta } from '../components/date-picker/meta';
|
|
4
|
-
import { formActionsMeta, formErrorMeta, formFieldMeta, formMeta } from '../components/form/meta';
|
|
5
4
|
import { gradientMeta } from '../components/gradient/meta';
|
|
6
5
|
import { dropdownMenuMeta, menuMeta } from '../components/menu/meta';
|
|
7
6
|
import { modalMeta } from '../components/modal/meta';
|
|
@@ -32,6 +31,10 @@ import { chipMeta } from '../features/chip/chipMeta';
|
|
|
32
31
|
import { dataTableMeta } from '../features/data-table/dataTableMeta';
|
|
33
32
|
import { emptyStateMeta } from '../features/empty-state/emptyStateMeta';
|
|
34
33
|
import { checkboxGroupMeta, checkboxMeta } from '../features/form/checkbox/checkboxMeta';
|
|
34
|
+
import { formActionsMeta } from '../features/form/formActionsMeta';
|
|
35
|
+
import { formErrorMeta } from '../features/form/formErrorMeta';
|
|
36
|
+
import { formFieldMeta } from '../features/form/formFieldMeta';
|
|
37
|
+
import { formMeta } from '../features/form/formMeta';
|
|
35
38
|
import { radioGroupMeta, radioMeta } from '../features/form/radio/radioMeta';
|
|
36
39
|
import { textInputMeta } from '../features/form/text-input/textInputMeta';
|
|
37
40
|
import { iconMeta } from '../features/icon/iconMeta';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"componentMeta.js","sourceRoot":"","sources":["../../src/metadata/componentMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAClG,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACrE,O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AAU,EAAE,cAAc;IAC1B,UAAU,EAAE,cAAc;IAC1B,YAAY,EAAE,gBAAgB;IAC9B,gBAAgB,EAAE,oBAAoB;IACtC,aAAa,EAAE,iBAAiB;IAChC,WAAW,EAAE,eAAe;IAC5B,iBAAiB,EAAE,qBAAqB;IACxC,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,aAAa;IACxB,IAAI,EAAE,QAAQ;IACd,cAAc,EAAE,kBAAkB;IAClC,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,WAAW;IACpB,WAAW,EAAE,eAAe;IAC5B,aAAa,EAAE,iBAAiB;IAChC,cAAc,EAAE,kBAAkB;IAClC,MAAM,EAAE,UAAU;IAClB,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,eAAe;IAC5B,aAAa,EAAE,iBAAiB;IAChC,kBAAkB,EAAE,sBAAsB;IAC1C,oBAAoB,EAAE,wBAAwB;IAC9C,WAAW,EAAE,eAAe;IAC5B,aAAa,EAAE,iBAAiB;IAChC,cAAc,EAAE,kBAAkB;IAClC,iBAAiB,EAAE,qBAAqB;IACxC,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,eAAe;IAC5B,aAAa,EAAE,iBAAiB;IAChC,WAAW,EAAE,eAAe;IAC5B,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,YAAY;CACvB,CAAC,CAAC","sourcesContent":["import { appBarMeta } from '../components/app-bar/meta';\nimport { breadcrumbsMeta } from '../components/breadcrumbs/meta';\nimport { datePickerMeta } from '../components/date-picker/meta';\nimport { formActionsMeta, formErrorMeta, formFieldMeta, formMeta } from '../components/form/meta';\nimport { gradientMeta } from '../components/gradient/meta';\nimport { dropdownMenuMeta, menuMeta } from '../components/menu/meta';\nimport { modalMeta } from '../components/modal/meta';\nimport { paginationMeta } from '../components/pagination/meta';\nimport { ratingMeta } from '../components/rating/meta';\nimport { searchBarMeta } from '../components/search-bar/meta';\nimport { selectMeta } from '../components/select/meta';\nimport {\n skeletonCardMeta,\n skeletonListMeta,\n skeletonMeta,\n skeletonTextMeta,\n} from '../components/skeleton/meta';\nimport { tabsMeta } from '../components/tabs/meta';\nimport { timePickerMeta } from '../components/time-picker/meta';\nimport { toastMeta, toastProviderMeta } from '../components/toast/meta';\nimport { toolbarActionMeta, toolbarMeta } from '../components/toolbar/meta';\nimport { activityIndicatorMeta } from '../features/activity-indicator/activityIndicatorMeta';\nimport { avatarGroupMeta } from '../features/avatar/avatarGroupMeta';\nimport { avatarMeta } from '../features/avatar/avatarMeta';\nimport { badgeMeta } from '../features/badge/badgeMeta';\nimport { bottomSheetMeta } from '../features/bottom-sheet/bottomSheetMeta';\nimport { buttonGroupMeta } from '../features/button/buttonGroupMeta';\nimport { buttonMeta } from '../features/button/buttonMeta';\nimport { iconButtonMeta } from '../features/button/iconButtonMeta';\nimport { cardMeta } from '../features/card/cardMeta';\nimport { mediaCardMeta } from '../features/card/mediaCardMeta';\nimport { metricCardMeta } from '../features/card/metricCardMeta';\nimport { postCardMeta } from '../features/card/postCardMeta';\nimport { productCardMeta } from '../features/card/productCardMeta';\nimport { chipGroupMeta } from '../features/chip/chipGroupMeta';\nimport { chipMeta } from '../features/chip/chipMeta';\nimport { dataTableMeta } from '../features/data-table/dataTableMeta';\nimport { emptyStateMeta } from '../features/empty-state/emptyStateMeta';\nimport { checkboxGroupMeta, checkboxMeta } from '../features/form/checkbox/checkboxMeta';\nimport { radioGroupMeta, radioMeta } from '../features/form/radio/radioMeta';\nimport { textInputMeta } from '../features/form/text-input/textInputMeta';\nimport { iconMeta } from '../features/icon/iconMeta';\nimport { imageMeta } from '../features/image/imageMeta';\nimport { keyboardAvoidingViewMeta } from '../features/keyboard-avoiding-view/keyboardAvoidingViewMeta';\nimport { boxMeta } from '../features/layout/boxMeta';\nimport { containerMeta } from '../features/layout/containerMeta';\nimport { contentRailMeta } from '../features/layout/contentRailMeta';\nimport { dividerMeta } from '../features/layout/dividerMeta';\nimport { gridMeta } from '../features/layout/gridMeta';\nimport { stackMeta } from '../features/layout/stackMeta';\nimport { flatListMeta } from '../features/list/flatListMeta';\nimport { sectionListMeta } from '../features/list/sectionListMeta';\nimport { progressMeta, progressRingMeta } from '../features/progress/progressMeta';\nimport { surfaceMeta } from '../features/surface/surfaceMeta';\nimport { headingMeta } from '../features/typography/headingMeta';\nimport { textMeta } from '../features/typography/textMeta';\nimport { uploaderMeta } from '../features/uploader/uploaderMeta';\nimport { foundationMetas } from '../foundation/meta';\nimport { appShellMeta } from '../layout/app-shell/meta';\nimport { screenMeta } from '../layout/screen/meta';\nimport { screenSectionMeta } from '../layout/screen-section/meta';\nimport { settingsLayoutMeta } from '../layout/settings-layout/meta';\nimport { sidebarLayoutMeta } from '../layout/sidebar-layout/meta';\nimport { topbarLayoutMeta } from '../layout/topbar-layout/meta';\nimport {\n forgotPasswordFormMeta,\n oauthProviderButtonMeta,\n oauthProviderListMeta,\n otpFormMeta,\n signInFormMeta,\n signUpFormMeta,\n} from '../patterns/auth/meta';\nimport { chatListItemMeta } from '../patterns/chat-list-item/meta';\nimport { collectionEditorMeta } from '../patterns/collection-editor/meta';\nimport { confirmDialogMeta } from '../patterns/confirm-dialog/meta';\nimport { disclosureSectionMeta } from '../patterns/disclosure-section/meta';\nimport { filterBarMeta } from '../patterns/filter-bar/meta';\nimport { heroMeta } from '../patterns/hero/meta';\nimport { inspectorFieldMeta } from '../patterns/inspector-field/meta';\nimport { listMeta, listRowMeta, listSectionMeta } from '../patterns/list/meta';\nimport { messageBubbleMeta } from '../patterns/message-bubble/meta';\nimport { missingElementMeta } from '../patterns/missing-element/meta';\nimport { noticeMeta } from '../patterns/notice/meta';\nimport { panelMeta } from '../patterns/panel/meta';\nimport { readerSurfaceMeta } from '../patterns/reader/meta';\nimport {\n barcodeScannerViewMeta,\n cameraPermissionViewMeta,\n scanOverlayMeta,\n} from '../patterns/scanner/meta';\nimport { sectionHeaderMeta } from '../patterns/section-header/meta';\nimport { selectableItemMeta, selectionProviderMeta } from '../patterns/selection/meta';\nimport { settingsRowMeta } from '../patterns/settings-row/meta';\nimport { switchFieldMeta } from '../patterns/switch-field/meta';\nimport { themeComposerMeta } from '../patterns/theme-composer/meta';\nimport { paletteItemMeta, tileGridMeta } from '../patterns/tile-grid/meta';\nimport { timelineMeta } from '../patterns/timeline/meta';\nimport { treeItemMeta, treeViewMeta } from '../patterns/tree-view/meta';\nimport { themeModeToggleMeta } from '../theme/ThemeModeToggle.meta';\nimport { finalizeFeatureMetadata } from '../utils/finalizeFeatureMetadata';\nimport type { ZoraComponentMetaRegistry } from './types';\n\nexport const ZORA_COMPONENT_META: ZoraComponentMetaRegistry = finalizeFeatureMetadata({\n ...foundationMetas,\n ActivityIndicator: activityIndicatorMeta,\n Box: boxMeta,\n Container: containerMeta,\n Stack: stackMeta,\n Grid: gridMeta,\n Divider: dividerMeta,\n Surface: surfaceMeta,\n AppBar: appBarMeta,\n Avatar: avatarMeta,\n AvatarGroup: avatarGroupMeta,\n Badge: badgeMeta,\n Breadcrumbs: breadcrumbsMeta,\n Button: buttonMeta,\n ButtonGroup: buttonGroupMeta,\n Card: cardMeta,\n Checkbox: checkboxMeta,\n CheckboxGroup: checkboxGroupMeta,\n Chip: chipMeta,\n ChipGroup: chipGroupMeta,\n DataTable: dataTableMeta,\n DatePicker: datePickerMeta,\n DropdownMenu: dropdownMenuMeta,\n Form: formMeta,\n FormActions: formActionsMeta,\n FormError: formErrorMeta,\n FormField: formFieldMeta,\n Gradient: gradientMeta,\n Heading: headingMeta,\n Icon: iconMeta,\n IconButton: iconButtonMeta,\n Image: imageMeta,\n KeyboardAvoidingView: keyboardAvoidingViewMeta,\n TextInput: textInputMeta,\n MediaCard: mediaCardMeta,\n Menu: menuMeta,\n MetricCard: metricCardMeta,\n Modal: modalMeta,\n Pagination: paginationMeta,\n Progress: progressMeta,\n ProgressRing: progressRingMeta,\n Radio: radioMeta,\n RadioGroup: radioGroupMeta,\n Rating: ratingMeta,\n SearchBar: searchBarMeta,\n Select: selectMeta,\n Skeleton: skeletonMeta,\n SkeletonCard: skeletonCardMeta,\n SkeletonList: skeletonListMeta,\n SkeletonText: skeletonTextMeta,\n Tabs: tabsMeta,\n Text: textMeta,\n TimePicker: timePickerMeta,\n Toast: toastMeta,\n ToastProvider: toastProviderMeta,\n Toolbar: toolbarMeta,\n ToolbarAction: toolbarActionMeta,\n Uploader: uploaderMeta,\n BottomSheet: bottomSheetMeta,\n FlatList: flatListMeta,\n SectionList: sectionListMeta,\n ThemeModeToggle: themeModeToggleMeta,\n AppShell: appShellMeta,\n Screen: screenMeta,\n ScreenSection: screenSectionMeta,\n SettingsLayout: settingsLayoutMeta,\n SidebarLayout: sidebarLayoutMeta,\n TopbarLayout: topbarLayoutMeta,\n ForgotPasswordForm: forgotPasswordFormMeta,\n OAuthProviderButton: oauthProviderButtonMeta,\n OAuthProviderList: oauthProviderListMeta,\n OtpForm: otpFormMeta,\n SignInForm: signInFormMeta,\n SignUpForm: signUpFormMeta,\n ChatListItem: chatListItemMeta,\n CollectionEditor: collectionEditorMeta,\n ConfirmDialog: confirmDialogMeta,\n ContentRail: contentRailMeta,\n DisclosureSection: disclosureSectionMeta,\n EmptyState: emptyStateMeta,\n FilterBar: filterBarMeta,\n Hero: heroMeta,\n InspectorField: inspectorFieldMeta,\n List: listMeta,\n ListRow: listRowMeta,\n ListSection: listSectionMeta,\n MessageBubble: messageBubbleMeta,\n MissingElement: missingElementMeta,\n Notice: noticeMeta,\n Panel: panelMeta,\n PostCard: postCardMeta,\n ProductCard: productCardMeta,\n ReaderSurface: readerSurfaceMeta,\n BarcodeScannerView: barcodeScannerViewMeta,\n CameraPermissionView: cameraPermissionViewMeta,\n ScanOverlay: scanOverlayMeta,\n SectionHeader: sectionHeaderMeta,\n SelectableItem: selectableItemMeta,\n SelectionProvider: selectionProviderMeta,\n SettingsRow: settingsRowMeta,\n SwitchField: switchFieldMeta,\n ThemeComposer: themeComposerMeta,\n PaletteItem: paletteItemMeta,\n TileGrid: tileGridMeta,\n Timeline: timelineMeta,\n TreeItem: treeItemMeta,\n TreeView: treeViewMeta,\n});\n"]}
|
|
1
|
+
{"version":3,"file":"componentMeta.js","sourceRoot":"","sources":["../../src/metadata/componentMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAC7F,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,SA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,EAAE,sBAAsB;IAC1C,oBAAoB,EAAE,wBAAwB;IAC9C,WAAW,EAAE,eAAe;IAC5B,aAAa,EAAE,iBAAiB;IAChC,cAAc,EAAE,kBAAkB;IAClC,iBAAiB,EAAE,qBAAqB;IACxC,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,eAAe;IAC5B,aAAa,EAAE,iBAAiB;IAChC,WAAW,EAAE,eAAe;IAC5B,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,YAAY;CACvB,CAAC,CAAC","sourcesContent":["import { appBarMeta } from '../components/app-bar/meta';\nimport { breadcrumbsMeta } from '../components/breadcrumbs/meta';\nimport { datePickerMeta } from '../components/date-picker/meta';\nimport { gradientMeta } from '../components/gradient/meta';\nimport { dropdownMenuMeta, menuMeta } from '../components/menu/meta';\nimport { modalMeta } from '../components/modal/meta';\nimport { paginationMeta } from '../components/pagination/meta';\nimport { ratingMeta } from '../components/rating/meta';\nimport { searchBarMeta } from '../components/search-bar/meta';\nimport { selectMeta } from '../components/select/meta';\nimport {\n skeletonCardMeta,\n skeletonListMeta,\n skeletonMeta,\n skeletonTextMeta,\n} from '../components/skeleton/meta';\nimport { tabsMeta } from '../components/tabs/meta';\nimport { timePickerMeta } from '../components/time-picker/meta';\nimport { toastMeta, toastProviderMeta } from '../components/toast/meta';\nimport { toolbarActionMeta, toolbarMeta } from '../components/toolbar/meta';\nimport { activityIndicatorMeta } from '../features/activity-indicator/activityIndicatorMeta';\nimport { avatarGroupMeta } from '../features/avatar/avatarGroupMeta';\nimport { avatarMeta } from '../features/avatar/avatarMeta';\nimport { badgeMeta } from '../features/badge/badgeMeta';\nimport { bottomSheetMeta } from '../features/bottom-sheet/bottomSheetMeta';\nimport { buttonGroupMeta } from '../features/button/buttonGroupMeta';\nimport { buttonMeta } from '../features/button/buttonMeta';\nimport { iconButtonMeta } from '../features/button/iconButtonMeta';\nimport { cardMeta } from '../features/card/cardMeta';\nimport { mediaCardMeta } from '../features/card/mediaCardMeta';\nimport { metricCardMeta } from '../features/card/metricCardMeta';\nimport { postCardMeta } from '../features/card/postCardMeta';\nimport { productCardMeta } from '../features/card/productCardMeta';\nimport { chipGroupMeta } from '../features/chip/chipGroupMeta';\nimport { chipMeta } from '../features/chip/chipMeta';\nimport { dataTableMeta } from '../features/data-table/dataTableMeta';\nimport { emptyStateMeta } from '../features/empty-state/emptyStateMeta';\nimport { checkboxGroupMeta, checkboxMeta } from '../features/form/checkbox/checkboxMeta';\nimport { formActionsMeta } from '../features/form/formActionsMeta';\nimport { formErrorMeta } from '../features/form/formErrorMeta';\nimport { formFieldMeta } from '../features/form/formFieldMeta';\nimport { formMeta } from '../features/form/formMeta';\nimport { radioGroupMeta, radioMeta } from '../features/form/radio/radioMeta';\nimport { textInputMeta } from '../features/form/text-input/textInputMeta';\nimport { iconMeta } from '../features/icon/iconMeta';\nimport { imageMeta } from '../features/image/imageMeta';\nimport { keyboardAvoidingViewMeta } from '../features/keyboard-avoiding-view/keyboardAvoidingViewMeta';\nimport { boxMeta } from '../features/layout/boxMeta';\nimport { containerMeta } from '../features/layout/containerMeta';\nimport { contentRailMeta } from '../features/layout/contentRailMeta';\nimport { dividerMeta } from '../features/layout/dividerMeta';\nimport { gridMeta } from '../features/layout/gridMeta';\nimport { stackMeta } from '../features/layout/stackMeta';\nimport { flatListMeta } from '../features/list/flatListMeta';\nimport { sectionListMeta } from '../features/list/sectionListMeta';\nimport { progressMeta, progressRingMeta } from '../features/progress/progressMeta';\nimport { surfaceMeta } from '../features/surface/surfaceMeta';\nimport { headingMeta } from '../features/typography/headingMeta';\nimport { textMeta } from '../features/typography/textMeta';\nimport { uploaderMeta } from '../features/uploader/uploaderMeta';\nimport { foundationMetas } from '../foundation/meta';\nimport { appShellMeta } from '../layout/app-shell/meta';\nimport { screenMeta } from '../layout/screen/meta';\nimport { screenSectionMeta } from '../layout/screen-section/meta';\nimport { settingsLayoutMeta } from '../layout/settings-layout/meta';\nimport { sidebarLayoutMeta } from '../layout/sidebar-layout/meta';\nimport { topbarLayoutMeta } from '../layout/topbar-layout/meta';\nimport {\n forgotPasswordFormMeta,\n oauthProviderButtonMeta,\n oauthProviderListMeta,\n otpFormMeta,\n signInFormMeta,\n signUpFormMeta,\n} from '../patterns/auth/meta';\nimport { chatListItemMeta } from '../patterns/chat-list-item/meta';\nimport { collectionEditorMeta } from '../patterns/collection-editor/meta';\nimport { confirmDialogMeta } from '../patterns/confirm-dialog/meta';\nimport { disclosureSectionMeta } from '../patterns/disclosure-section/meta';\nimport { filterBarMeta } from '../patterns/filter-bar/meta';\nimport { heroMeta } from '../patterns/hero/meta';\nimport { inspectorFieldMeta } from '../patterns/inspector-field/meta';\nimport { listMeta, listRowMeta, listSectionMeta } from '../patterns/list/meta';\nimport { messageBubbleMeta } from '../patterns/message-bubble/meta';\nimport { missingElementMeta } from '../patterns/missing-element/meta';\nimport { noticeMeta } from '../patterns/notice/meta';\nimport { panelMeta } from '../patterns/panel/meta';\nimport { readerSurfaceMeta } from '../patterns/reader/meta';\nimport {\n barcodeScannerViewMeta,\n cameraPermissionViewMeta,\n scanOverlayMeta,\n} from '../patterns/scanner/meta';\nimport { sectionHeaderMeta } from '../patterns/section-header/meta';\nimport { selectableItemMeta, selectionProviderMeta } from '../patterns/selection/meta';\nimport { settingsRowMeta } from '../patterns/settings-row/meta';\nimport { switchFieldMeta } from '../patterns/switch-field/meta';\nimport { themeComposerMeta } from '../patterns/theme-composer/meta';\nimport { paletteItemMeta, tileGridMeta } from '../patterns/tile-grid/meta';\nimport { timelineMeta } from '../patterns/timeline/meta';\nimport { treeItemMeta, treeViewMeta } from '../patterns/tree-view/meta';\nimport { themeModeToggleMeta } from '../theme/ThemeModeToggle.meta';\nimport { finalizeFeatureMetadata } from '../utils/finalizeFeatureMetadata';\nimport type { ZoraComponentMetaRegistry } from './types';\n\nexport const ZORA_COMPONENT_META: ZoraComponentMetaRegistry = finalizeFeatureMetadata({\n ...foundationMetas,\n ActivityIndicator: activityIndicatorMeta,\n Box: boxMeta,\n Container: containerMeta,\n Stack: stackMeta,\n Grid: gridMeta,\n Divider: dividerMeta,\n Surface: surfaceMeta,\n AppBar: appBarMeta,\n Avatar: avatarMeta,\n AvatarGroup: avatarGroupMeta,\n Badge: badgeMeta,\n Breadcrumbs: breadcrumbsMeta,\n Button: buttonMeta,\n ButtonGroup: buttonGroupMeta,\n Card: cardMeta,\n Checkbox: checkboxMeta,\n CheckboxGroup: checkboxGroupMeta,\n Chip: chipMeta,\n ChipGroup: chipGroupMeta,\n DataTable: dataTableMeta,\n DatePicker: datePickerMeta,\n DropdownMenu: dropdownMenuMeta,\n Form: formMeta,\n FormActions: formActionsMeta,\n FormError: formErrorMeta,\n FormField: formFieldMeta,\n Gradient: gradientMeta,\n Heading: headingMeta,\n Icon: iconMeta,\n IconButton: iconButtonMeta,\n Image: imageMeta,\n KeyboardAvoidingView: keyboardAvoidingViewMeta,\n TextInput: textInputMeta,\n MediaCard: mediaCardMeta,\n Menu: menuMeta,\n MetricCard: metricCardMeta,\n Modal: modalMeta,\n Pagination: paginationMeta,\n Progress: progressMeta,\n ProgressRing: progressRingMeta,\n Radio: radioMeta,\n RadioGroup: radioGroupMeta,\n Rating: ratingMeta,\n SearchBar: searchBarMeta,\n Select: selectMeta,\n Skeleton: skeletonMeta,\n SkeletonCard: skeletonCardMeta,\n SkeletonList: skeletonListMeta,\n SkeletonText: skeletonTextMeta,\n Tabs: tabsMeta,\n Text: textMeta,\n TimePicker: timePickerMeta,\n Toast: toastMeta,\n ToastProvider: toastProviderMeta,\n Toolbar: toolbarMeta,\n ToolbarAction: toolbarActionMeta,\n Uploader: uploaderMeta,\n BottomSheet: bottomSheetMeta,\n FlatList: flatListMeta,\n SectionList: sectionListMeta,\n ThemeModeToggle: themeModeToggleMeta,\n AppShell: appShellMeta,\n Screen: screenMeta,\n ScreenSection: screenSectionMeta,\n SettingsLayout: settingsLayoutMeta,\n SidebarLayout: sidebarLayoutMeta,\n TopbarLayout: topbarLayoutMeta,\n ForgotPasswordForm: forgotPasswordFormMeta,\n OAuthProviderButton: oauthProviderButtonMeta,\n OAuthProviderList: oauthProviderListMeta,\n OtpForm: otpFormMeta,\n SignInForm: signInFormMeta,\n SignUpForm: signUpFormMeta,\n ChatListItem: chatListItemMeta,\n CollectionEditor: collectionEditorMeta,\n ConfirmDialog: confirmDialogMeta,\n ContentRail: contentRailMeta,\n DisclosureSection: disclosureSectionMeta,\n EmptyState: emptyStateMeta,\n FilterBar: filterBarMeta,\n Hero: heroMeta,\n InspectorField: inspectorFieldMeta,\n List: listMeta,\n ListRow: listRowMeta,\n ListSection: listSectionMeta,\n MessageBubble: messageBubbleMeta,\n MissingElement: missingElementMeta,\n Notice: noticeMeta,\n Panel: panelMeta,\n PostCard: postCardMeta,\n ProductCard: productCardMeta,\n ReaderSurface: readerSurfaceMeta,\n BarcodeScannerView: barcodeScannerViewMeta,\n CameraPermissionView: cameraPermissionViewMeta,\n ScanOverlay: scanOverlayMeta,\n SectionHeader: sectionHeaderMeta,\n SelectableItem: selectableItemMeta,\n SelectionProvider: selectionProviderMeta,\n SettingsRow: settingsRowMeta,\n SwitchField: switchFieldMeta,\n ThemeComposer: themeComposerMeta,\n PaletteItem: paletteItemMeta,\n TileGrid: tileGridMeta,\n Timeline: timelineMeta,\n TreeItem: treeItemMeta,\n TreeView: treeViewMeta,\n});\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
3
|
+
import type { FormErrors, FormFieldConfig, FormValues } from '../../types/form';
|
|
4
|
+
interface AuthFormProps<TName extends string> {
|
|
5
|
+
fields: readonly FormFieldConfig<TName>[];
|
|
6
|
+
values: FormValues<TName>;
|
|
7
|
+
onChange: (values: FormValues<TName>) => void;
|
|
8
|
+
onSubmit: (values: FormValues<TName>) => void | Promise<void>;
|
|
9
|
+
errors?: FormErrors<TName>;
|
|
10
|
+
error?: React.ReactNode;
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
submitLabel?: React.ReactNode;
|
|
14
|
+
actions?: React.ReactNode;
|
|
15
|
+
testID?: string;
|
|
16
|
+
interactionPolicy?: ZoraBaseProps['interactionPolicy'];
|
|
17
|
+
}
|
|
18
|
+
/*** Keeps config-driven field orchestration private to the auth patterns that own it. */
|
|
19
|
+
export declare function AuthForm<TName extends string>({ fields, values, onChange, onSubmit, errors, error, loading, disabled, submitLabel, actions, testID, interactionPolicy, }: AuthFormProps<TName>): React.JSX.Element;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=AuthForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthForm.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/AuthForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGhF,UAAU,aAAa,CAAC,KAAK,SAAS,MAAM;IAC1C,MAAM,EAAE,SAAS,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;IAC1C,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IAC1B,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IAC9C,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,MAAM,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IAC3B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;CACxD;AAED,yFAAyF;AACzF,wBAAgB,QAAQ,CAAC,KAAK,SAAS,MAAM,EAAE,EAC7C,MAAM,EACN,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,KAAK,EACL,OAAe,EACf,QAAgB,EAChB,WAAsB,EACtB,OAAO,EACP,MAAM,EACN,iBAAiB,GAClB,EAAE,aAAa,CAAC,KAAK,CAAC,qBA8BtB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormActions, FormError, useFormController } from '../../features/form/public';
|
|
3
|
+
import { Stack } from '../../features/layout/public';
|
|
4
|
+
import { AuthFormField } from './AuthFormField';
|
|
5
|
+
/*** Keeps config-driven field orchestration private to the auth patterns that own it. */
|
|
6
|
+
export function AuthForm({ fields, values, onChange, onSubmit, errors, error, loading = false, disabled = false, submitLabel = 'Submit', actions, testID, interactionPolicy, }) {
|
|
7
|
+
const controller = useFormController({ fields, values, errors, onChange, onSubmit });
|
|
8
|
+
return (<Stack gap="m" testID={testID}>
|
|
9
|
+
<FormError error={error}/>
|
|
10
|
+
{fields.map((field) => (<AuthFormField key={field.name} disabled={disabled} error={controller.errors[field.name]} field={field} interactionPolicy={interactionPolicy} loading={loading} onChange={controller.setFieldValue} value={values[field.name]}/>))}
|
|
11
|
+
<FormActions disabled={disabled} interactionPolicy={interactionPolicy} loading={loading} onSubmit={() => {
|
|
12
|
+
if (interactionPolicy !== 'passive')
|
|
13
|
+
void controller.handleSubmit();
|
|
14
|
+
}} submitLabel={submitLabel}>
|
|
15
|
+
{actions}
|
|
16
|
+
</FormActions>
|
|
17
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C,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CACnC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAC1B,CACH,CAAC,CACF;MAAA,CAAC,WAAW,CACV,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,GAAG,EAAE;YACb,IAAI,iBAAiB,KAAK,SAAS;gBAAE,KAAK,UAAU,CAAC,YAAY,EAAE,CAAC;QACtE,CAAC,CAAC,CACF,WAAW,CAAC,CAAC,WAAW,CAAC,CAEzB;QAAA,CAAC,OAAO,CACV;MAAA,EAAE,WAAW,CACf;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport { FormActions, FormError, useFormController } from '../../features/form/public';\nimport { Stack } from '../../features/layout/public';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\nimport type { FormErrors, FormFieldConfig, FormValues } from '../../types/form';\nimport { AuthFormField } from './AuthFormField';\n\ninterface AuthFormProps<TName extends string> {\n fields: readonly FormFieldConfig<TName>[];\n values: FormValues<TName>;\n onChange: (values: FormValues<TName>) => void;\n onSubmit: (values: FormValues<TName>) => void | Promise<void>;\n errors?: FormErrors<TName>;\n error?: React.ReactNode;\n loading?: boolean;\n disabled?: boolean;\n submitLabel?: React.ReactNode;\n actions?: React.ReactNode;\n testID?: string;\n interactionPolicy?: ZoraBaseProps['interactionPolicy'];\n}\n\n/*** Keeps config-driven field orchestration private to the auth patterns that own it. */\nexport function AuthForm<TName extends string>({\n fields,\n values,\n onChange,\n onSubmit,\n errors,\n error,\n loading = false,\n disabled = false,\n submitLabel = 'Submit',\n actions,\n testID,\n interactionPolicy,\n}: AuthFormProps<TName>) {\n const controller = useFormController({ fields, values, errors, onChange, onSubmit });\n return (\n <Stack gap=\"m\" testID={testID}>\n <FormError error={error} />\n {fields.map((field) => (\n <AuthFormField\n key={field.name}\n disabled={disabled}\n error={controller.errors[field.name]}\n field={field}\n interactionPolicy={interactionPolicy}\n loading={loading}\n onChange={controller.setFieldValue}\n value={values[field.name]}\n />\n ))}\n <FormActions\n disabled={disabled}\n interactionPolicy={interactionPolicy}\n loading={loading}\n onSubmit={() => {\n if (interactionPolicy !== 'passive') void controller.handleSubmit();\n }}\n submitLabel={submitLabel}\n >\n {actions}\n </FormActions>\n </Stack>\n );\n}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
3
|
+
import type { FormFieldConfig, FormFieldValue } from '../../types/form';
|
|
4
|
+
interface AuthFormFieldProps<TName extends string> {
|
|
5
|
+
field: FormFieldConfig<TName>;
|
|
6
|
+
value: FormFieldValue;
|
|
7
|
+
onChange: (name: TName, value: FormFieldValue) => void;
|
|
8
|
+
error?: React.ReactNode;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
interactionPolicy?: ZoraBaseProps['interactionPolicy'];
|
|
12
|
+
}
|
|
13
|
+
/*** Adapts an auth field configuration to the public compositional form primitives. */
|
|
14
|
+
export declare function AuthFormField<TName extends string>({ field, value, onChange, error, disabled, loading, interactionPolicy, }: AuthFormFieldProps<TName>): React.JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=AuthFormField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthFormField.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/AuthFormField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExE,UAAU,kBAAkB,CAAC,KAAK,SAAS,MAAM;IAC/C,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;IAC9B,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACvD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iBAAiB,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;CACxD;AAED,uFAAuF;AACvF,wBAAgB,aAAa,CAAC,KAAK,SAAS,MAAM,EAAE,EAClD,KAAK,EACL,KAAK,EACL,QAAQ,EACR,KAAK,EACL,QAAgB,EAChB,OAAe,EACf,iBAAiB,GAClB,EAAE,kBAAkB,CAAC,KAAK,CAAC,qBAmC3B"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormField, hasRequiredRule } from '../../features/form/public';
|
|
3
|
+
import { TextInput } from '../../features/form/text-input/public';
|
|
4
|
+
/*** Adapts an auth field configuration to the public compositional form primitives. */
|
|
5
|
+
export function AuthFormField({ field, value, onChange, error, disabled = false, loading = false, interactionPolicy, }) {
|
|
6
|
+
const fieldDisabled = disabled || loading || field.disabled;
|
|
7
|
+
return (<FormField description={field.description} disabled={fieldDisabled} errorText={error} helperText={field.helperText} invalid={Boolean(error)} label={field.label} readOnly={field.readOnly} required={field.required ?? hasRequiredRule(field.rules)} testID={field.testID}>
|
|
8
|
+
<TextInput accessibilityLabel={typeof field.label === 'string' ? field.label : undefined} autoCapitalize={field.autoCapitalize ??
|
|
9
|
+
(['email', 'password', 'url'].includes(field.type ?? 'text') ? 'none' : undefined)} autoComplete={field.autoComplete} disabled={fieldDisabled} interactionPolicy={interactionPolicy} invalid={Boolean(error)} keyboardType={resolveKeyboardType(field)} maxLength={field.maxLength} onChangeText={(nextValue) => onChange(field.name, nextValue)} placeholder={field.placeholder} readOnly={field.readOnly} secureTextEntry={field.secureTextEntry ?? field.type === 'password'} textContentType={resolveTextContentType(field)} value={value}/>
|
|
10
|
+
</FormField>);
|
|
11
|
+
}
|
|
12
|
+
/*** Resolves the native keyboard for an auth field configuration. */
|
|
13
|
+
function resolveKeyboardType(field) {
|
|
14
|
+
if (field.keyboardType)
|
|
15
|
+
return field.keyboardType;
|
|
16
|
+
if (field.type === 'email')
|
|
17
|
+
return 'email-address';
|
|
18
|
+
if (field.type === 'number' || field.type === 'otp')
|
|
19
|
+
return 'number-pad';
|
|
20
|
+
if (field.type === 'tel')
|
|
21
|
+
return 'phone-pad';
|
|
22
|
+
if (field.type === 'url')
|
|
23
|
+
return 'url';
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
/*** Resolves platform text-content hints for an auth field configuration. */
|
|
27
|
+
function resolveTextContentType(field) {
|
|
28
|
+
if (field.textContentType)
|
|
29
|
+
return field.textContentType;
|
|
30
|
+
if (field.type === 'email')
|
|
31
|
+
return 'emailAddress';
|
|
32
|
+
if (field.type === 'password')
|
|
33
|
+
return 'password';
|
|
34
|
+
if (field.type === 'otp')
|
|
35
|
+
return 'oneTimeCode';
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=AuthFormField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthFormField.js","sourceRoot":"","sources":["../../../src/patterns/auth/AuthFormField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAclE,uFAAuF;AACvF,MAAM,UAAU,aAAa,CAAuB,EAClD,KAAK,EACL,K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AI,KAAK,CAAC,IAAI,KAAK,KAAK;QAAE,OAAO,aAAa,CAAC;IAC/C,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import React from 'react';\n\nimport { FormField, hasRequiredRule } from '../../features/form/public';\nimport { TextInput } from '../../features/form/text-input/public';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\nimport type { FormFieldConfig, FormFieldValue } from '../../types/form';\n\ninterface AuthFormFieldProps<TName extends string> {\n field: FormFieldConfig<TName>;\n value: FormFieldValue;\n onChange: (name: TName, value: FormFieldValue) => void;\n error?: React.ReactNode;\n disabled?: boolean;\n loading?: boolean;\n interactionPolicy?: ZoraBaseProps['interactionPolicy'];\n}\n\n/*** Adapts an auth field configuration to the public compositional form primitives. */\nexport function AuthFormField<TName extends string>({\n field,\n value,\n onChange,\n error,\n disabled = false,\n loading = false,\n interactionPolicy,\n}: AuthFormFieldProps<TName>) {\n const fieldDisabled = disabled || loading || field.disabled;\n return (\n <FormField\n description={field.description}\n disabled={fieldDisabled}\n errorText={error}\n helperText={field.helperText}\n invalid={Boolean(error)}\n label={field.label}\n readOnly={field.readOnly}\n required={field.required ?? hasRequiredRule(field.rules)}\n testID={field.testID}\n >\n <TextInput\n accessibilityLabel={typeof field.label === 'string' ? field.label : undefined}\n autoCapitalize={\n field.autoCapitalize ??\n (['email', 'password', 'url'].includes(field.type ?? 'text') ? 'none' : undefined)\n }\n autoComplete={field.autoComplete}\n disabled={fieldDisabled}\n interactionPolicy={interactionPolicy}\n invalid={Boolean(error)}\n keyboardType={resolveKeyboardType(field)}\n maxLength={field.maxLength}\n onChangeText={(nextValue) => onChange(field.name, nextValue)}\n placeholder={field.placeholder}\n readOnly={field.readOnly}\n secureTextEntry={field.secureTextEntry ?? field.type === 'password'}\n textContentType={resolveTextContentType(field)}\n value={value}\n />\n </FormField>\n );\n}\n\n/*** Resolves the native keyboard for an auth field configuration. */\nfunction resolveKeyboardType(field: FormFieldConfig) {\n if (field.keyboardType) return field.keyboardType;\n if (field.type === 'email') return 'email-address';\n if (field.type === 'number' || field.type === 'otp') return 'number-pad';\n if (field.type === 'tel') return 'phone-pad';\n if (field.type === 'url') return 'url';\n return undefined;\n}\n\n/*** Resolves platform text-content hints for an auth field configuration. */\nfunction resolveTextContentType(field: FormFieldConfig) {\n if (field.textContentType) return field.textContentType;\n if (field.type === 'email') return 'emailAddress';\n if (field.type === 'password') return 'password';\n if (field.type === 'otp') return 'oneTimeCode';\n return undefined;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForgotPasswordForm.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/ForgotPasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ForgotPasswordForm.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/ForgotPasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAqFvD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,+DAA8C,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Form } from '../../components/form';
|
|
3
2
|
import { Button } from '../../features/button/public';
|
|
4
3
|
import { Stack } from '../../features/layout/public';
|
|
5
4
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
5
|
+
import { AuthForm } from './AuthForm';
|
|
6
6
|
import { defaultIdentifiers, normalizeIdentifierKind, resolveIdentifierLabel, resolveIdentifierRules, resolveIdentifierType, } from './utils';
|
|
7
7
|
function ForgotPasswordFormInner({ themeId: _themeId, mode: _mode, interactionPolicy, identifiers = defaultIdentifiers, identifierLabel, signInLabel = 'Sign in', loading = false, disabled = false, error, submitLabel = 'Send code', onSubmit, onSignIn, testID, }) {
|
|
8
8
|
const [values, setValues] = React.useState({
|
|
@@ -21,7 +21,7 @@ function ForgotPasswordFormInner({ themeId: _themeId, mode: _mode, interactionPo
|
|
|
21
21
|
identifier: formValues.identifier.trim(),
|
|
22
22
|
identifierKind: normalizeIdentifierKind(formValues.identifier, identifiers),
|
|
23
23
|
}), [identifiers, onSubmit]);
|
|
24
|
-
return (<
|
|
24
|
+
return (<AuthForm actions={onSignIn ? (<Stack direction="row" gap="s" wrap="wrap">
|
|
25
25
|
<Button disabled={disabled || loading} variant="ghost" onPress={() => {
|
|
26
26
|
void onSignIn();
|
|
27
27
|
}} size="s" color="neutral" interactionPolicy={interactionPolicy}>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForgotPasswordForm.js","sourceRoot":"","sources":["../../../src/patterns/auth/ForgotPasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ForgotPasswordForm.js","sourceRoot":"","sources":["../../../src/patterns/auth/ForgotPasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AAIjB,SAAS,uBAAuB,CAAC,EAC/B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EACjB,WAAW,GAAG,kBAAkB,EAChC,eAAe,EACf,WAAW,GAAG,SAAS,EACvB,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,EAChB,KAAK,EACL,WAAW,GAAG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;YAAA,EAAE,MAAM,CACV;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,SACN,CAAC,CACD,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,SAAS,CAAC,CACpB,QAAQ,CAAC,CAAC,YAAY,CAAC,CACvB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,uBAAuB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Button } from '../../features/button/public';\nimport { Stack } from '../../features/layout/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { FormFieldConfig, FormValues } from '../../types/form';\nimport { AuthForm } from './AuthForm';\nimport type { ForgotPasswordFormProps } from './types';\nimport {\n defaultIdentifiers,\n normalizeIdentifierKind,\n resolveIdentifierLabel,\n resolveIdentifierRules,\n resolveIdentifierType,\n} from './utils';\n\ntype ForgotPasswordFieldName = 'identifier';\n\nfunction ForgotPasswordFormInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy,\n identifiers = defaultIdentifiers,\n identifierLabel,\n signInLabel = 'Sign in',\n loading = false,\n disabled = false,\n error,\n submitLabel = 'Send code',\n onSubmit,\n onSignIn,\n testID,\n}: ForgotPasswordFormProps) {\n const [values, setValues] = React.useState<FormValues<ForgotPasswordFieldName>>({\n identifier: '',\n });\n const fields = React.useMemo<readonly FormFieldConfig<ForgotPasswordFieldName>[]>(\n () => [\n {\n name: 'identifier',\n label: identifierLabel ?? resolveIdentifierLabel(identifiers),\n type: resolveIdentifierType(identifiers),\n autoCapitalize: 'none',\n rules: resolveIdentifierRules(identifiers),\n },\n ],\n [identifierLabel, identifiers],\n );\n\n const handleSubmit = React.useCallback(\n (formValues: FormValues<ForgotPasswordFieldName>) =>\n onSubmit({\n identifier: formValues.identifier.trim(),\n identifierKind: normalizeIdentifierKind(formValues.identifier, identifiers),\n }),\n [identifiers, onSubmit],\n );\n\n return (\n <AuthForm\n actions={\n onSignIn ? (\n <Stack direction=\"row\" gap=\"s\" wrap=\"wrap\">\n <Button\n disabled={disabled || loading}\n variant=\"ghost\"\n onPress={() => {\n void onSignIn();\n }}\n size=\"s\"\n color=\"neutral\"\n interactionPolicy={interactionPolicy}\n >\n {signInLabel}\n </Button>\n </Stack>\n ) : undefined\n }\n disabled={disabled}\n error={error}\n fields={fields}\n interactionPolicy={interactionPolicy}\n loading={loading}\n onChange={setValues}\n onSubmit={handleSubmit}\n submitLabel={submitLabel}\n testID={testID}\n values={values}\n />\n );\n}\n\n/***\n * Password reset form pattern with validation and submit actions.\n *\n \n */\nexport const ForgotPasswordForm = withZoraThemeScope(ForgotPasswordFormInner);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OtpForm.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/OtpForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"OtpForm.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/OtpForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAiF5C;;;;GAIG;AACH,eAAO,MAAM,OAAO,oDAAmC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Form } from '../../components/form';
|
|
3
2
|
import { Button } from '../../features/button/public';
|
|
4
3
|
import { Stack } from '../../features/layout/public';
|
|
5
4
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
5
|
+
import { AuthForm } from './AuthForm';
|
|
6
6
|
function OtpFormInner({ themeId: _themeId, mode: _mode, interactionPolicy, length = 6, otpLabel = 'Code', resendLabel = 'Resend code', resendDisabled = false, resendLoading = false, loading = false, disabled = false, error, submitLabel = 'Verify code', onSubmit, onResend, testID, }) {
|
|
7
7
|
const resolvedLength = Math.max(1, length);
|
|
8
8
|
const [values, setValues] = React.useState({
|
|
@@ -20,7 +20,7 @@ function OtpFormInner({ themeId: _themeId, mode: _mode, interactionPolicy, lengt
|
|
|
20
20
|
const handleSubmit = React.useCallback((formValues) => onSubmit({
|
|
21
21
|
otp: formValues.otp.trim(),
|
|
22
22
|
}), [onSubmit]);
|
|
23
|
-
return (<
|
|
23
|
+
return (<AuthForm actions={onResend ? (<Stack direction="row" gap="s" wrap="wrap">
|
|
24
24
|
<Button disabled={disabled || loading || resendDisabled} variant="ghost" loading={resendLoading} onPress={() => {
|
|
25
25
|
void onResend();
|
|
26
26
|
}} size="s" color="neutral" interactionPolicy={interactionPolicy}>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OtpForm.js","sourceRoot":"","sources":["../../../src/patterns/auth/OtpForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"OtpForm.js","sourceRoot":"","sources":["../../../src/patterns/auth/OtpForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAKtC,SAAS,YAAY,CAAC,EACpB,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,QAAQ,CAAC,CAAC,QAAQ,IAAI,OAAO,IAAI,cAAc,CAAC,CAChD,OAAO,CAAC,OAAO,CACf,OAAO,CAAC,CAAC,aAAa,CAAC,CACvB,OAAO,CAAC,CAAC,GAAG,EAAE;gBACZ,KAAK,QAAQ,EAAE,CAAC;YAClB,CAAC,CAAC,CACF,IAAI,CAAC,GAAG,CACR,KAAK,CAAC,SAAS,CACf,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CAErC;cAAA,CAAC,WAAW,CACd;YAAA,EAAE,MAAM,CACV;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,SACN,CAAC,CACD,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,SAAS,CAAC,CACpB,QAAQ,CAAC,CAAC,YAAY,CAAC,CACvB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Button } from '../../features/button/public';\nimport { Stack } from '../../features/layout/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { FormFieldConfig, FormValues } from '../../types/form';\nimport { AuthForm } from './AuthForm';\nimport type { OtpFormProps } from './types';\n\ntype OtpFieldName = 'otp';\n\nfunction OtpFormInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy,\n length = 6,\n otpLabel = 'Code',\n resendLabel = 'Resend code',\n resendDisabled = false,\n resendLoading = false,\n loading = false,\n disabled = false,\n error,\n submitLabel = 'Verify code',\n onSubmit,\n onResend,\n testID,\n}: OtpFormProps) {\n const resolvedLength = Math.max(1, length);\n const [values, setValues] = React.useState<FormValues<OtpFieldName>>({\n otp: '',\n });\n const fields = React.useMemo<readonly FormFieldConfig<OtpFieldName>[]>(\n () => [\n {\n name: 'otp',\n label: otpLabel,\n type: 'otp',\n maxLength: resolvedLength,\n rules: [{ kind: 'required' }, { kind: 'minLength', value: resolvedLength }],\n },\n ],\n [otpLabel, resolvedLength],\n );\n\n const handleSubmit = React.useCallback(\n (formValues: FormValues<OtpFieldName>) =>\n onSubmit({\n otp: formValues.otp.trim(),\n }),\n [onSubmit],\n );\n\n return (\n <AuthForm\n actions={\n onResend ? (\n <Stack direction=\"row\" gap=\"s\" wrap=\"wrap\">\n <Button\n disabled={disabled || loading || resendDisabled}\n variant=\"ghost\"\n loading={resendLoading}\n onPress={() => {\n void onResend();\n }}\n size=\"s\"\n color=\"neutral\"\n interactionPolicy={interactionPolicy}\n >\n {resendLabel}\n </Button>\n </Stack>\n ) : undefined\n }\n disabled={disabled}\n error={error}\n fields={fields}\n interactionPolicy={interactionPolicy}\n loading={loading}\n onChange={setValues}\n onSubmit={handleSubmit}\n submitLabel={submitLabel}\n testID={testID}\n values={values}\n />\n );\n}\n\n/***\n * One-time passcode form pattern with digit input and submit actions.\n *\n \n */\nexport const OtpForm = withZoraThemeScope(OtpFormInner);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignInForm.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/SignInForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SignInForm.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/SignInForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAiH/C;;;;GAIG;AACH,eAAO,MAAM,UAAU,uDAAsC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Form } from '../../components/form';
|
|
3
2
|
import { Button } from '../../features/button/public';
|
|
4
3
|
import { Stack } from '../../features/layout/public';
|
|
5
4
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
5
|
+
import { AuthForm } from './AuthForm';
|
|
6
6
|
import { defaultIdentifiers, normalizeIdentifierKind, resolveIdentifierLabel, resolveIdentifierRules, resolveIdentifierType, } from './utils';
|
|
7
7
|
function SignInFormInner({ themeId: _themeId, interactionPolicy, mode: _mode, identifiers = defaultIdentifiers, identifierLabel, secretLabel = 'Password', forgotPasswordLabel = 'Forgot password', signUpLabel = 'Sign up', loading = false, disabled = false, error, submitLabel = 'Sign in', onSubmit, onForgotPassword, onSignUp, testID, }) {
|
|
8
8
|
const [values, setValues] = React.useState({
|
|
@@ -30,7 +30,7 @@ function SignInFormInner({ themeId: _themeId, interactionPolicy, mode: _mode, id
|
|
|
30
30
|
identifierKind: normalizeIdentifierKind(formValues.identifier, identifiers),
|
|
31
31
|
secret: formValues.secret,
|
|
32
32
|
}), [identifiers, onSubmit]);
|
|
33
|
-
return (<
|
|
33
|
+
return (<AuthForm actions={hasActions ? (<Stack direction="row" gap="s" wrap="wrap">
|
|
34
34
|
{onForgotPassword ? (<Button disabled={disabled || loading} variant="ghost" onPress={() => {
|
|
35
35
|
void onForgotPassword();
|
|
36
36
|
}} size="s" color="neutral" interactionPolicy={interactionPolicy}>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignInForm.js","sourceRoot":"","sources":["../../../src/patterns/auth/SignInForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"SignInForm.js","sourceRoot":"","sources":["../../../src/patterns/auth/SignInForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MA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AAI,CAAC,GAAG,CACR,KAAK,CAAC,SAAS,CACf,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CAErC;gBAAA,CAAC,WAAW,CACd;cAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,SACN,CAAC,CACD,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,SAAS,CAAC,CACpB,QAAQ,CAAC,CAAC,YAAY,CAAC,CACvB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Button } from '../../features/button/public';\nimport { Stack } from '../../features/layout/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { FormFieldConfig, FormValues } from '../../types/form';\nimport { AuthForm } from './AuthForm';\nimport type { SignInFormProps } from './types';\nimport {\n defaultIdentifiers,\n normalizeIdentifierKind,\n resolveIdentifierLabel,\n resolveIdentifierRules,\n resolveIdentifierType,\n} from './utils';\n\ntype SignInFieldName = 'identifier' | 'secret';\n\nfunction SignInFormInner({\n themeId: _themeId,\n interactionPolicy,\n mode: _mode,\n identifiers = defaultIdentifiers,\n identifierLabel,\n secretLabel = 'Password',\n forgotPasswordLabel = 'Forgot password',\n signUpLabel = 'Sign up',\n loading = false,\n disabled = false,\n error,\n submitLabel = 'Sign in',\n onSubmit,\n onForgotPassword,\n onSignUp,\n testID,\n}: SignInFormProps) {\n const [values, setValues] = React.useState<FormValues<SignInFieldName>>({\n identifier: '',\n secret: '',\n });\n const hasActions = Boolean(onForgotPassword ?? onSignUp);\n const fields = React.useMemo<readonly FormFieldConfig<SignInFieldName>[]>(\n () => [\n {\n name: 'identifier',\n label: identifierLabel ?? resolveIdentifierLabel(identifiers),\n type: resolveIdentifierType(identifiers),\n autoCapitalize: 'none',\n rules: resolveIdentifierRules(identifiers),\n },\n {\n name: 'secret',\n label: secretLabel,\n type: 'password',\n rules: [{ kind: 'required' }],\n },\n ],\n [identifierLabel, identifiers, secretLabel],\n );\n\n const handleSubmit = React.useCallback(\n (formValues: FormValues<SignInFieldName>) =>\n onSubmit({\n identifier: formValues.identifier.trim(),\n identifierKind: normalizeIdentifierKind(formValues.identifier, identifiers),\n secret: formValues.secret,\n }),\n [identifiers, onSubmit],\n );\n\n return (\n <AuthForm\n actions={\n hasActions ? (\n <Stack direction=\"row\" gap=\"s\" wrap=\"wrap\">\n {onForgotPassword ? (\n <Button\n disabled={disabled || loading}\n variant=\"ghost\"\n onPress={() => {\n void onForgotPassword();\n }}\n size=\"s\"\n color=\"neutral\"\n interactionPolicy={interactionPolicy}\n >\n {forgotPasswordLabel}\n </Button>\n ) : null}\n {onSignUp ? (\n <Button\n disabled={disabled || loading}\n variant=\"ghost\"\n onPress={() => {\n void onSignUp();\n }}\n size=\"s\"\n color=\"neutral\"\n interactionPolicy={interactionPolicy}\n >\n {signUpLabel}\n </Button>\n ) : null}\n </Stack>\n ) : undefined\n }\n disabled={disabled}\n error={error}\n fields={fields}\n interactionPolicy={interactionPolicy}\n loading={loading}\n onChange={setValues}\n onSubmit={handleSubmit}\n submitLabel={submitLabel}\n testID={testID}\n values={values}\n />\n );\n}\n\n/***\n * Sign-in form pattern with identifier and password fields.\n *\n \n */\nexport const SignInForm = withZoraThemeScope(SignInFormInner);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignUpForm.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/SignUpForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SignUpForm.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/SignUpForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA6E/C;;;;GAIG;AACH,eAAO,MAAM,UAAU,uDAAsC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Form } from '../../components/form';
|
|
3
2
|
import { Button } from '../../features/button/public';
|
|
4
3
|
import { Stack } from '../../features/layout/public';
|
|
5
4
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
5
|
+
import { AuthForm } from './AuthForm';
|
|
6
6
|
const defaultSignUpFields = [
|
|
7
7
|
{
|
|
8
8
|
name: 'email',
|
|
@@ -27,7 +27,7 @@ function createValues(fields) {
|
|
|
27
27
|
}
|
|
28
28
|
function SignUpFormInner({ themeId: _themeId, interactionPolicy, mode: _mode, fields = defaultSignUpFields, signInLabel = 'Sign in', loading = false, disabled = false, error, submitLabel = 'Sign up', onSubmit, onSignIn, testID, }) {
|
|
29
29
|
const [values, setValues] = React.useState(() => createValues(fields));
|
|
30
|
-
return (<
|
|
30
|
+
return (<AuthForm actions={onSignIn ? (<Stack direction="row" gap="s" wrap="wrap">
|
|
31
31
|
<Button disabled={disabled || loading} variant="ghost" onPress={() => {
|
|
32
32
|
void onSignIn();
|
|
33
33
|
}} size="s" color="neutral" interactionPolicy={interactionPolicy}>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignUpForm.js","sourceRoot":"","sources":["../../../src/patterns/auth/SignUpForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,
|
|
1
|
+
{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React from 'react';\n\nimport { Button } from '../../features/button/public';\nimport { Stack } from '../../features/layout/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { FormFieldConfig, FormValues } from '../../types/form';\nimport { AuthForm } from './AuthForm';\nimport type { SignUpFormProps } from './types';\n\nconst defaultSignUpFields = [\n {\n name: 'email',\n label: 'Email',\n type: 'email',\n autoCapitalize: 'none',\n rules: [{ kind: 'required' }, { kind: 'email' }],\n },\n {\n name: 'password',\n label: 'Password',\n type: 'password',\n rules: [{ kind: 'required' }, { kind: 'minLength', value: 8 }],\n },\n] as const satisfies readonly FormFieldConfig[];\n\nfunction createValues(fields: readonly FormFieldConfig[]): FormValues {\n const values = fields.reduce<Record<string, string>>((nextValues, field) => {\n nextValues[field.name] = '';\n return nextValues;\n }, {});\n\n return values;\n}\n\nfunction SignUpFormInner({\n themeId: _themeId,\n interactionPolicy,\n mode: _mode,\n fields = defaultSignUpFields,\n signInLabel = 'Sign in',\n loading = false,\n disabled = false,\n error,\n submitLabel = 'Sign up',\n onSubmit,\n onSignIn,\n testID,\n}: SignUpFormProps) {\n const [values, setValues] = React.useState<FormValues>(() => createValues(fields));\n\n return (\n <AuthForm\n actions={\n onSignIn ? (\n <Stack direction=\"row\" gap=\"s\" wrap=\"wrap\">\n <Button\n disabled={disabled || loading}\n variant=\"ghost\"\n onPress={() => {\n void onSignIn();\n }}\n size=\"s\"\n color=\"neutral\"\n interactionPolicy={interactionPolicy}\n >\n {signInLabel}\n </Button>\n </Stack>\n ) : undefined\n }\n disabled={disabled}\n error={error}\n fields={fields}\n interactionPolicy={interactionPolicy}\n loading={loading}\n onChange={setValues}\n onSubmit={onSubmit}\n submitLabel={submitLabel}\n testID={testID}\n values={values}\n />\n );\n}\n\n/***\n * Sign-up form pattern with structured fields and validation.\n *\n \n */\nexport const SignUpForm = withZoraThemeScope(SignUpFormInner);\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
2
2
|
import type React from 'react';
|
|
3
|
-
import type { FormFieldConfig, FormValues } from '../../components/form';
|
|
4
3
|
import type { ButtonProps } from '../../features/button/public';
|
|
5
4
|
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
5
|
+
import type { FormFieldConfig, FormValues } from '../../types/form';
|
|
6
6
|
export type AuthIdentifierKind = 'email' | 'phone' | 'username';
|
|
7
7
|
export interface AuthFormBaseProps extends ZoraBaseProps {
|
|
8
8
|
loading?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEpE,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC;AAEhE,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU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