@ankhorage/zora 8.0.0 → 9.0.1
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 +12 -0
- package/README.md +1 -1
- package/dist/components/form/FormField.js +2 -2
- package/dist/components/form/FormField.js.map +1 -1
- package/dist/components/form/meta.d.ts +1 -1
- package/dist/components/form/meta.js +1 -1
- package/dist/components/form/meta.js.map +1 -1
- package/dist/components/form/types.d.ts +6 -6
- package/dist/components/form/types.d.ts.map +1 -1
- package/dist/components/form/types.js.map +1 -1
- package/dist/components/search-bar/SearchBar.js +2 -2
- package/dist/components/search-bar/SearchBar.js.map +1 -1
- package/dist/features/activity-indicator/activityIndicatorMeta.d.ts +32 -0
- package/dist/features/activity-indicator/activityIndicatorMeta.d.ts.map +1 -0
- package/dist/features/activity-indicator/activityIndicatorMeta.js +13 -0
- package/dist/features/activity-indicator/activityIndicatorMeta.js.map +1 -0
- package/dist/features/activity-indicator/adapters/inbound/ActivityIndicator.d.ts +5 -0
- package/dist/features/activity-indicator/adapters/inbound/ActivityIndicator.d.ts.map +1 -0
- package/dist/features/activity-indicator/adapters/inbound/ActivityIndicator.js +12 -0
- package/dist/features/activity-indicator/adapters/inbound/ActivityIndicator.js.map +1 -0
- package/dist/features/activity-indicator/public.d.ts +3 -0
- package/dist/features/activity-indicator/public.d.ts.map +1 -0
- package/dist/features/activity-indicator/public.js +2 -0
- package/dist/features/activity-indicator/public.js.map +1 -0
- package/dist/features/bottom-sheet/bottomSheetMeta.d.ts +1 -1
- package/dist/features/card/cardMeta.d.ts +1 -1
- package/dist/features/card/mediaCardMeta.d.ts +1 -1
- package/dist/features/card/postCardMeta.d.ts +1 -1
- package/dist/features/data-table/adapters/inbound/DataTable.d.ts.map +1 -1
- package/dist/features/data-table/adapters/inbound/DataTable.js +1 -1
- package/dist/features/data-table/adapters/inbound/DataTable.js.map +1 -1
- package/dist/{patterns/empty-state → features/empty-state/adapters/inbound}/EmptyState.d.ts +1 -1
- package/dist/features/empty-state/adapters/inbound/EmptyState.d.ts.map +1 -0
- package/dist/{patterns/empty-state → features/empty-state/adapters/inbound}/EmptyState.js +4 -4
- package/dist/features/empty-state/adapters/inbound/EmptyState.js.map +1 -0
- package/dist/{patterns/empty-state/meta.d.ts → features/empty-state/emptyStateMeta.d.ts} +1 -1
- package/dist/features/empty-state/emptyStateMeta.d.ts.map +1 -0
- package/dist/{patterns/empty-state/meta.js → features/empty-state/emptyStateMeta.js} +1 -1
- package/dist/features/empty-state/emptyStateMeta.js.map +1 -0
- package/dist/features/empty-state/public.d.ts +3 -0
- package/dist/features/empty-state/public.d.ts.map +1 -0
- package/dist/features/empty-state/public.js +2 -0
- package/dist/features/empty-state/public.js.map +1 -0
- package/dist/{components/checkbox → features/form/checkbox/adapters/inbound}/Checkbox.d.ts +1 -1
- package/dist/features/form/checkbox/adapters/inbound/Checkbox.d.ts.map +1 -0
- package/dist/{components/checkbox → features/form/checkbox/adapters/inbound}/Checkbox.js +1 -1
- package/dist/features/form/checkbox/adapters/inbound/Checkbox.js.map +1 -0
- package/dist/{components/checkbox → features/form/checkbox/adapters/inbound}/CheckboxGroup.d.ts +1 -1
- package/dist/features/form/checkbox/adapters/inbound/CheckboxGroup.d.ts.map +1 -0
- package/dist/{components/checkbox → features/form/checkbox/adapters/inbound}/CheckboxGroup.js +3 -3
- package/dist/features/form/checkbox/adapters/inbound/CheckboxGroup.js.map +1 -0
- package/dist/features/form/checkbox/checkboxMeta.d.ts +67 -0
- package/dist/features/form/checkbox/checkboxMeta.d.ts.map +1 -0
- package/dist/features/form/checkbox/checkboxMeta.js +28 -0
- package/dist/features/form/checkbox/checkboxMeta.js.map +1 -0
- package/dist/features/form/checkbox/public.d.ts +4 -0
- package/dist/features/form/checkbox/public.d.ts.map +1 -0
- package/dist/features/form/checkbox/public.js +3 -0
- package/dist/features/form/checkbox/public.js.map +1 -0
- package/dist/{components/radio → features/form/radio/adapters/inbound}/Radio.d.ts +1 -1
- package/dist/features/form/radio/adapters/inbound/Radio.d.ts.map +1 -0
- package/dist/{components/radio → features/form/radio/adapters/inbound}/Radio.js +1 -1
- package/dist/features/form/radio/adapters/inbound/Radio.js.map +1 -0
- package/dist/{components/radio → features/form/radio/adapters/inbound}/RadioGroup.d.ts +1 -1
- package/dist/features/form/radio/adapters/inbound/RadioGroup.d.ts.map +1 -0
- package/dist/{components/radio → features/form/radio/adapters/inbound}/RadioGroup.js +5 -5
- package/dist/features/form/radio/adapters/inbound/RadioGroup.js.map +1 -0
- package/dist/{components/radio → features/form/radio/adapters/inbound}/RadioOptionControl.d.ts +1 -1
- package/dist/features/form/radio/adapters/inbound/RadioOptionControl.d.ts.map +1 -0
- package/dist/{components/radio → features/form/radio/adapters/inbound}/RadioOptionControl.js +4 -4
- package/dist/features/form/radio/adapters/inbound/RadioOptionControl.js.map +1 -0
- package/dist/features/form/radio/public.d.ts +4 -0
- package/dist/features/form/radio/public.d.ts.map +1 -0
- package/dist/features/form/radio/public.js +3 -0
- package/dist/features/form/radio/public.js.map +1 -0
- package/dist/{components/radio/meta.d.ts → features/form/radio/radioMeta.d.ts} +28 -4
- package/dist/features/form/radio/radioMeta.d.ts.map +1 -0
- package/dist/{components/radio/meta.js → features/form/radio/radioMeta.js} +9 -5
- package/dist/features/form/radio/radioMeta.js.map +1 -0
- package/dist/features/form/radio/themeRecipeMeta.d.ts.map +1 -0
- package/dist/{components → features/form}/radio/themeRecipeMeta.js +1 -1
- package/dist/features/form/radio/themeRecipeMeta.js.map +1 -0
- package/dist/features/form/radio/utils/handleRadioOptionKeyDown.d.ts.map +1 -0
- package/dist/{components/radio → features/form/radio/utils}/handleRadioOptionKeyDown.js +1 -1
- package/dist/features/form/radio/utils/handleRadioOptionKeyDown.js.map +1 -0
- package/dist/{components/radio → features/form/radio/utils}/resolveRadioGroupThemeRecipe.d.ts +2 -2
- package/dist/features/form/radio/utils/resolveRadioGroupThemeRecipe.d.ts.map +1 -0
- package/dist/features/form/radio/utils/resolveRadioGroupThemeRecipe.js.map +1 -0
- package/dist/{components/radio → features/form/radio/utils}/resolveRadioOptionColors.d.ts +1 -1
- package/dist/features/form/radio/utils/resolveRadioOptionColors.d.ts.map +1 -0
- package/dist/features/form/radio/utils/resolveRadioOptionColors.js.map +1 -0
- package/dist/features/form/text-input/adapters/inbound/TextInput.d.ts +14 -0
- package/dist/features/form/text-input/adapters/inbound/TextInput.d.ts.map +1 -0
- package/dist/{components/input/Input.js → features/form/text-input/adapters/inbound/TextInput.js} +9 -10
- package/dist/features/form/text-input/adapters/inbound/TextInput.js.map +1 -0
- package/dist/features/form/text-input/public.d.ts +3 -0
- package/dist/features/form/text-input/public.d.ts.map +1 -0
- package/dist/features/form/text-input/public.js +2 -0
- package/dist/features/form/text-input/public.js.map +1 -0
- package/dist/{components/input/meta.d.ts → features/form/text-input/textInputMeta.d.ts} +16 -4
- package/dist/features/form/text-input/textInputMeta.d.ts.map +1 -0
- package/dist/{components/input/meta.js → features/form/text-input/textInputMeta.js} +16 -4
- package/dist/features/form/text-input/textInputMeta.js.map +1 -0
- 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/{components/progress → features/progress/adapters/inbound}/Progress.d.ts +1 -1
- package/dist/features/progress/adapters/inbound/Progress.d.ts.map +1 -0
- package/dist/{components/progress → features/progress/adapters/inbound}/Progress.js +5 -5
- package/dist/features/progress/adapters/inbound/Progress.js.map +1 -0
- package/dist/{components/progress → features/progress/adapters/inbound}/ProgressRing.d.ts +1 -1
- package/dist/features/progress/adapters/inbound/ProgressRing.d.ts.map +1 -0
- package/dist/{components/progress → features/progress/adapters/inbound}/ProgressRing.js +7 -7
- package/dist/features/progress/adapters/inbound/ProgressRing.js.map +1 -0
- package/dist/{components/progress/meta.d.ts → features/progress/progressMeta.d.ts} +1 -1
- package/dist/features/progress/progressMeta.d.ts.map +1 -0
- package/dist/{components/progress/meta.js → features/progress/progressMeta.js} +1 -1
- package/dist/features/progress/progressMeta.js.map +1 -0
- package/dist/features/progress/public.d.ts +4 -0
- package/dist/features/progress/public.d.ts.map +1 -0
- package/dist/features/progress/public.js +3 -0
- package/dist/features/progress/public.js.map +1 -0
- package/dist/features/progress/utils/resolveProgressFraction.d.ts.map +1 -0
- package/dist/features/progress/utils/resolveProgressFraction.js.map +1 -0
- package/dist/features/progress/utils/resolveProgressRingGeometry.d.ts.map +1 -0
- package/dist/features/progress/utils/resolveProgressRingGeometry.js.map +1 -0
- package/dist/features/splash-screen/splashScreenMeta.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 +6 -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 +2 -2
- package/dist/metadata/allowedChildren.js.map +1 -1
- package/dist/metadata/bindableComponentMeta.d.ts +9 -76
- package/dist/metadata/bindableComponentMeta.d.ts.map +1 -1
- package/dist/metadata/bindableComponentMeta.js +7 -62
- package/dist/metadata/bindableComponentMeta.js.map +1 -1
- package/dist/metadata/componentMeta.js +8 -8
- package/dist/metadata/componentMeta.js.map +1 -1
- package/dist/metadata/themeRecipeMeta.js +1 -1
- package/dist/metadata/themeRecipeMeta.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/ReaderSurface.js +1 -1
- package/dist/patterns/reader/ReaderSurface.js.map +1 -1
- package/dist/patterns/reader/meta.d.ts +2 -2
- package/dist/patterns/scanner/meta.d.ts +2 -2
- package/dist/patterns/theme-composer/ThemeComposer.js +3 -3
- package/dist/patterns/theme-composer/ThemeComposer.js.map +1 -1
- package/dist/registry.js +8 -8
- package/dist/registry.js.map +1 -1
- package/dist/types/activity-indicator.d.ts +6 -0
- package/dist/types/activity-indicator.d.ts.map +1 -0
- package/dist/types/activity-indicator.js +2 -0
- package/dist/types/activity-indicator.js.map +1 -0
- package/dist/{components/checkbox/types.d.ts → types/checkbox.d.ts} +2 -2
- package/dist/types/checkbox.d.ts.map +1 -0
- package/dist/types/checkbox.js +2 -0
- package/dist/types/checkbox.js.map +1 -0
- package/dist/{patterns/empty-state/types.d.ts → types/empty-state.d.ts} +3 -3
- package/dist/types/empty-state.d.ts.map +1 -0
- package/dist/types/empty-state.js +2 -0
- package/dist/types/empty-state.js.map +1 -0
- package/dist/{components/progress/types.d.ts → types/progress.d.ts} +3 -3
- package/dist/types/progress.d.ts.map +1 -0
- package/dist/{components/progress/types.js → types/progress.js} +1 -1
- package/dist/types/progress.js.map +1 -0
- package/dist/{components/radio/types.d.ts → types/radio.d.ts} +3 -3
- package/dist/types/radio.d.ts.map +1 -0
- package/dist/types/radio.js +2 -0
- package/dist/types/radio.js.map +1 -0
- package/dist/types/text-input.d.ts +22 -0
- package/dist/types/text-input.d.ts.map +1 -0
- package/dist/types/text-input.js +2 -0
- package/dist/types/text-input.js.map +1 -0
- package/package.json +1 -1
- package/src/audit.test.ts +1 -1
- package/src/components/form/FormField.tsx +2 -2
- package/src/components/form/meta.ts +1 -1
- package/src/components/form/types.ts +6 -6
- package/src/components/search-bar/SearchBar.tsx +3 -3
- package/src/features/activity-indicator/activityIndicatorMeta.ts +14 -0
- package/src/features/activity-indicator/adapters/inbound/ActivityIndicator.tsx +21 -0
- package/src/features/activity-indicator/public.ts +2 -0
- package/src/features/data-table/adapters/inbound/DataTable.tsx +1 -1
- package/src/{patterns/empty-state → features/empty-state/adapters/inbound}/EmptyState.tsx +5 -5
- package/src/features/empty-state/public.ts +2 -0
- package/src/{components/checkbox → features/form/checkbox/adapters/inbound}/Checkbox.tsx +2 -2
- package/src/{components/checkbox → features/form/checkbox/adapters/inbound}/CheckboxGroup.tsx +4 -4
- package/src/features/form/checkbox/checkboxMeta.ts +30 -0
- package/src/features/form/checkbox/public.ts +7 -0
- package/src/{components/radio → features/form/radio/adapters/inbound}/Radio.tsx +2 -2
- package/src/{components/radio → features/form/radio/adapters/inbound}/RadioGroup.test.ts +3 -3
- package/src/{components/radio → features/form/radio/adapters/inbound}/RadioGroup.tsx +6 -6
- package/src/{components/radio → features/form/radio/adapters/inbound}/RadioOptionControl.tsx +5 -5
- package/src/features/form/radio/public.ts +3 -0
- package/src/{components/radio/meta.ts → features/form/radio/radioMeta.ts} +9 -5
- package/src/{components → features/form}/radio/themeRecipeMeta.ts +2 -2
- package/src/{components/radio → features/form/radio/utils}/handleRadioOptionKeyDown.test.ts +1 -1
- package/src/{components/radio → features/form/radio/utils}/handleRadioOptionKeyDown.ts +1 -1
- package/src/{components/radio → features/form/radio/utils}/resolveRadioGroupThemeRecipe.ts +2 -2
- package/src/{components/radio → features/form/radio/utils}/resolveRadioOptionColors.ts +1 -1
- package/src/{components/input/Input.tsx → features/form/text-input/adapters/inbound/TextInput.tsx} +10 -11
- package/src/features/form/text-input/public.ts +2 -0
- package/src/{components/input/meta.ts → features/form/text-input/textInputMeta.ts} +16 -4
- package/src/{components/progress → features/progress/adapters/inbound}/Progress.tsx +5 -5
- package/src/{components/progress → features/progress/adapters/inbound}/ProgressRing.test.ts +9 -6
- package/src/{components/progress → features/progress/adapters/inbound}/ProgressRing.tsx +7 -7
- package/src/features/progress/public.ts +3 -0
- package/src/features/uploader/adapters/inbound/Uploader.tsx +1 -1
- package/src/index.ts +34 -12
- package/src/interactionPolicy.test.ts +2 -2
- package/src/metadata/allowedChildren.ts +2 -2
- package/src/metadata/bindableComponentMeta.test.ts +1 -1
- package/src/metadata/bindableComponentMeta.ts +7 -62
- package/src/metadata/componentMeta.test.ts +5 -2
- package/src/metadata/componentMeta.ts +8 -8
- package/src/metadata/themeRecipeMeta.ts +1 -1
- package/src/patterns/reader/ReaderSurface.tsx +1 -1
- package/src/patterns/theme-composer/ThemeComposer.tsx +3 -3
- package/src/registry.ts +8 -8
- package/src/showcaseCoverage.test.ts +1 -2
- package/src/theme/themeScopeStructure.test.ts +12 -14
- package/src/types/activity-indicator.ts +8 -0
- package/src/{components/checkbox/types.ts → types/checkbox.ts} +1 -1
- package/src/{patterns/empty-state/types.ts → types/empty-state.ts} +2 -2
- package/src/{components/progress/types.ts → types/progress.ts} +2 -2
- package/src/{components/radio/types.ts → types/radio.ts} +2 -2
- package/src/{components/input/types.ts → types/text-input.ts} +7 -7
- package/dist/components/checkbox/Checkbox.d.ts.map +0 -1
- package/dist/components/checkbox/Checkbox.js.map +0 -1
- package/dist/components/checkbox/CheckboxGroup.d.ts.map +0 -1
- package/dist/components/checkbox/CheckboxGroup.js.map +0 -1
- package/dist/components/checkbox/index.d.ts +0 -4
- package/dist/components/checkbox/index.d.ts.map +0 -1
- package/dist/components/checkbox/index.js +0 -3
- package/dist/components/checkbox/index.js.map +0 -1
- package/dist/components/checkbox/meta.d.ts +0 -17
- package/dist/components/checkbox/meta.d.ts.map +0 -1
- package/dist/components/checkbox/meta.js +0 -17
- package/dist/components/checkbox/meta.js.map +0 -1
- package/dist/components/checkbox/types.d.ts.map +0 -1
- package/dist/components/checkbox/types.js +0 -2
- package/dist/components/checkbox/types.js.map +0 -1
- package/dist/components/input/Input.d.ts +0 -15
- package/dist/components/input/Input.d.ts.map +0 -1
- package/dist/components/input/Input.js.map +0 -1
- package/dist/components/input/index.d.ts +0 -3
- package/dist/components/input/index.d.ts.map +0 -1
- package/dist/components/input/index.js +0 -2
- package/dist/components/input/index.js.map +0 -1
- package/dist/components/input/meta.d.ts.map +0 -1
- package/dist/components/input/meta.js.map +0 -1
- package/dist/components/input/types.d.ts +0 -22
- package/dist/components/input/types.d.ts.map +0 -1
- package/dist/components/input/types.js +0 -2
- package/dist/components/input/types.js.map +0 -1
- package/dist/components/progress/Progress.d.ts.map +0 -1
- package/dist/components/progress/Progress.js.map +0 -1
- package/dist/components/progress/ProgressRing.d.ts.map +0 -1
- package/dist/components/progress/ProgressRing.js.map +0 -1
- package/dist/components/progress/index.d.ts +0 -4
- package/dist/components/progress/index.d.ts.map +0 -1
- package/dist/components/progress/index.js +0 -3
- package/dist/components/progress/index.js.map +0 -1
- package/dist/components/progress/meta.d.ts.map +0 -1
- package/dist/components/progress/meta.js.map +0 -1
- package/dist/components/progress/resolveProgressFraction.d.ts.map +0 -1
- package/dist/components/progress/resolveProgressFraction.js.map +0 -1
- package/dist/components/progress/resolveProgressRingGeometry.d.ts.map +0 -1
- package/dist/components/progress/resolveProgressRingGeometry.js.map +0 -1
- package/dist/components/progress/types.d.ts.map +0 -1
- package/dist/components/progress/types.js.map +0 -1
- package/dist/components/radio/Radio.d.ts.map +0 -1
- package/dist/components/radio/Radio.js.map +0 -1
- package/dist/components/radio/RadioGroup.d.ts.map +0 -1
- package/dist/components/radio/RadioGroup.js.map +0 -1
- package/dist/components/radio/RadioOptionControl.d.ts.map +0 -1
- package/dist/components/radio/RadioOptionControl.js.map +0 -1
- package/dist/components/radio/handleRadioOptionKeyDown.d.ts.map +0 -1
- package/dist/components/radio/handleRadioOptionKeyDown.js.map +0 -1
- package/dist/components/radio/index.d.ts +0 -4
- package/dist/components/radio/index.d.ts.map +0 -1
- package/dist/components/radio/index.js +0 -3
- package/dist/components/radio/index.js.map +0 -1
- package/dist/components/radio/meta.d.ts.map +0 -1
- package/dist/components/radio/meta.js.map +0 -1
- package/dist/components/radio/resolveRadioGroupThemeRecipe.d.ts.map +0 -1
- package/dist/components/radio/resolveRadioGroupThemeRecipe.js.map +0 -1
- package/dist/components/radio/resolveRadioOptionColors.d.ts.map +0 -1
- package/dist/components/radio/resolveRadioOptionColors.js.map +0 -1
- package/dist/components/radio/themeRecipeMeta.d.ts.map +0 -1
- package/dist/components/radio/themeRecipeMeta.js.map +0 -1
- package/dist/components/radio/types.d.ts.map +0 -1
- package/dist/components/radio/types.js +0 -2
- package/dist/components/radio/types.js.map +0 -1
- package/dist/components/textarea/Textarea.d.ts +0 -9
- package/dist/components/textarea/Textarea.d.ts.map +0 -1
- package/dist/components/textarea/Textarea.js +0 -18
- package/dist/components/textarea/Textarea.js.map +0 -1
- package/dist/components/textarea/index.d.ts +0 -3
- package/dist/components/textarea/index.d.ts.map +0 -1
- package/dist/components/textarea/index.js +0 -2
- package/dist/components/textarea/index.js.map +0 -1
- package/dist/components/textarea/meta.d.ts +0 -45
- package/dist/components/textarea/meta.d.ts.map +0 -1
- package/dist/components/textarea/meta.js +0 -45
- package/dist/components/textarea/meta.js.map +0 -1
- package/dist/components/textarea/types.d.ts +0 -9
- package/dist/components/textarea/types.d.ts.map +0 -1
- package/dist/components/textarea/types.js +0 -2
- package/dist/components/textarea/types.js.map +0 -1
- package/dist/patterns/empty-state/EmptyState.d.ts.map +0 -1
- package/dist/patterns/empty-state/EmptyState.js.map +0 -1
- package/dist/patterns/empty-state/index.d.ts +0 -3
- package/dist/patterns/empty-state/index.d.ts.map +0 -1
- package/dist/patterns/empty-state/index.js +0 -2
- package/dist/patterns/empty-state/index.js.map +0 -1
- package/dist/patterns/empty-state/meta.d.ts.map +0 -1
- package/dist/patterns/empty-state/meta.js.map +0 -1
- package/dist/patterns/empty-state/types.d.ts.map +0 -1
- package/dist/patterns/empty-state/types.js +0 -2
- package/dist/patterns/empty-state/types.js.map +0 -1
- package/src/components/checkbox/index.ts +0 -3
- package/src/components/checkbox/meta.ts +0 -19
- package/src/components/input/index.ts +0 -2
- package/src/components/progress/index.ts +0 -3
- package/src/components/radio/index.ts +0 -3
- package/src/components/textarea/Textarea.tsx +0 -46
- package/src/components/textarea/index.ts +0 -2
- package/src/components/textarea/meta.ts +0 -46
- package/src/components/textarea/types.ts +0 -16
- package/src/patterns/empty-state/index.ts +0 -2
- /package/dist/{components → features/form}/radio/themeRecipeMeta.d.ts +0 -0
- /package/dist/{components/radio → features/form/radio/utils}/handleRadioOptionKeyDown.d.ts +0 -0
- /package/dist/{components/radio → features/form/radio/utils}/resolveRadioGroupThemeRecipe.js +0 -0
- /package/dist/{components/radio → features/form/radio/utils}/resolveRadioOptionColors.js +0 -0
- /package/dist/{components/progress → features/progress/utils}/resolveProgressFraction.d.ts +0 -0
- /package/dist/{components/progress → features/progress/utils}/resolveProgressFraction.js +0 -0
- /package/dist/{components/progress → features/progress/utils}/resolveProgressRingGeometry.d.ts +0 -0
- /package/dist/{components/progress → features/progress/utils}/resolveProgressRingGeometry.js +0 -0
- /package/src/{patterns/empty-state/meta.ts → features/empty-state/emptyStateMeta.ts} +0 -0
- /package/src/{components/radio → features/form/radio/utils}/resolveRadioOptionColors.test.ts +0 -0
- /package/src/{components/progress/meta.ts → features/progress/progressMeta.ts} +0 -0
- /package/src/{components/progress → features/progress/utils}/resolveProgressFraction.test.ts +0 -0
- /package/src/{components/progress → features/progress/utils}/resolveProgressFraction.ts +0 -0
- /package/src/{components/progress → features/progress/utils}/resolveProgressRingGeometry.test.ts +0 -0
- /package/src/{components/progress → features/progress/utils}/resolveProgressRingGeometry.ts +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type * as Surface from '@ankhorage/surface';
|
|
2
|
+
import type { ZoraControlSize } from '../internal/recipes';
|
|
3
|
+
import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
|
|
4
|
+
export interface TextInputTrailingAction {
|
|
5
|
+
icon: Surface.ButtonIconSpec;
|
|
6
|
+
label: string;
|
|
7
|
+
onPress: () => void;
|
|
8
|
+
}
|
|
9
|
+
type TextInputTrailingProps = {
|
|
10
|
+
trailingIcon?: Surface.ButtonIconSpec;
|
|
11
|
+
trailingAction?: never;
|
|
12
|
+
} | {
|
|
13
|
+
trailingIcon?: never;
|
|
14
|
+
trailingAction?: TextInputTrailingAction;
|
|
15
|
+
};
|
|
16
|
+
interface TextInputBaseProps extends ZoraBaseProps, Omit<Surface.TextInputProps, 'leadingAccessory' | 'size' | 'trailingAccessory' | 'mode' | 'themeId'> {
|
|
17
|
+
size?: ZoraControlSize;
|
|
18
|
+
leadingIcon?: Surface.ButtonIconSpec;
|
|
19
|
+
}
|
|
20
|
+
export type TextInputProps = TextInputBaseProps & TextInputTrailingProps;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=text-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-input.d.ts","sourceRoot":"","sources":["../../src/types/text-input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAEnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,KAAK,sBAAsB,GACvB;IACE,YAAY,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;IACtC,cAAc,CAAC,EAAE,KAAK,CAAC;CACxB,GACD;IACE,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,cAAc,CAAC,EAAE,uBAAuB,CAAC;CAC1C,CAAC;AAEN,UAAU,kBACR,SACE,aAAa,EACb,IAAI,CACF,OAAO,CAAC,cAAc,EACtB,kBAAkB,GAAG,MAAM,GAAG,mBAAmB,GAAG,MAAM,GAAG,SAAS,CACvE;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;CACtC;AAED,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAAG,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-input.js","sourceRoot":"","sources":["../../src/types/text-input.ts"],"names":[],"mappings":"","sourcesContent":["import type * as Surface from '@ankhorage/surface';\n\nimport type { ZoraControlSize } from '../internal/recipes';\nimport type { ZoraBaseProps } from '../theme/ZoraBaseProps';\n\nexport interface TextInputTrailingAction {\n icon: Surface.ButtonIconSpec;\n label: string;\n onPress: () => void;\n}\n\ntype TextInputTrailingProps =\n | {\n trailingIcon?: Surface.ButtonIconSpec;\n trailingAction?: never;\n }\n | {\n trailingIcon?: never;\n trailingAction?: TextInputTrailingAction;\n };\n\ninterface TextInputBaseProps\n extends\n ZoraBaseProps,\n Omit<\n Surface.TextInputProps,\n 'leadingAccessory' | 'size' | 'trailingAccessory' | 'mode' | 'themeId'\n > {\n size?: ZoraControlSize;\n leadingIcon?: Surface.ButtonIconSpec;\n}\n\nexport type TextInputProps = TextInputBaseProps & TextInputTrailingProps;\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/zora",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "9.0.1",
|
|
5
5
|
"description": "Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/zora#readme",
|
|
7
7
|
"bugs": {
|
package/src/audit.test.ts
CHANGED
|
@@ -139,7 +139,7 @@ describe('Plan 5 audit — product-facing src imports ZORA foundation, not Surfa
|
|
|
139
139
|
join(SRC_ROOT, 'features', 'icon', 'adapters', 'inbound', 'Icon.tsx'),
|
|
140
140
|
join(SRC_ROOT, 'features', 'button', 'adapters', 'inbound', 'IconButton.tsx'),
|
|
141
141
|
join(SRC_ROOT, 'components', 'modal', 'Modal.tsx'),
|
|
142
|
-
join(SRC_ROOT, '
|
|
142
|
+
join(SRC_ROOT, 'features', 'form', 'text-input', 'adapters', 'inbound', 'TextInput.tsx'),
|
|
143
143
|
join(SRC_ROOT, 'features', 'typography', 'adapters', 'inbound', 'Text.tsx'),
|
|
144
144
|
join(SRC_ROOT, 'components', 'form', 'FormField.tsx'),
|
|
145
145
|
join(SRC_ROOT, 'patterns', 'form-field', 'FormField.tsx'),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Field } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
+
import { TextInput } from '../../features/form/text-input/public';
|
|
4
5
|
import { Stack } from '../../features/layout/public';
|
|
5
6
|
import { Text } from '../../features/typography/public';
|
|
6
7
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
7
|
-
import { Input } from '../input';
|
|
8
8
|
import type { FormFieldConfig, FormFieldControlProps, FormFieldProps } from './types';
|
|
9
9
|
import { hasRequiredRule } from './validation';
|
|
10
10
|
|
|
@@ -131,7 +131,7 @@ function FormFieldInner<TName extends string = string>(props: FormFieldProps<TNa
|
|
|
131
131
|
required={required}
|
|
132
132
|
testID={testID ?? field.testID}
|
|
133
133
|
>
|
|
134
|
-
<
|
|
134
|
+
<TextInput
|
|
135
135
|
accessibilityLabel={typeof field.label === 'string' ? field.label : undefined}
|
|
136
136
|
autoCapitalize={resolveAutoCapitalize(field)}
|
|
137
137
|
autoComplete={field.autoComplete}
|
|
@@ -2,7 +2,7 @@ import type { FieldProps as SurfaceFieldProps } from '@ankhorage/surface';
|
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
|
|
4
4
|
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
5
|
-
import type {
|
|
5
|
+
import type { TextInputProps } from '../../types/text-input';
|
|
6
6
|
|
|
7
7
|
export type ValidationRule =
|
|
8
8
|
| { kind: 'required'; message?: string }
|
|
@@ -25,14 +25,14 @@ export interface FormFieldConfig<TName extends string = string> {
|
|
|
25
25
|
type?: FormFieldInputType;
|
|
26
26
|
placeholder?: string;
|
|
27
27
|
rules?: readonly ValidationRule[];
|
|
28
|
-
autoCapitalize?:
|
|
29
|
-
autoComplete?:
|
|
30
|
-
keyboardType?:
|
|
31
|
-
maxLength?:
|
|
28
|
+
autoCapitalize?: TextInputProps['autoCapitalize'];
|
|
29
|
+
autoComplete?: TextInputProps['autoComplete'];
|
|
30
|
+
keyboardType?: TextInputProps['keyboardType'];
|
|
31
|
+
maxLength?: TextInputProps['maxLength'];
|
|
32
32
|
readOnly?: boolean;
|
|
33
33
|
required?: boolean;
|
|
34
34
|
secureTextEntry?: boolean;
|
|
35
|
-
textContentType?:
|
|
35
|
+
textContentType?: TextInputProps['textContentType'];
|
|
36
36
|
disabled?: boolean;
|
|
37
37
|
testID?: string;
|
|
38
38
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
+
import { TextInput, type TextInputTrailingAction } from '../../features/form/text-input/public';
|
|
3
4
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
4
|
-
import { Input, type InputTrailingAction } from '../input';
|
|
5
5
|
import type { SearchBarProps } from './types';
|
|
6
6
|
|
|
7
7
|
function SearchBarInner({
|
|
@@ -21,7 +21,7 @@ function SearchBarInner({
|
|
|
21
21
|
}: SearchBarProps) {
|
|
22
22
|
const passive = interactionPolicy === 'passive';
|
|
23
23
|
|
|
24
|
-
const trailingAction:
|
|
24
|
+
const trailingAction: TextInputTrailingAction | undefined =
|
|
25
25
|
clearable && value.length > 0
|
|
26
26
|
? {
|
|
27
27
|
icon: { name: 'close-circle' },
|
|
@@ -36,7 +36,7 @@ function SearchBarInner({
|
|
|
36
36
|
: undefined;
|
|
37
37
|
|
|
38
38
|
return (
|
|
39
|
-
<
|
|
39
|
+
<TextInput
|
|
40
40
|
disabled={disabled}
|
|
41
41
|
interactionPolicy={interactionPolicy}
|
|
42
42
|
leadingIcon={{ name: 'search-outline' }}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ZoraComponentMeta } from '../../metadata';
|
|
2
|
+
|
|
3
|
+
export const activityIndicatorMeta = {
|
|
4
|
+
name: 'ActivityIndicator',
|
|
5
|
+
category: 'component',
|
|
6
|
+
directManifestNode: true,
|
|
7
|
+
allowedChildren: [],
|
|
8
|
+
blueprint: { label: 'Activity indicator', defaultProps: { size: 'small' } },
|
|
9
|
+
props: {
|
|
10
|
+
size: { type: 'enum', category: 'Style', label: 'Size', enum: ['small', 'large'] },
|
|
11
|
+
color: { type: 'color', category: 'Style', label: 'Color' },
|
|
12
|
+
animating: { type: 'boolean', category: 'State', label: 'Animating', default: true },
|
|
13
|
+
},
|
|
14
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ActivityIndicator as ReactNativeActivityIndicator } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { useZoraTheme } from '../../../../theme/useZoraTheme';
|
|
5
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
6
|
+
import type { ActivityIndicatorProps } from '../../../../types/activity-indicator';
|
|
7
|
+
|
|
8
|
+
/*** Render native loading feedback with a semantic ZORA fallback color. */
|
|
9
|
+
function ActivityIndicatorInner({
|
|
10
|
+
themeId: _themeId,
|
|
11
|
+
mode: _mode,
|
|
12
|
+
color,
|
|
13
|
+
...props
|
|
14
|
+
}: ActivityIndicatorProps) {
|
|
15
|
+
const { theme } = useZoraTheme();
|
|
16
|
+
|
|
17
|
+
return <ReactNativeActivityIndicator {...props} color={color ?? theme.semantics.content.muted} />;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/*** Native activity indicator exposed as a serializable ZORA feedback node. */
|
|
21
|
+
export const ActivityIndicator = withZoraThemeScope(ActivityIndicatorInner);
|
|
@@ -5,7 +5,6 @@ import { ScrollView, type ViewStyle } from 'react-native';
|
|
|
5
5
|
import { DropdownMenu, type MenuAction } from '../../../../components/menu';
|
|
6
6
|
import { SkeletonList } from '../../../../components/skeleton';
|
|
7
7
|
import { Show } from '../../../../foundation';
|
|
8
|
-
import { EmptyState } from '../../../../patterns/empty-state';
|
|
9
8
|
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
10
9
|
import type {
|
|
11
10
|
DataTableCellContext,
|
|
@@ -19,6 +18,7 @@ import type {
|
|
|
19
18
|
import { Button } from '../../../button/public';
|
|
20
19
|
import { IconButton } from '../../../button/public';
|
|
21
20
|
import { Card } from '../../../card/public';
|
|
21
|
+
import { EmptyState } from '../../../empty-state/public';
|
|
22
22
|
import { Box, Stack } from '../../../layout/public';
|
|
23
23
|
import { Text, type TextAlign } from '../../../typography/public';
|
|
24
24
|
import { resolveDataTableRowKey } from '../../utils/resolveDataTableRowKey';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
3
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
4
|
+
import type { EmptyStateProps } from '../../../../types/empty-state';
|
|
5
|
+
import { Button } from '../../../button/public';
|
|
6
|
+
import { Card } from '../../../card/public';
|
|
7
|
+
import { Stack } from '../../../layout/public';
|
|
8
8
|
|
|
9
9
|
function EmptyStateInner({
|
|
10
10
|
themeId: _themeId,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Checkbox as SurfaceCheckbox } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
-
import { withZoraThemeScope } from '
|
|
5
|
-
import type { CheckboxProps } from '
|
|
4
|
+
import { withZoraThemeScope } from '../../../../../theme/withZoraThemeScope';
|
|
5
|
+
import type { CheckboxProps } from '../../../../../types/checkbox';
|
|
6
6
|
|
|
7
7
|
function CheckboxInner({
|
|
8
8
|
themeId: _themeId,
|
package/src/{components/checkbox → features/form/checkbox/adapters/inbound}/CheckboxGroup.tsx
RENAMED
|
@@ -2,10 +2,10 @@ import { Checkbox } from '@ankhorage/surface';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { View } from 'react-native';
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
5
|
+
import { withZoraThemeScope } from '../../../../../theme/withZoraThemeScope';
|
|
6
|
+
import type { CheckboxGroupOption, CheckboxGroupProps } from '../../../../../types/checkbox';
|
|
7
|
+
import { Stack } from '../../../../layout/public';
|
|
8
|
+
import { Text } from '../../../../typography/public';
|
|
9
9
|
|
|
10
10
|
function CheckboxGroupInner<TValue extends string>({
|
|
11
11
|
themeId: _themeId,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ZoraComponentMeta } from '../../../metadata';
|
|
2
|
+
|
|
3
|
+
export const checkboxMeta = {
|
|
4
|
+
name: 'Checkbox',
|
|
5
|
+
category: 'component',
|
|
6
|
+
directManifestNode: true,
|
|
7
|
+
allowedChildren: [],
|
|
8
|
+
blueprint: { label: 'Checkbox', defaultProps: { label: 'Option', checked: false } },
|
|
9
|
+
props: {
|
|
10
|
+
label: { type: 'string', category: 'Content', label: 'Label' },
|
|
11
|
+
checked: { type: 'boolean', category: 'State', label: 'Checked', default: false },
|
|
12
|
+
disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },
|
|
13
|
+
},
|
|
14
|
+
} as const satisfies ZoraComponentMeta;
|
|
15
|
+
|
|
16
|
+
export const checkboxGroupMeta = {
|
|
17
|
+
name: 'CheckboxGroup',
|
|
18
|
+
category: 'component',
|
|
19
|
+
directManifestNode: true,
|
|
20
|
+
allowedChildren: [],
|
|
21
|
+
blueprint: {
|
|
22
|
+
label: 'Checkbox group',
|
|
23
|
+
defaultProps: { value: [], options: [{ value: 'option-a', label: 'First option' }] },
|
|
24
|
+
},
|
|
25
|
+
props: {
|
|
26
|
+
value: { type: 'array', category: 'State', label: 'Value' },
|
|
27
|
+
options: { type: 'array', category: 'Content', label: 'Options' },
|
|
28
|
+
disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },
|
|
29
|
+
},
|
|
30
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Radio as SurfaceRadio } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
-
import { withZoraThemeScope } from '
|
|
5
|
-
import type { RadioProps } from '
|
|
4
|
+
import { withZoraThemeScope } from '../../../../../theme/withZoraThemeScope';
|
|
5
|
+
import type { RadioProps } from '../../../../../types/radio';
|
|
6
6
|
|
|
7
7
|
function RadioInner({ themeId: _themeId, mode: _mode, interactionPolicy, ...props }: RadioProps) {
|
|
8
8
|
return <SurfaceRadio {...props} interactionPolicy={interactionPolicy} />;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { expect, test } from 'bun:test';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { radioGroupMeta } from '../../radioMeta';
|
|
4
|
+
import { resolveRadioGroupThemeRecipe } from '../../utils/resolveRadioGroupThemeRecipe';
|
|
4
5
|
|
|
5
6
|
test('resolves RadioGroup theme defaults while preserving instance overrides', () => {
|
|
6
7
|
expect(resolveRadioGroupThemeRecipe({ themeFields: {} })).toEqual({
|
|
@@ -19,8 +20,7 @@ test('resolves RadioGroup theme defaults while preserving instance overrides', (
|
|
|
19
20
|
).toEqual({ gap: 'l', color: 'danger', size: 's' });
|
|
20
21
|
});
|
|
21
22
|
|
|
22
|
-
test('icon radio options expose serializable authoring metadata',
|
|
23
|
-
const { radioGroupMeta } = await import('./meta');
|
|
23
|
+
test('icon radio options expose serializable authoring metadata', () => {
|
|
24
24
|
expect(radioGroupMeta.directManifestNode).toBe(true);
|
|
25
25
|
expect(radioGroupMeta.blueprint.label).toBe('Radio button group');
|
|
26
26
|
expect(radioGroupMeta.blueprint.defaultProps.options.map((option) => option.value)).toContain(
|
|
@@ -2,13 +2,13 @@ import { Radio } from '@ankhorage/surface';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { StyleSheet, View } from 'react-native';
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { useZoraThemeRecipe } from '../../../../../theme/useZoraThemeRecipe';
|
|
6
|
+
import { withZoraThemeScope } from '../../../../../theme/withZoraThemeScope';
|
|
7
|
+
import type { RadioGroupProps } from '../../../../../types/radio';
|
|
8
|
+
import { Stack } from '../../../../layout/public';
|
|
9
|
+
import { Text } from '../../../../typography/public';
|
|
10
|
+
import { resolveRadioGroupThemeRecipe } from '../../utils/resolveRadioGroupThemeRecipe';
|
|
9
11
|
import { RadioOptionControl } from './RadioOptionControl';
|
|
10
|
-
import { resolveRadioGroupThemeRecipe } from './resolveRadioGroupThemeRecipe';
|
|
11
|
-
import type { RadioGroupProps } from './types';
|
|
12
12
|
|
|
13
13
|
/*** Present one controlled single-choice group as inline radios or icon radio options. */
|
|
14
14
|
export const RadioGroup = withZoraThemeScope(RadioGroupInner);
|
package/src/{components/radio → features/form/radio/adapters/inbound}/RadioOptionControl.tsx
RENAMED
|
@@ -2,14 +2,14 @@ import { useTheme } from '@ankhorage/surface';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Platform, Pressable, StyleSheet, View } from 'react-native';
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import type { RadioGroupProps } from '../../../../../types/radio';
|
|
6
|
+
import { Icon } from '../../../../icon/public';
|
|
7
|
+
import { Text } from '../../../../typography/public';
|
|
7
8
|
import {
|
|
8
9
|
handleRadioOptionKeyDown,
|
|
9
10
|
type RadioOptionKeyboardTarget,
|
|
10
|
-
} from '
|
|
11
|
-
import { resolveRadioOptionColors } from '
|
|
12
|
-
import type { RadioGroupProps } from './types';
|
|
11
|
+
} from '../../utils/handleRadioOptionKeyDown';
|
|
12
|
+
import { resolveRadioOptionColors } from '../../utils/resolveRadioOptionColors';
|
|
13
13
|
|
|
14
14
|
/*** Render a selectable icon radio option with one accessible radio target and a trailing check. */
|
|
15
15
|
export function RadioOptionControl<TValue extends string>(props: RadioOptionControlProps<TValue>) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ZORA_COLORS } from '
|
|
2
|
-
import type { ZoraComponentMeta } from '
|
|
1
|
+
import { ZORA_COLORS } from '../../../internal/colorModel';
|
|
2
|
+
import type { ZoraComponentMeta } from '../../../metadata';
|
|
3
3
|
|
|
4
4
|
const themeAuthoring = {
|
|
5
5
|
authority: 'theme',
|
|
@@ -10,10 +10,14 @@ const themeAuthoring = {
|
|
|
10
10
|
export const radioMeta = {
|
|
11
11
|
name: 'Radio',
|
|
12
12
|
category: 'component',
|
|
13
|
-
directManifestNode:
|
|
13
|
+
directManifestNode: true,
|
|
14
14
|
allowedChildren: [],
|
|
15
|
-
|
|
16
|
-
props: {
|
|
15
|
+
blueprint: { label: 'Radio', defaultProps: { label: 'Option', checked: false } },
|
|
16
|
+
props: {
|
|
17
|
+
label: { type: 'string', category: 'Content', label: 'Label' },
|
|
18
|
+
checked: { type: 'boolean', category: 'State', label: 'Checked', default: false },
|
|
19
|
+
disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },
|
|
20
|
+
},
|
|
17
21
|
} as const satisfies ZoraComponentMeta;
|
|
18
22
|
|
|
19
23
|
export const radioGroupMeta = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ZORA_COLORS } from '
|
|
2
|
-
import type { ZoraThemeRecipeMeta } from '
|
|
1
|
+
import { ZORA_COLORS } from '../../../internal/colorModel';
|
|
2
|
+
import type { ZoraThemeRecipeMeta } from '../../../metadata/themeRecipeTypes';
|
|
3
3
|
|
|
4
4
|
export const radioGroupThemeRecipeMeta = {
|
|
5
5
|
name: 'RadioGroup',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { expect, test } from 'bun:test';
|
|
2
2
|
import type { KeyboardEvent } from 'react';
|
|
3
3
|
|
|
4
|
-
import { DIRECTION_MODIFIERS } from '
|
|
4
|
+
import { DIRECTION_MODIFIERS } from '../../../../constants/keyboard';
|
|
5
5
|
import {
|
|
6
6
|
handleRadioOptionKeyDown,
|
|
7
7
|
type RadioOptionKeyboardTarget,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { KeyboardEvent } from 'react';
|
|
2
2
|
|
|
3
|
-
import { DIRECTION_MODIFIERS } from '
|
|
3
|
+
import { DIRECTION_MODIFIERS } from '../../../../constants/keyboard';
|
|
4
4
|
|
|
5
5
|
/*** Support Space and directional navigation for web radio options without affecting native presses. */
|
|
6
6
|
export function handleRadioOptionKeyDown(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ThemeRecipeOverrideValue } from '@ankhorage/contracts';
|
|
2
2
|
|
|
3
|
-
import type { ZoraColor } from '
|
|
4
|
-
import type { RadioGroupProps } from '
|
|
3
|
+
import type { ZoraColor } from '../../../../internal/colorModel';
|
|
4
|
+
import type { RadioGroupProps } from '../../../../types/radio';
|
|
5
5
|
|
|
6
6
|
type RadioGroupGap = NonNullable<RadioGroupProps<string>['gap']>;
|
|
7
7
|
type RadioGroupSize = NonNullable<RadioGroupProps<string>['size']>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RoleSemantics, SurfaceTheme } from '@ankhorage/surface';
|
|
2
2
|
|
|
3
|
-
import type { RadioGroupProps } from '
|
|
3
|
+
import type { RadioGroupProps } from '../../../../types/radio';
|
|
4
4
|
|
|
5
5
|
/*** Resolve selection-card decoration from the requested semantic role and field state. */
|
|
6
6
|
export function resolveRadioOptionColors(
|
package/src/{components/input/Input.tsx → features/form/text-input/adapters/inbound/TextInput.tsx}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as Surface from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
4
|
+
import { resolveIconSize } from '../../../../../internal/recipes';
|
|
5
|
+
import { useZoraTheme } from '../../../../../theme/useZoraTheme';
|
|
6
|
+
import { withZoraThemeScope } from '../../../../../theme/withZoraThemeScope';
|
|
7
|
+
import type { TextInputProps } from '../../../../../types/text-input';
|
|
8
|
+
import { IconButton } from '../../../../button/public';
|
|
9
9
|
|
|
10
|
-
function
|
|
10
|
+
function TextInputInner({
|
|
11
11
|
themeId: _themeId,
|
|
12
12
|
mode: _mode,
|
|
13
13
|
size = 'l',
|
|
@@ -18,7 +18,7 @@ function InputInner({
|
|
|
18
18
|
readOnly,
|
|
19
19
|
interactionPolicy,
|
|
20
20
|
...props
|
|
21
|
-
}:
|
|
21
|
+
}: TextInputProps) {
|
|
22
22
|
const { theme } = useZoraTheme();
|
|
23
23
|
const iconSize = resolveIconSize(size);
|
|
24
24
|
const iconColor = theme.semantics.content.muted;
|
|
@@ -58,12 +58,11 @@ function InputInner({
|
|
|
58
58
|
/***
|
|
59
59
|
* Theme-aware text input with semantic sizing and optional leading/trailing icon slots.
|
|
60
60
|
*
|
|
61
|
-
* Use `
|
|
62
|
-
* handling, and accessible trailing actions without dropping into Surface directly.
|
|
61
|
+
* Use `TextInput` for single-line, multiline, and password form controls with ZORA styling.
|
|
63
62
|
*
|
|
64
63
|
* @example Search input
|
|
65
64
|
* ```tsx
|
|
66
|
-
* <
|
|
65
|
+
* <TextInput placeholder="Search" leadingIcon={{ name: 'search-outline' }} />
|
|
67
66
|
* ```
|
|
68
67
|
*/
|
|
69
|
-
export const
|
|
68
|
+
export const TextInput = withZoraThemeScope(TextInputInner);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { ZoraComponentMeta } from '
|
|
1
|
+
import type { ZoraComponentMeta } from '../../../metadata';
|
|
2
2
|
|
|
3
|
-
export const
|
|
4
|
-
name: '
|
|
3
|
+
export const textInputMeta = {
|
|
4
|
+
name: 'TextInput',
|
|
5
5
|
category: 'component',
|
|
6
6
|
directManifestNode: true,
|
|
7
7
|
allowedChildren: [],
|
|
8
8
|
blueprint: {
|
|
9
|
-
label: '
|
|
9
|
+
label: 'Text input',
|
|
10
10
|
defaultProps: {
|
|
11
11
|
placeholder: 'Enter text…',
|
|
12
12
|
value: '',
|
|
@@ -42,5 +42,17 @@ export const inputMeta = {
|
|
|
42
42
|
label: 'Read-only',
|
|
43
43
|
default: false,
|
|
44
44
|
},
|
|
45
|
+
multiline: {
|
|
46
|
+
type: 'boolean',
|
|
47
|
+
category: 'Layout',
|
|
48
|
+
label: 'Multiline',
|
|
49
|
+
default: false,
|
|
50
|
+
},
|
|
51
|
+
secureTextEntry: {
|
|
52
|
+
type: 'boolean',
|
|
53
|
+
category: 'State',
|
|
54
|
+
label: 'Secure text entry',
|
|
55
|
+
default: false,
|
|
56
|
+
},
|
|
45
57
|
},
|
|
46
58
|
} as const satisfies ZoraComponentMeta;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { useZoraTheme } from '../../../../theme/useZoraTheme';
|
|
4
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
5
|
+
import { type ProgressProps, resolveProgressRole } from '../../../../types/progress';
|
|
6
|
+
import { Box } from '../../../layout/public';
|
|
7
|
+
import { resolveProgressFraction } from '../../utils/resolveProgressFraction';
|
|
8
8
|
|
|
9
9
|
function resolveProgressHeight(size: NonNullable<ProgressProps['size']>): number {
|
|
10
10
|
switch (size) {
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import { describe, expect, test } from 'bun:test';
|
|
2
2
|
|
|
3
|
-
import { progressRingMeta } from '
|
|
3
|
+
import { progressRingMeta } from '../../progressMeta';
|
|
4
4
|
|
|
5
5
|
describe('ProgressRing public contract', () => {
|
|
6
6
|
test('is exported from the component and package entrypoints', async () => {
|
|
7
7
|
const [componentIndex, rootIndex] = await Promise.all([
|
|
8
|
-
Bun.file('src/
|
|
8
|
+
Bun.file('src/features/progress/public.ts').text(),
|
|
9
9
|
Bun.file('src/index.ts').text(),
|
|
10
10
|
]);
|
|
11
11
|
|
|
12
|
-
expect(componentIndex).toContain(
|
|
12
|
+
expect(componentIndex).toContain(
|
|
13
|
+
"export { ProgressRing } from './adapters/inbound/ProgressRing';",
|
|
14
|
+
);
|
|
13
15
|
expect(componentIndex).toContain('ProgressRingProps');
|
|
14
|
-
expect(rootIndex).toContain("
|
|
15
|
-
expect(rootIndex).toContain('ProgressProps
|
|
16
|
+
expect(rootIndex).toContain("} from './features/progress/public';");
|
|
17
|
+
expect(rootIndex).toContain('type ProgressProps');
|
|
18
|
+
expect(rootIndex).toContain('type ProgressRingProps');
|
|
16
19
|
});
|
|
17
20
|
|
|
18
21
|
test('exposes native progress semantics and uses canonical normalization and colors', async () => {
|
|
19
|
-
const source = await Bun.file('src/
|
|
22
|
+
const source = await Bun.file('src/features/progress/adapters/inbound/ProgressRing.tsx').text();
|
|
20
23
|
|
|
21
24
|
expect(source).toContain('accessibilityRole="progressbar"');
|
|
22
25
|
expect(source).toContain('accessibilityValue={{');
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
4
|
+
import { useZoraTheme } from '../../../../theme/useZoraTheme';
|
|
5
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
6
|
+
import { type ProgressRingProps, resolveProgressRole } from '../../../../types/progress';
|
|
7
|
+
import { Stack } from '../../../layout/public';
|
|
8
|
+
import { Text } from '../../../typography/public';
|
|
9
|
+
import { resolveProgressFraction } from '../../utils/resolveProgressFraction';
|
|
10
|
+
import { resolveProgressRingGeometry } from '../../utils/resolveProgressRingGeometry';
|
|
11
11
|
|
|
12
12
|
function ProgressRingInner({
|
|
13
13
|
themeId: _themeId,
|