@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 @@
|
|
|
1
|
+
{"version":3,"file":"resolveRadioGroupThemeRecipe.js","sourceRoot":"","sources":["../../../../../src/features/form/radio/utils/resolveRadioGroupThemeRecipe.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,UAAU,4BAA4B,CAAC,KAK5C;IACC,OAAO;QACL,GAAG,EAAE,KAAK,CAAC,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,GAAG;QACvD,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,SAAS;QACrE,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,GAAG;KACnD,CAAC;AACb,CAAC;AAED,+DAA+D;AAC/D,SAAS,OAAO,CAAC,KAA2C;IAC1D,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,GAAG;QAAE,OAAO,KAAK,CAAC;IACpF,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,2DAA2D;AAC3D,SAAS,SAAS,CAAC,KAA2C;IAC5D,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,UAAU;QAAE,OAAO,KAAK,CAAC;IACvF,IAAI,KAAK,KAAK,YAAY,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtF,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;QACxF,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,wEAAwE;AACxE,SAAS,QAAQ,CAAC,KAA2C;IAC3D,IAAI,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,GAAG;QAAE,OAAO,KAAK,CAAC;IAClE,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import type { ThemeRecipeOverrideValue } from '@ankhorage/contracts';\n\nimport type { ZoraColor } from '../../../../internal/colorModel';\nimport type { RadioGroupProps } from '../../../../types/radio';\n\ntype RadioGroupGap = NonNullable<RadioGroupProps<string>['gap']>;\ntype RadioGroupSize = NonNullable<RadioGroupProps<string>['size']>;\n\n/***\n * Resolves RadioGroup presentation props from instance overrides and the active theme recipe.\n */\nexport function resolveRadioGroupThemeRecipe(input: {\n readonly gap?: RadioGroupGap;\n readonly color?: ZoraColor;\n readonly size?: RadioGroupSize;\n readonly themeFields: Readonly<Record<string, ThemeRecipeOverrideValue>>;\n}) {\n return {\n gap: input.gap ?? readGap(input.themeFields.gap) ?? 's',\n color: input.color ?? readColor(input.themeFields.color) ?? 'primary',\n size: input.size ?? readSize(input.themeFields.size) ?? 'm',\n } as const;\n}\n\n/*** Reads a valid RadioGroup gap from a theme recipe value. */\nfunction readGap(value: ThemeRecipeOverrideValue | undefined): RadioGroupGap | undefined {\n if (value === 'xs' || value === 's' || value === 'm' || value === 'l') return value;\n return undefined;\n}\n\n/*** Reads a valid ZORA color from a theme recipe value. */\nfunction readColor(value: ThemeRecipeOverrideValue | undefined): ZoraColor | undefined {\n if (value === 'primary' || value === 'secondary' || value === 'tertiary') return value;\n if (value === 'quaternary' || value === 'neutral' || value === 'danger') return value;\n if (value === 'success' || value === 'warning' || value === 'error' || value === 'info') {\n return value;\n }\n return undefined;\n}\n\n/*** Reads a valid RadioGroup control size from a theme recipe value. */\nfunction readSize(value: ThemeRecipeOverrideValue | undefined): RadioGroupSize | undefined {\n if (value === 's' || value === 'm' || value === 'l') return value;\n return undefined;\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SurfaceTheme } from '@ankhorage/surface';
|
|
2
|
-
import type { RadioGroupProps } from '
|
|
2
|
+
import type { RadioGroupProps } from '../../../../types/radio';
|
|
3
3
|
/*** Resolve selection-card decoration from the requested semantic role and field state. */
|
|
4
4
|
export declare function resolveRadioOptionColors(theme: SurfaceTheme, { color, invalid, disabled, }: Pick<RadioGroupProps<string>, 'color' | 'invalid' | 'disabled'>): {
|
|
5
5
|
accent: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveRadioOptionColors.d.ts","sourceRoot":"","sources":["../../../../../src/features/form/radio/utils/resolveRadioOptionColors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,2FAA2F;AAC3F,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,YAAY,EACnB,EACE,KAAiB,EACjB,OAAO,EACP,QAAQ,GACT,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC;;;;;EAyBnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveRadioOptionColors.js","sourceRoot":"","sources":["../../../../../src/features/form/radio/utils/resolveRadioOptionColors.ts"],"names":[],"mappings":"AAIA,2FAA2F;AAC3F,MAAM,UAAU,wBAAwB,CACtC,KAAmB,EACnB,EACE,KAAK,GAAG,SAAS,EACjB,OAAO,EACP,QAAQ,GACwD;IAElE,MAAM,KAAK,GAAG,IAAI,GAAG,CAAwB;QAC3C,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;QAC3C,CAAC,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;QACxC,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;QACpC,CAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;QACzC,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;QAC3C,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;QACzC,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC;QAChC,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC;QACpC,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC;QACpC,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC;KAC/B,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;IACpF,OAAO;QACL,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI;QAC/D,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW;QACxE,MAAM,EAAE,QAAQ;YACd,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM;YAC/B,CAAC,CAAC,OAAO;gBACP,CAAC,CAAC,IAAI,CAAC,OAAO;gBACd,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO;QACpC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO;KACvF,CAAC;AACJ,CAAC","sourcesContent":["import type { RoleSemantics, SurfaceTheme } from '@ankhorage/surface';\n\nimport type { RadioGroupProps } from '../../../../types/radio';\n\n/*** Resolve selection-card decoration from the requested semantic role and field state. */\nexport function resolveRadioOptionColors(\n theme: SurfaceTheme,\n {\n color = 'primary',\n invalid,\n disabled,\n }: Pick<RadioGroupProps<string>, 'color' | 'invalid' | 'disabled'>,\n) {\n const roles = new Map<string, RoleSemantics>([\n ['primary', theme.semantics.action.primary],\n ['secondary', theme.semantics.secondary],\n ['tertiary', theme.semantics.accent],\n ['quaternary', theme.semantics.highlight],\n ['neutral', theme.semantics.action.neutral],\n ['danger', theme.semantics.action.danger],\n ['error', theme.semantics.error],\n ['success', theme.semantics.success],\n ['warning', theme.semantics.warning],\n ['info', theme.semantics.info],\n ]);\n const role = roles.get(invalid ? 'error' : color) ?? theme.semantics.action.primary;\n return {\n accent: disabled ? theme.semantics.content.disabled : role.base,\n onAccent: disabled ? theme.semantics.surface.disabled : role.onSolidText,\n border: disabled\n ? theme.semantics.border.subtle\n : invalid\n ? role.outline\n : theme.semantics.border.default,\n surface: disabled ? theme.semantics.surface.disabled : theme.semantics.surface.default,\n };\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TextInputProps } from '../../../../../types/text-input';
|
|
3
|
+
/***
|
|
4
|
+
* Theme-aware text input with semantic sizing and optional leading/trailing icon slots.
|
|
5
|
+
*
|
|
6
|
+
* Use `TextInput` for single-line, multiline, and password form controls with ZORA styling.
|
|
7
|
+
*
|
|
8
|
+
* @example Search input
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <TextInput placeholder="Search" leadingIcon={{ name: 'search-outline' }} />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare const TextInput: (props: TextInputProps) => React.ReactElement | null;
|
|
14
|
+
//# sourceMappingURL=TextInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../../../src/features/form/text-input/adapters/inbound/TextInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAmDtE;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS,sDAAqC,CAAC"}
|
package/dist/{components/input/Input.js → features/form/text-input/adapters/inbound/TextInput.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as Surface from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
function
|
|
3
|
+
import { resolveIconSize } from '../../../../../internal/recipes';
|
|
4
|
+
import { useZoraTheme } from '../../../../../theme/useZoraTheme';
|
|
5
|
+
import { withZoraThemeScope } from '../../../../../theme/withZoraThemeScope';
|
|
6
|
+
import { IconButton } from '../../../../button/public';
|
|
7
|
+
function TextInputInner({ themeId: _themeId, mode: _mode, size = 'l', leadingIcon, trailingIcon, trailingAction, disabled, readOnly, interactionPolicy, ...props }) {
|
|
8
8
|
const { theme } = useZoraTheme();
|
|
9
9
|
const iconSize = resolveIconSize(size);
|
|
10
10
|
const iconColor = theme.semantics.content.muted;
|
|
@@ -13,13 +13,12 @@ function InputInner({ themeId: _themeId, mode: _mode, size = 'l', leadingIcon, t
|
|
|
13
13
|
/***
|
|
14
14
|
* Theme-aware text input with semantic sizing and optional leading/trailing icon slots.
|
|
15
15
|
*
|
|
16
|
-
* Use `
|
|
17
|
-
* handling, and accessible trailing actions without dropping into Surface directly.
|
|
16
|
+
* Use `TextInput` for single-line, multiline, and password form controls with ZORA styling.
|
|
18
17
|
*
|
|
19
18
|
* @example Search input
|
|
20
19
|
* ```tsx
|
|
21
|
-
* <
|
|
20
|
+
* <TextInput placeholder="Search" leadingIcon={{ name: 'search-outline' }} />
|
|
22
21
|
* ```
|
|
23
22
|
*/
|
|
24
|
-
export const
|
|
25
|
-
//# sourceMappingURL=
|
|
23
|
+
export const TextInput = withZoraThemeScope(TextInputInner);
|
|
24
|
+
//# sourceMappingURL=TextInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../../../../src/features/form/text-input/adapters/inbound/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE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,IAAI,QAAQ,CAAC,CAC/B,OAAO,CAAC,OAAO,CACf,IAAI,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAChC,KAAK,CAAC,SAAS,CACf,OAAO,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,EAChC,CACH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CACjB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAG,CACrE,CAAC,CAAC,CAAC,SACN,CAAC,EACD,CACH,CAAC;AACJ,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC","sourcesContent":["import * as Surface from '@ankhorage/surface';\nimport React from 'react';\n\nimport { resolveIconSize } from '../../../../../internal/recipes';\nimport { useZoraTheme } from '../../../../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../../../../theme/withZoraThemeScope';\nimport type { TextInputProps } from '../../../../../types/text-input';\nimport { IconButton } from '../../../../button/public';\n\nfunction TextInputInner({\n themeId: _themeId,\n mode: _mode,\n size = 'l',\n leadingIcon,\n trailingIcon,\n trailingAction,\n disabled,\n readOnly,\n interactionPolicy,\n ...props\n}: TextInputProps) {\n const { theme } = useZoraTheme();\n const iconSize = resolveIconSize(size);\n const iconColor = theme.semantics.content.muted;\n\n return (\n <Surface.TextInput\n {...props}\n disabled={disabled}\n interactionPolicy={interactionPolicy}\n leadingAccessory={\n leadingIcon ? (\n <Surface.Icon {...leadingIcon} color={iconColor} size={iconSize} />\n ) : undefined\n }\n readOnly={readOnly}\n size={size}\n trailingAccessory={\n trailingAction ? (\n <IconButton\n icon={trailingAction.icon}\n interactionPolicy={interactionPolicy}\n label={trailingAction.label}\n disabled={disabled ?? readOnly}\n variant=\"ghost\"\n size={size === 'l' ? 'm' : size}\n color=\"neutral\"\n onPress={trailingAction.onPress}\n />\n ) : trailingIcon ? (\n <Surface.Icon {...trailingIcon} color={iconColor} size={iconSize} />\n ) : undefined\n }\n />\n );\n}\n\n/***\n * Theme-aware text input with semantic sizing and optional leading/trailing icon slots.\n *\n * Use `TextInput` for single-line, multiline, and password form controls with ZORA styling.\n *\n * @example Search input\n * ```tsx\n * <TextInput placeholder=\"Search\" leadingIcon={{ name: 'search-outline' }} />\n * ```\n */\nexport const TextInput = withZoraThemeScope(TextInputInner);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../../src/features/form/text-input/public.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../../../src/features/form/text-input/public.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC","sourcesContent":["export type { TextInputProps, TextInputTrailingAction } from '../../../types/text-input';\nexport { TextInput } from './adapters/inbound/TextInput';\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
readonly name: "
|
|
1
|
+
export declare const textInputMeta: {
|
|
2
|
+
readonly name: "TextInput";
|
|
3
3
|
readonly category: "component";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
5
|
readonly allowedChildren: readonly [];
|
|
6
6
|
readonly blueprint: {
|
|
7
|
-
readonly label: "
|
|
7
|
+
readonly label: "Text input";
|
|
8
8
|
readonly defaultProps: {
|
|
9
9
|
readonly placeholder: "Enter text…";
|
|
10
10
|
readonly value: "";
|
|
@@ -40,6 +40,18 @@ export declare const inputMeta: {
|
|
|
40
40
|
readonly label: "Read-only";
|
|
41
41
|
readonly default: false;
|
|
42
42
|
};
|
|
43
|
+
readonly multiline: {
|
|
44
|
+
readonly type: "boolean";
|
|
45
|
+
readonly category: "Layout";
|
|
46
|
+
readonly label: "Multiline";
|
|
47
|
+
readonly default: false;
|
|
48
|
+
};
|
|
49
|
+
readonly secureTextEntry: {
|
|
50
|
+
readonly type: "boolean";
|
|
51
|
+
readonly category: "State";
|
|
52
|
+
readonly label: "Secure text entry";
|
|
53
|
+
readonly default: false;
|
|
54
|
+
};
|
|
43
55
|
};
|
|
44
56
|
};
|
|
45
|
-
//# sourceMappingURL=
|
|
57
|
+
//# sourceMappingURL=textInputMeta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textInputMeta.d.ts","sourceRoot":"","sources":["../../../../src/features/form/text-input/textInputMeta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDY,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export const
|
|
2
|
-
name: '
|
|
1
|
+
export const textInputMeta = {
|
|
2
|
+
name: 'TextInput',
|
|
3
3
|
category: 'component',
|
|
4
4
|
directManifestNode: true,
|
|
5
5
|
allowedChildren: [],
|
|
6
6
|
blueprint: {
|
|
7
|
-
label: '
|
|
7
|
+
label: 'Text input',
|
|
8
8
|
defaultProps: {
|
|
9
9
|
placeholder: 'Enter text…',
|
|
10
10
|
value: '',
|
|
@@ -40,6 +40,18 @@ export const inputMeta = {
|
|
|
40
40
|
label: 'Read-only',
|
|
41
41
|
default: false,
|
|
42
42
|
},
|
|
43
|
+
multiline: {
|
|
44
|
+
type: 'boolean',
|
|
45
|
+
category: 'Layout',
|
|
46
|
+
label: 'Multiline',
|
|
47
|
+
default: false,
|
|
48
|
+
},
|
|
49
|
+
secureTextEntry: {
|
|
50
|
+
type: 'boolean',
|
|
51
|
+
category: 'State',
|
|
52
|
+
label: 'Secure text entry',
|
|
53
|
+
default: false,
|
|
54
|
+
},
|
|
43
55
|
},
|
|
44
56
|
};
|
|
45
|
-
//# sourceMappingURL=
|
|
57
|
+
//# sourceMappingURL=textInputMeta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textInputMeta.js","sourceRoot":"","sources":["../../../../src/features/form/text-input/textInputMeta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,EAAE;IACnB,SAAS,EAAE;QACT,KAAK,EAAE,YAAY;QACnB,YAAY,EAAE;YACZ,WAAW,EAAE,aAAa;YAC1B,KAAK,EAAE,EAAE;SACV;KACF;IACD,KAAK,EAAE;QACL,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,aAAa;SACrB;QACD,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,OAAO;YACd,OAAO,EAAE,EAAE;SACZ;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,MAAM;YACb,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;SACtB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,KAAK;SACf;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,KAAK;SACf;QACD,SAAS,EAAE;YACT,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,KAAK;SACf;QACD,eAAe,EAAE;YACf,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,mBAAmB;YAC1B,OAAO,EAAE,KAAK;SACf;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../../metadata';\n\nexport const textInputMeta = {\n name: 'TextInput',\n category: 'component',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Text input',\n defaultProps: {\n placeholder: 'Enter text…',\n value: '',\n },\n },\n props: {\n placeholder: {\n type: 'string',\n category: 'Content',\n label: 'Placeholder',\n },\n value: {\n type: 'string',\n category: 'Content',\n label: 'Value',\n default: '',\n },\n size: {\n type: 'enum',\n category: 'Style',\n label: 'Size',\n enum: ['s', 'm', 'l'],\n },\n disabled: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n default: false,\n },\n readOnly: {\n type: 'boolean',\n category: 'State',\n label: 'Read-only',\n default: false,\n },\n multiline: {\n type: 'boolean',\n category: 'Layout',\n label: 'Multiline',\n default: false,\n },\n secureTextEntry: {\n type: 'boolean',\n category: 'State',\n label: 'Secure text entry',\n default: false,\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -2,7 +2,7 @@ export declare const boxMeta: {
|
|
|
2
2
|
readonly name: "Box";
|
|
3
3
|
readonly category: "foundation";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
6
6
|
readonly props: {
|
|
7
7
|
readonly bg: {
|
|
8
8
|
readonly type: "color";
|
|
@@ -2,7 +2,7 @@ export declare const containerMeta: {
|
|
|
2
2
|
readonly name: "Container";
|
|
3
3
|
readonly category: "foundation";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
6
6
|
readonly props: {
|
|
7
7
|
[k: string]: {
|
|
8
8
|
readonly type: "spacing";
|
|
@@ -2,7 +2,7 @@ export declare const gridMeta: {
|
|
|
2
2
|
readonly name: "Grid";
|
|
3
3
|
readonly category: "foundation";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
6
6
|
readonly props: {
|
|
7
7
|
readonly cols: {
|
|
8
8
|
readonly type: "number";
|
|
@@ -2,7 +2,7 @@ export declare const stackMeta: {
|
|
|
2
2
|
readonly name: "Stack";
|
|
3
3
|
readonly category: "foundation";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
6
6
|
readonly props: {
|
|
7
7
|
readonly direction: {
|
|
8
8
|
readonly type: "enum";
|
|
@@ -5,7 +5,7 @@ export declare const flatListMeta: {
|
|
|
5
5
|
readonly blueprint: {
|
|
6
6
|
readonly label: "Flat list";
|
|
7
7
|
};
|
|
8
|
-
readonly allowedChildren: readonly ["Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "
|
|
8
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
9
9
|
readonly description: "Virtualized children. Put node.repeat on this list for keyed data and item bindings; bind selection on the child Button/Card press event. Bound the list viewport and avoid nesting in a same-direction ScrollView.";
|
|
10
10
|
readonly events: {
|
|
11
11
|
readonly visibleItemsChange: {
|
|
@@ -109,6 +109,6 @@ export declare const sectionListMeta: {
|
|
|
109
109
|
};
|
|
110
110
|
readonly category: "layout";
|
|
111
111
|
readonly directManifestNode: true;
|
|
112
|
-
readonly allowedChildren: readonly ["Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "
|
|
112
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
113
113
|
};
|
|
114
114
|
//# sourceMappingURL=sectionListMeta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../../../src/features/progress/adapters/inbound/Progress.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,KAAK,aAAa,EAAuB,MAAM,4BAA4B,CAAC;AA8CrF;;GAEG;AACH,eAAO,MAAM,QAAQ,qDAAoC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { useZoraTheme } from '../../../../theme/useZoraTheme';
|
|
3
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
4
|
+
import { resolveProgressRole } from '../../../../types/progress';
|
|
5
|
+
import { Box } from '../../../layout/public';
|
|
6
|
+
import { resolveProgressFraction } from '../../utils/resolveProgressFraction';
|
|
7
7
|
function resolveProgressHeight(size) {
|
|
8
8
|
switch (size) {
|
|
9
9
|
case 's':
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Progress.js","sourceRoot":"","sources":["../../../../../src/features/progress/adapters/inbound/Progress.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAsB,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE9E,SAAS,qBAAqB,CAAC,IAAwC;IACrE,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,GAAG;YACN,OAAO,CAAC,CAAC;QACX,KAAK,GAAG;YACN,OAAO,CAAC,CAAC;QACX,KAAK,GAAG,CAAC;QACT;YACE,OAAO,CAAC,CAAC;IACb,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,EACrB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EAAE,kBAAkB,EACrC,MAAM,EACN,KAAK,EACL,GAAG,GAAG,GAAG,EACT,KAAK,GAAG,SAAS,EACjB,IAAI,GAAG,GAAG,GACI;IACd,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,CAAC;IACjC,MAAM,QAAQ,GAAG,uBAAuB,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,IAAI,GAAG,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAE/C,OAAO,CACL,CAAC,GAAG,CACF,iBAAiB,CAAC,aAAa,CAC/B,EAAE,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CACpC,WAAW,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAC7C,WAAW,CAAC,CAAC,CAAC,CAAC,CACf,MAAM,CAAC,MAAM,CACb,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAEtC;MAAA,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,GAAG,GAAG,GAAG,EAAE,CAAC,EAC7E;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { useZoraTheme } from '../../../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport { type ProgressProps, resolveProgressRole } from '../../../../types/progress';\nimport { Box } from '../../../layout/public';\nimport { resolveProgressFraction } from '../../utils/resolveProgressFraction';\n\nfunction resolveProgressHeight(size: NonNullable<ProgressProps['size']>): number {\n switch (size) {\n case 's':\n return 4;\n case 'm':\n return 6;\n case 'l':\n default:\n return 8;\n }\n}\n\nfunction ProgressInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy: _interactionPolicy,\n testID,\n value,\n max = 100,\n color = 'primary',\n size = 'm',\n}: ProgressProps) {\n const { theme } = useZoraTheme();\n const fraction = resolveProgressFraction({ value, max });\n const height = resolveProgressHeight(size);\n const role = resolveProgressRole(theme, color);\n\n return (\n <Box\n accessibilityRole=\"progressbar\"\n bg={theme.semantics.neutral.surface}\n borderColor={theme.semantics.neutral.divider}\n borderWidth={1}\n radius=\"full\"\n testID={testID}\n style={{ height, overflow: 'hidden' }}\n >\n <Box bg={role.base} style={{ height: '100%', width: `${fraction * 100}%` }} />\n </Box>\n );\n}\n\n/***\n * Progress indicator for determinate and indeterminate loading states.\n */\nexport const Progress = withZoraThemeScope(ProgressInner);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressRing.d.ts","sourceRoot":"","sources":["../../../../../src/features/progress/adapters/inbound/ProgressRing.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,KAAK,iBAAiB,EAAuB,MAAM,4BAA4B,CAAC;AA8IzF;;GAEG;AACH,eAAO,MAAM,YAAY,yDAAwC,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
3
|
+
import { useZoraTheme } from '../../../../theme/useZoraTheme';
|
|
4
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
5
|
+
import { resolveProgressRole } from '../../../../types/progress';
|
|
6
|
+
import { Stack } from '../../../layout/public';
|
|
7
|
+
import { Text } from '../../../typography/public';
|
|
8
|
+
import { resolveProgressFraction } from '../../utils/resolveProgressFraction';
|
|
9
|
+
import { resolveProgressRingGeometry } from '../../utils/resolveProgressRingGeometry';
|
|
10
10
|
function ProgressRingInner({ themeId: _themeId, mode: _mode, interactionPolicy: _interactionPolicy, accessibilityLabel = 'Progress', accessibilityValueText, centerLabel, centerValue, color = 'primary', max = 100, size = 120, testID, thickness = 10, trackColor = 'neutral', value, }) {
|
|
11
11
|
const { theme } = useZoraTheme();
|
|
12
12
|
const fraction = resolveProgressFraction({ max, value });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressRing.js","sourceRoot":"","sources":["../../../../../src/features/progress/adapters/inbound/ProgressRing.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAA0B,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACzF,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAEtF,SAAS,iBAAiB,CAAC,EACzB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EAAE,kBAAkB,EACrC,kBAAkB,GAAG,UAAU,EAC/B,sBAAsB,EACtB,WAAW,EACX,WAAW,EACX,KAAK,GAAG,SAAS,EACjB,GAAG,GAAG,GAAG,EACT,IAAI,GAAG,GAAG,EACV,MAAM,EACN,SAAS,GAAG,EAAE,EACd,UAAU,GAAG,SAAS,EACtB,KAAK,GACa;IAClB,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,CAAC;IACjC,MAAM,QAAQ,GAAG,uBAAuB,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;IACzD,MAAM,QAAQ,GAAG,2BAA2B,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC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YAAY,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nimport { useZoraTheme } from '../../../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport { type ProgressRingProps, resolveProgressRole } from '../../../../types/progress';\nimport { Stack } from '../../../layout/public';\nimport { Text } from '../../../typography/public';\nimport { resolveProgressFraction } from '../../utils/resolveProgressFraction';\nimport { resolveProgressRingGeometry } from '../../utils/resolveProgressRingGeometry';\n\nfunction ProgressRingInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy: _interactionPolicy,\n accessibilityLabel = 'Progress',\n accessibilityValueText,\n centerLabel,\n centerValue,\n color = 'primary',\n max = 100,\n size = 120,\n testID,\n thickness = 10,\n trackColor = 'neutral',\n value,\n}: ProgressRingProps) {\n const { theme } = useZoraTheme();\n const fraction = resolveProgressFraction({ max, value });\n const geometry = resolveProgressRingGeometry({ fraction, size, thickness });\n const progressRole = resolveProgressRole(theme, color);\n const trackRole = resolveProgressRole(theme, trackColor);\n const accessibilityMaximum = Number.isFinite(max) && max > 0 ? max : 1;\n const accessibilityValue = fraction * accessibilityMaximum;\n const valueText = accessibilityValueText ?? `${Math.round(fraction * 100)}%`;\n const segments = Array.from({ length: geometry.filledSegmentCount });\n\n return (\n <View\n accessibilityLabel={accessibilityLabel}\n accessibilityRole=\"progressbar\"\n accessibilityValue={{\n max: accessibilityMaximum,\n min: 0,\n now: accessibilityValue,\n text: valueText,\n }}\n accessible\n style={{ height: geometry.diameter, width: geometry.diameter }}\n testID={testID}\n >\n <View\n importantForAccessibility=\"no-hide-descendants\"\n pointerEvents=\"none\"\n style={styles.visual}\n >\n <View\n style={[\n styles.track,\n {\n borderColor: trackRole.softBg,\n borderRadius: geometry.diameter / 2,\n borderWidth: geometry.strokeWidth,\n },\n ]}\n />\n\n {segments.map((_, index) => (\n <View\n key={index}\n style={[\n styles.segmentLayer,\n { transform: [{ rotate: `${index * (360 / geometry.segmentCount)}deg` }] },\n ]}\n >\n <View\n style={{\n backgroundColor: progressRole.base,\n borderRadius: geometry.strokeWidth / 2,\n height: geometry.strokeWidth,\n left: (geometry.diameter - geometry.segmentWidth) / 2,\n position: 'absolute',\n top: 0,\n width: geometry.segmentWidth,\n }}\n />\n </View>\n ))}\n </View>\n\n {centerValue !== undefined || centerLabel !== undefined ? (\n <View\n importantForAccessibility=\"no-hide-descendants\"\n pointerEvents=\"none\"\n style={styles.center}\n >\n <Stack align=\"center\" gap=\"xxs\" px=\"s\">\n {centerValue !== undefined ? (\n <Text align=\"center\" variant=\"lead\" weight=\"bold\">\n {centerValue}\n </Text>\n ) : null}\n {centerLabel !== undefined ? (\n <Text align=\"center\" emphasis=\"muted\" numberOfLines={2} variant=\"caption\">\n {centerLabel}\n </Text>\n ) : null}\n </Stack>\n </View>\n ) : null}\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n center: {\n alignItems: 'center',\n bottom: 0,\n justifyContent: 'center',\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n segmentLayer: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n track: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n visual: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n});\n\n/***\n * Circular determinate progress with optional serializable center value and label content.\n */\nexport const ProgressRing = withZoraThemeScope(ProgressRingInner);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progressMeta.d.ts","sourceRoot":"","sources":["../../../src/features/progress/progressMeta.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0Ca,CAAC;AAIvC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+FS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progressMeta.js","sourceRoot":"","sources":["../../../src/features/progress/progressMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,EAAE;IACnB,SAAS,EAAE;QACT,KAAK,EAAE,UAAU;QACjB,YAAY,EAAE;YACZ,KAAK,EAAE,EAAE;YACT,GAAG,EAAE,GAAG;YACR,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,GAAG;SACV;KACF;IACD,KAAK,EAAE;QACL,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,OAAO;YACd,OAAO,EAAE,EAAE;SACZ;QACD,GAAG,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,KAAK;YACZ,OAAO,EAAE,GAAG;SACb;QACD,KAAK,EAAE;YACL,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,CAAC,GAAG,WAAW,CAAC;YACtB,OAAO,EAAE,SAAS;SACnB;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,MAAM;YACb,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;YACrB,OAAO,EAAE,GAAG;SACb;KACF;CACmC,CAAC;AAEvC,MAAM,iBAAiB,GAAG,EAAE,SAAS,EAAE,UAAU,EAAW,CAAC;AAE7D,MA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AsB,EAAE;YACtB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,eAAe;YACzB,KAAK,EAAE,0BAA0B;YACjC,OAAO,EAAE,cAAc;YACvB,SAAS,EAAE,iBAAiB;SAC7B;QACD,KAAK,EAAE;YACL,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,gBAAgB;YACvB,IAAI,EAAE,CAAC,GAAG,WAAW,CAAC;YACtB,OAAO,EAAE,SAAS;YAClB,SAAS,EAAE,iBAAiB;SAC7B;QACD,UAAU,EAAE;YACV,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,CAAC,GAAG,WAAW,CAAC;YACtB,OAAO,EAAE,SAAS;YAClB,SAAS,EAAE,iBAAiB;SAC7B;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,GAAG;YACZ,SAAS,EAAE,iBAAiB;SAC7B;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,EAAE;YACX,SAAS,EAAE,iBAAiB;SAC7B;KACF;CACmC,CAAC","sourcesContent":["import { ZORA_COLORS } from '../../internal/colorModel';\nimport type { ZoraComponentMeta } from '../../metadata';\n\nexport const progressMeta = {\n name: 'Progress',\n category: 'component',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Progress',\n defaultProps: {\n value: 50,\n max: 100,\n color: 'primary',\n size: 'm',\n },\n },\n props: {\n value: {\n type: 'number',\n category: 'State',\n label: 'Value',\n default: 50,\n },\n max: {\n type: 'number',\n category: 'State',\n label: 'Max',\n default: 100,\n },\n color: {\n type: 'enum',\n category: 'Style',\n label: 'Color',\n enum: [...ZORA_COLORS],\n default: 'primary',\n },\n size: {\n type: 'enum',\n category: 'Style',\n label: 'Size',\n enum: ['s', 'm', 'l'],\n default: 'm',\n },\n },\n} as const satisfies ZoraComponentMeta;\n\nconst instanceAuthoring = { authority: 'instance' } as const;\n\nexport const progressRingMeta = {\n name: 'ProgressRing',\n category: 'component',\n description: 'Displays circular determinate progress with optional center value and label text.',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Progress ring',\n defaultProps: {\n value: 68,\n max: 100,\n color: 'primary',\n trackColor: 'neutral',\n size: 120,\n thickness: 10,\n centerValue: '68%',\n centerLabel: 'Complete',\n accessibilityLabel: 'Progress',\n accessibilityValueText: '68% complete',\n },\n },\n props: {\n value: {\n type: 'number',\n category: 'State',\n label: 'Value',\n default: 68,\n authoring: instanceAuthoring,\n },\n max: {\n type: 'number',\n category: 'State',\n label: 'Maximum',\n default: 100,\n authoring: instanceAuthoring,\n },\n centerValue: {\n type: 'string',\n category: 'Content',\n label: 'Center value',\n default: '68%',\n authoring: instanceAuthoring,\n },\n centerLabel: {\n type: 'string',\n category: 'Content',\n label: 'Center label',\n default: 'Complete',\n authoring: instanceAuthoring,\n },\n accessibilityLabel: {\n type: 'string',\n category: 'Accessibility',\n label: 'Accessibility label',\n default: 'Progress',\n authoring: instanceAuthoring,\n },\n accessibilityValueText: {\n type: 'string',\n category: 'Accessibility',\n label: 'Accessibility value text',\n default: '68% complete',\n authoring: instanceAuthoring,\n },\n color: {\n type: 'enum',\n category: 'Style',\n label: 'Progress color',\n enum: [...ZORA_COLORS],\n default: 'primary',\n authoring: instanceAuthoring,\n },\n trackColor: {\n type: 'enum',\n category: 'Style',\n label: 'Track color',\n enum: [...ZORA_COLORS],\n default: 'neutral',\n authoring: instanceAuthoring,\n },\n size: {\n type: 'number',\n category: 'Layout',\n label: 'Diameter',\n default: 120,\n authoring: instanceAuthoring,\n },\n thickness: {\n type: 'number',\n category: 'Style',\n label: 'Thickness',\n default: 10,\n authoring: instanceAuthoring,\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/features/progress/public.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/features/progress/public.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC","sourcesContent":["export type { ProgressProps, ProgressRingProps } from '../../types/progress';\nexport { Progress } from './adapters/inbound/Progress';\nexport { ProgressRing } from './adapters/inbound/ProgressRing';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveProgressFraction.d.ts","sourceRoot":"","sources":["../../../../src/features/progress/utils/resolveProgressFraction.ts"],"names":[],"mappings":"AAAA,wBAAgB,uBAAuB,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAgB9F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveProgressFraction.js","sourceRoot":"","sources":["../../../../src/features/progress/utils/resolveProgressFraction.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,uBAAuB,CAAC,EAAE,KAAK,EAAE,GAAG,EAAkC;IACpF,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC;QACjE,OAAO,CAAC,CAAC;IACX,CAAC;IAED,MAAM,QAAQ,GAAG,KAAK,GAAG,GAAG,CAAC;IAE7B,IAAI,QAAQ,IAAI,CAAC,EAAE,CAAC;QAClB,OAAO,CAAC,CAAC;IACX,CAAC;IAED,IAAI,QAAQ,IAAI,CAAC,EAAE,CAAC;QAClB,OAAO,CAAC,CAAC;IACX,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["export function resolveProgressFraction({ value, max }: { value: number; max: number }): number {\n if (!Number.isFinite(value) || !Number.isFinite(max) || max <= 0) {\n return 0;\n }\n\n const fraction = value / max;\n\n if (fraction <= 0) {\n return 0;\n }\n\n if (fraction >= 1) {\n return 1;\n }\n\n return fraction;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveProgressRingGeometry.d.ts","sourceRoot":"","sources":["../../../../src/features/progress/utils/resolveProgressRingGeometry.ts"],"names":[],"mappings":"AAAA,wBAAgB,2BAA2B,CAAC,EAC1C,QAAQ,EACR,IAAI,EACJ,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;;;;;;EAoBA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveProgressRingGeometry.js","sourceRoot":"","sources":["../../../../src/features/progress/utils/resolveProgressRingGeometry.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,2BAA2B,CAAC,EAC1C,QAAQ,EACR,IAAI,EACJ,SAAS,GAKV;IACC,MAAM,QAAQ,GAAG,uBAAuB,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;IAC3E,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAC1B,uBAAuB,CAAC,SAAS,EAAE,iBAAiB,EAAE,iBAAiB,CAAC,EACxE,QAAQ,GAAG,CAAC,CACb,CAAC;IACF,MAAM,gBAAgB,GAAG,CAA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eometry({\n fraction,\n size,\n thickness,\n}: {\n fraction: number;\n size: number;\n thickness: number;\n}) {\n const diameter = normalizePositiveNumber(size, DEFAULT_SIZE, MINIMUM_SIZE);\n const strokeWidth = Math.min(\n normalizePositiveNumber(thickness, DEFAULT_THICKNESS, MINIMUM_THICKNESS),\n diameter / 2,\n );\n const centerlineRadius = (diameter - strokeWidth) / 2;\n const segmentCount = Math.max(\n MINIMUM_SEGMENT_COUNT,\n Math.min(MAXIMUM_SEGMENT_COUNT, Math.round(Math.PI * centerlineRadius)),\n );\n const normalizedFraction = Math.min(Math.max(Number.isFinite(fraction) ? fraction : 0, 0), 1);\n\n return {\n diameter,\n filledSegmentCount: Math.round(normalizedFraction * segmentCount),\n segmentCount,\n segmentWidth: Math.max(1, (2 * Math.PI * centerlineRadius) / segmentCount + 0.5),\n strokeWidth,\n };\n}\n\nconst DEFAULT_SIZE = 120;\nconst DEFAULT_THICKNESS = 10;\nconst MAXIMUM_SEGMENT_COUNT = 120;\nconst MINIMUM_SEGMENT_COUNT = 32;\nconst MINIMUM_SIZE = 24;\nconst MINIMUM_THICKNESS = 1;\n\nfunction normalizePositiveNumber(value: number, fallback: number, minimum: number): number {\n if (!Number.isFinite(value) || value <= 0) {\n return fallback;\n }\n\n return Math.max(value, minimum);\n}\n"]}
|
|
@@ -2,7 +2,7 @@ export declare const splashScreenMeta: {
|
|
|
2
2
|
readonly name: "SplashScreen";
|
|
3
3
|
readonly category: "component";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
6
6
|
readonly description: "App content splash presentation; does not control the native launch screen.";
|
|
7
7
|
readonly props: {
|
|
8
8
|
readonly title: {
|
|
@@ -2,7 +2,7 @@ export declare const surfaceMeta: {
|
|
|
2
2
|
readonly name: "Surface";
|
|
3
3
|
readonly category: "foundation";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
6
6
|
readonly props: {
|
|
7
7
|
readonly variant: {
|
|
8
8
|
readonly type: "enum";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Uploader.d.ts","sourceRoot":"","sources":["../../../../../src/features/uploader/adapters/inbound/Uploader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Uploader.d.ts","sourceRoot":"","sources":["../../../../../src/features/uploader/adapters/inbound/Uploader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAe,aAAa,EAAc,MAAM,0BAA0B,CAAC;AAUvF,gFAAgF;AAChF,eAAO,MAAM,QAAQ,qDAAoC,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Modal } from '../../../../components/modal';
|
|
3
|
-
import { Progress } from '../../../../components/progress';
|
|
4
3
|
import { FormField } from '../../../../patterns/form-field';
|
|
5
4
|
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
6
5
|
import { Button } from '../../../button/public';
|
|
7
6
|
import { Icon } from '../../../icon/public';
|
|
8
7
|
import { Image } from '../../../image/public';
|
|
9
8
|
import { Box, Stack } from '../../../layout/public';
|
|
9
|
+
import { Progress } from '../../../progress/public';
|
|
10
10
|
import { Text } from '../../../typography/public';
|
|
11
11
|
import { validateUploadAsset } from '../../application/use-cases/validateUploadAsset';
|
|
12
12
|
import { createUploadPicker } from '../../composition/createUploadPicker';
|