@ankhorage/surface 4.2.0 → 4.2.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 +6 -0
- package/dist/components/field/Field.js +1 -1
- package/dist/components/field/Field.js.map +1 -1
- package/dist/components/helper-text/HelperText.js +1 -1
- package/dist/components/helper-text/HelperText.js.map +1 -1
- package/dist/components/label/Label.js +1 -1
- package/dist/components/label/Label.js.map +1 -1
- package/dist/components/list-item/ListItem.js +2 -2
- package/dist/components/list-item/ListItem.js.map +1 -1
- package/dist/components/menu/Menu.d.ts.map +1 -1
- package/dist/components/menu/Menu.js +4 -2
- package/dist/components/menu/Menu.js.map +1 -1
- package/dist/components/modal/Modal.d.ts.map +1 -1
- package/dist/components/modal/Modal.js +2 -1
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/components/switch/Switch.js +2 -2
- package/dist/components/switch/Switch.js.map +1 -1
- package/dist/components/tabs/Tab.js +2 -2
- package/dist/components/tabs/Tab.js.map +1 -1
- package/dist/components/tabs/TabList.js +1 -1
- package/dist/components/tabs/TabList.js.map +1 -1
- package/dist/components/tabs/Tabs.js +1 -1
- package/dist/components/tabs/Tabs.js.map +1 -1
- package/dist/components/textarea/Textarea.js +1 -1
- package/dist/components/textarea/Textarea.js.map +1 -1
- package/dist/components/textarea/types.d.ts +1 -1
- package/dist/components/textarea/types.d.ts.map +1 -1
- package/dist/components/textarea/types.js.map +1 -1
- package/dist/components/toast/Toast.d.ts.map +1 -1
- package/dist/components/toast/Toast.js +4 -2
- package/dist/components/toast/Toast.js.map +1 -1
- package/dist/components/toast/ToastProvider.js +1 -1
- package/dist/components/toast/ToastProvider.js.map +1 -1
- package/dist/components/tooltip/Tooltip.js +2 -2
- package/dist/components/tooltip/Tooltip.js.map +1 -1
- package/dist/examples/DocsExamples.js +6 -6
- package/dist/examples/DocsExamples.js.map +1 -1
- package/dist/features/badge/adapters/inbound/Badge.d.ts +5 -0
- package/dist/features/badge/adapters/inbound/Badge.d.ts.map +1 -0
- package/dist/features/badge/adapters/inbound/Badge.js +30 -0
- package/dist/features/badge/adapters/inbound/Badge.js.map +1 -0
- package/dist/features/badge/public.d.ts +3 -0
- package/dist/features/badge/public.d.ts.map +1 -0
- package/dist/features/badge/public.js +2 -0
- package/dist/features/badge/public.js.map +1 -0
- package/dist/{components/button → features/button/adapters/inbound}/Button.d.ts +2 -1
- package/dist/features/button/adapters/inbound/Button.d.ts.map +1 -0
- package/dist/features/button/adapters/inbound/Button.js +60 -0
- package/dist/features/button/adapters/inbound/Button.js.map +1 -0
- package/dist/{components/icon-button → features/button/adapters/inbound}/IconButton.d.ts +2 -1
- package/dist/features/button/adapters/inbound/IconButton.d.ts.map +1 -0
- package/dist/features/button/adapters/inbound/IconButton.js +33 -0
- package/dist/features/button/adapters/inbound/IconButton.js.map +1 -0
- package/dist/features/button/public.d.ts +4 -0
- package/dist/features/button/public.d.ts.map +1 -0
- package/dist/features/button/public.js +3 -0
- package/dist/features/button/public.js.map +1 -0
- package/dist/features/card/adapters/inbound/Card.d.ts +5 -0
- package/dist/features/card/adapters/inbound/Card.d.ts.map +1 -0
- package/dist/features/card/adapters/inbound/Card.js +44 -0
- package/dist/features/card/adapters/inbound/Card.js.map +1 -0
- package/dist/features/card/public.d.ts +3 -0
- package/dist/features/card/public.d.ts.map +1 -0
- package/dist/features/card/public.js +2 -0
- package/dist/features/card/public.js.map +1 -0
- package/dist/features/form/checkbox/adapters/inbound/Checkbox.d.ts +5 -0
- package/dist/features/form/checkbox/adapters/inbound/Checkbox.d.ts.map +1 -0
- package/dist/features/form/checkbox/adapters/inbound/Checkbox.js +88 -0
- package/dist/features/form/checkbox/adapters/inbound/Checkbox.js.map +1 -0
- package/dist/features/form/checkbox/public.d.ts +3 -0
- package/dist/features/form/checkbox/public.d.ts.map +1 -0
- package/dist/features/form/checkbox/public.js +2 -0
- package/dist/features/form/checkbox/public.js.map +1 -0
- package/dist/features/form/radio/adapters/inbound/Radio.d.ts +5 -0
- package/dist/features/form/radio/adapters/inbound/Radio.d.ts.map +1 -0
- package/dist/features/form/radio/adapters/inbound/Radio.js +91 -0
- package/dist/features/form/radio/adapters/inbound/Radio.js.map +1 -0
- package/dist/features/form/radio/public.d.ts +3 -0
- package/dist/features/form/radio/public.d.ts.map +1 -0
- package/dist/features/form/radio/public.js +2 -0
- package/dist/features/form/radio/public.js.map +1 -0
- package/dist/features/form/radio/utils/isRadioTextContent.d.ts +4 -0
- package/dist/features/form/radio/utils/isRadioTextContent.d.ts.map +1 -0
- package/dist/features/form/radio/utils/isRadioTextContent.js +5 -0
- package/dist/features/form/radio/utils/isRadioTextContent.js.map +1 -0
- package/dist/features/form/text-input/adapters/inbound/TextInput.d.ts +5 -0
- package/dist/features/form/text-input/adapters/inbound/TextInput.d.ts.map +1 -0
- package/dist/features/form/text-input/adapters/inbound/TextInput.js +41 -0
- 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/features/form/text-input/utils/resolveTextInputPresentation.d.ts +15 -0
- package/dist/features/form/text-input/utils/resolveTextInputPresentation.d.ts.map +1 -0
- package/dist/features/form/text-input/utils/resolveTextInputPresentation.js +56 -0
- package/dist/features/form/text-input/utils/resolveTextInputPresentation.js.map +1 -0
- package/dist/features/icon/adapters/inbound/Icon.d.ts +4 -0
- package/dist/features/icon/adapters/inbound/Icon.d.ts.map +1 -0
- package/dist/{primitives/icon → features/icon/adapters/inbound}/Icon.js +3 -3
- package/dist/features/icon/adapters/inbound/Icon.js.map +1 -0
- package/dist/features/icon/adapters/inbound/PortableIcon.d.ts +19 -0
- package/dist/features/icon/adapters/inbound/PortableIcon.d.ts.map +1 -0
- package/dist/{primitives/icon → features/icon/adapters/inbound}/PortableIcon.js +37 -43
- package/dist/features/icon/adapters/inbound/PortableIcon.js.map +1 -0
- package/dist/features/icon/constants.d.ts +2 -0
- package/dist/features/icon/constants.d.ts.map +1 -0
- package/dist/features/icon/constants.js +8 -0
- package/dist/features/icon/constants.js.map +1 -0
- package/dist/features/icon/public.d.ts +4 -0
- package/dist/features/icon/public.d.ts.map +1 -0
- package/dist/features/icon/public.js +3 -0
- package/dist/features/icon/public.js.map +1 -0
- package/dist/{primitives/image → features/image/adapters/inbound}/Image.d.ts +2 -1
- package/dist/features/image/adapters/inbound/Image.d.ts.map +1 -0
- package/dist/features/image/adapters/inbound/Image.js +28 -0
- package/dist/features/image/adapters/inbound/Image.js.map +1 -0
- package/dist/features/image/public.d.ts +3 -0
- package/dist/features/image/public.d.ts.map +1 -0
- package/dist/features/image/public.js +2 -0
- package/dist/features/image/public.js.map +1 -0
- package/dist/features/image/utils/getSourceKey.d.ts +4 -0
- package/dist/features/image/utils/getSourceKey.d.ts.map +1 -0
- package/dist/features/image/utils/getSourceKey.js +33 -0
- package/dist/features/image/utils/getSourceKey.js.map +1 -0
- package/dist/features/image/utils/normalizeSource.d.ts +5 -0
- package/dist/features/image/utils/normalizeSource.d.ts.map +1 -0
- package/dist/features/image/utils/normalizeSource.js +9 -0
- package/dist/features/image/utils/normalizeSource.js.map +1 -0
- package/dist/features/image/utils/resolveAccessibilityLabel.d.ts +4 -0
- package/dist/features/image/utils/resolveAccessibilityLabel.d.ts.map +1 -0
- package/dist/features/image/utils/resolveAccessibilityLabel.js +5 -0
- package/dist/features/image/utils/resolveAccessibilityLabel.js.map +1 -0
- package/dist/features/image/utils/resolveAlt.d.ts +4 -0
- package/dist/features/image/utils/resolveAlt.d.ts.map +1 -0
- package/dist/features/image/utils/resolveAlt.js +5 -0
- package/dist/features/image/utils/resolveAlt.js.map +1 -0
- package/dist/features/image/utils/resolveImageStyle.d.ts +6 -0
- package/dist/features/image/utils/resolveImageStyle.d.ts.map +1 -0
- package/dist/features/image/utils/resolveImageStyle.js +15 -0
- package/dist/features/image/utils/resolveImageStyle.js.map +1 -0
- package/dist/features/image/utils/resolveRenderedSource.d.ts +4 -0
- package/dist/features/image/utils/resolveRenderedSource.d.ts.map +1 -0
- package/dist/features/image/utils/resolveRenderedSource.js +7 -0
- package/dist/features/image/utils/resolveRenderedSource.js.map +1 -0
- package/dist/features/image/utils/resolveResizeMode.d.ts +5 -0
- package/dist/features/image/utils/resolveResizeMode.d.ts.map +1 -0
- package/dist/features/image/utils/resolveResizeMode.js +5 -0
- package/dist/features/image/utils/resolveResizeMode.js.map +1 -0
- package/dist/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.d.ts +5 -0
- package/dist/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.d.ts.map +1 -0
- package/dist/{layout → features/keyboard-avoiding-view/adapters/inbound}/KeyboardAvoidingView.js +2 -2
- package/dist/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.js.map +1 -0
- package/dist/features/keyboard-avoiding-view/public.d.ts +3 -0
- package/dist/features/keyboard-avoiding-view/public.d.ts.map +1 -0
- package/dist/features/keyboard-avoiding-view/public.js +2 -0
- package/dist/features/keyboard-avoiding-view/public.js.map +1 -0
- package/dist/features/layout/adapters/inbound/Box.d.ts +5 -0
- package/dist/features/layout/adapters/inbound/Box.d.ts.map +1 -0
- package/dist/{layout → features/layout/adapters/inbound}/Box.js +5 -4
- package/dist/features/layout/adapters/inbound/Box.js.map +1 -0
- package/dist/features/layout/adapters/inbound/Container.d.ts +5 -0
- package/dist/features/layout/adapters/inbound/Container.d.ts.map +1 -0
- package/dist/features/layout/adapters/inbound/Container.js +28 -0
- package/dist/features/layout/adapters/inbound/Container.js.map +1 -0
- package/dist/features/layout/adapters/inbound/Divider.d.ts +5 -0
- package/dist/features/layout/adapters/inbound/Divider.d.ts.map +1 -0
- package/dist/{layout → features/layout/adapters/inbound}/Divider.js +1 -0
- package/dist/features/layout/adapters/inbound/Divider.js.map +1 -0
- package/dist/features/layout/adapters/inbound/Grid.d.ts +5 -0
- package/dist/features/layout/adapters/inbound/Grid.d.ts.map +1 -0
- package/dist/features/layout/adapters/inbound/Grid.js +48 -0
- package/dist/features/layout/adapters/inbound/Grid.js.map +1 -0
- package/dist/features/layout/adapters/inbound/Stack.d.ts +5 -0
- package/dist/features/layout/adapters/inbound/Stack.d.ts.map +1 -0
- package/dist/{layout → features/layout/adapters/inbound}/Stack.js +4 -3
- package/dist/features/layout/adapters/inbound/Stack.js.map +1 -0
- package/dist/features/layout/public.d.ts +7 -0
- package/dist/features/layout/public.d.ts.map +1 -0
- package/dist/features/layout/public.js +6 -0
- package/dist/features/layout/public.js.map +1 -0
- package/dist/features/surface/adapters/inbound/Surface.d.ts +5 -0
- package/dist/features/surface/adapters/inbound/Surface.d.ts.map +1 -0
- package/dist/{layout → features/surface/adapters/inbound}/Surface.js +17 -28
- package/dist/features/surface/adapters/inbound/Surface.js.map +1 -0
- package/dist/features/surface/public.d.ts +3 -0
- package/dist/features/surface/public.d.ts.map +1 -0
- package/dist/features/surface/public.js +2 -0
- package/dist/features/surface/public.js.map +1 -0
- package/dist/features/typography/adapters/inbound/Heading.d.ts +5 -0
- package/dist/features/typography/adapters/inbound/Heading.d.ts.map +1 -0
- package/dist/features/typography/adapters/inbound/Heading.js +29 -0
- package/dist/features/typography/adapters/inbound/Heading.js.map +1 -0
- package/dist/{primitives/text → features/typography/adapters/inbound}/Text.d.ts +2 -1
- package/dist/features/typography/adapters/inbound/Text.d.ts.map +1 -0
- package/dist/{primitives/text → features/typography/adapters/inbound}/Text.js +18 -25
- package/dist/features/typography/adapters/inbound/Text.js.map +1 -0
- package/dist/features/typography/public.d.ts +4 -0
- package/dist/features/typography/public.d.ts.map +1 -0
- package/dist/features/typography/public.js +3 -0
- package/dist/features/typography/public.js.map +1 -0
- package/dist/features/typography/utils/resolveHeadingTextStyle.d.ts +7 -0
- package/dist/features/typography/utils/resolveHeadingTextStyle.d.ts.map +1 -0
- package/dist/features/typography/utils/resolveHeadingTextStyle.js +10 -0
- package/dist/features/typography/utils/resolveHeadingTextStyle.js.map +1 -0
- package/dist/index.d.ts +24 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -11
- package/dist/index.js.map +1 -1
- package/dist/layout/AppBar.d.ts +1 -1
- package/dist/layout/AppBar.d.ts.map +1 -1
- package/dist/layout/AppBar.js +1 -2
- package/dist/layout/AppBar.js.map +1 -1
- package/dist/layout/Center.d.ts +1 -1
- package/dist/layout/Center.d.ts.map +1 -1
- package/dist/layout/Center.js +1 -1
- package/dist/layout/Center.js.map +1 -1
- package/dist/layout/Inline.d.ts +1 -1
- package/dist/layout/Inline.d.ts.map +1 -1
- package/dist/layout/Inline.js +1 -1
- package/dist/layout/Inline.js.map +1 -1
- package/dist/layout/ScrollArea.d.ts +1 -1
- package/dist/layout/ScrollArea.d.ts.map +1 -1
- package/dist/layout/ScrollArea.js +1 -1
- package/dist/layout/ScrollArea.js.map +1 -1
- package/dist/layout/Spacer.d.ts +1 -1
- package/dist/layout/Spacer.d.ts.map +1 -1
- package/dist/layout/Spacer.js +1 -1
- package/dist/layout/Spacer.js.map +1 -1
- package/dist/layout/Template.d.ts +2 -2
- package/dist/layout/Template.d.ts.map +1 -1
- package/dist/layout/Template.js +2 -2
- package/dist/layout/Template.js.map +1 -1
- package/dist/layout/index.d.ts +0 -14
- package/dist/layout/index.d.ts.map +1 -1
- package/dist/layout/index.js +0 -7
- package/dist/layout/index.js.map +1 -1
- package/dist/primitives/button-base/ButtonBase.js +1 -1
- package/dist/primitives/button-base/ButtonBase.js.map +1 -1
- package/dist/primitives/button-base/types.d.ts +1 -1
- package/dist/primitives/button-base/types.d.ts.map +1 -1
- package/dist/primitives/button-base/types.js.map +1 -1
- package/dist/types/badge.d.ts +12 -0
- package/dist/types/badge.d.ts.map +1 -0
- package/dist/types/badge.js +2 -0
- package/dist/types/badge.js.map +1 -0
- package/dist/types/button.d.ts +25 -0
- package/dist/types/button.d.ts.map +1 -0
- package/dist/types/button.js +2 -0
- package/dist/types/button.js.map +1 -0
- package/dist/{components/card/types.d.ts → types/card.d.ts} +2 -2
- package/dist/types/card.d.ts.map +1 -0
- package/dist/types/card.js +2 -0
- package/dist/types/card.js.map +1 -0
- package/dist/{components/checkbox/types.d.ts → types/checkbox.d.ts} +4 -4
- 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/types/icon.d.ts +66 -0
- package/dist/types/icon.d.ts.map +1 -0
- package/dist/types/icon.js +2 -0
- package/dist/types/icon.js.map +1 -0
- package/dist/{primitives/image/types.d.ts → types/image.d.ts} +3 -4
- package/dist/types/image.d.ts.map +1 -0
- package/dist/types/image.js +2 -0
- package/dist/types/image.js.map +1 -0
- package/dist/types/keyboard-avoiding-view.d.ts +4 -0
- package/dist/types/keyboard-avoiding-view.d.ts.map +1 -0
- package/dist/types/keyboard-avoiding-view.js +2 -0
- package/dist/types/keyboard-avoiding-view.js.map +1 -0
- package/dist/{layout/helpers.d.ts → types/layout.d.ts} +39 -5
- package/dist/types/layout.d.ts.map +1 -0
- package/dist/types/layout.js +2 -0
- package/dist/types/layout.js.map +1 -0
- package/dist/{components/radio/types.d.ts → types/radio.d.ts} +4 -4
- 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/surface.d.ts +6 -0
- package/dist/types/surface.d.ts.map +1 -0
- package/dist/types/surface.js +2 -0
- package/dist/types/surface.js.map +1 -0
- package/dist/{components/text-input/types.d.ts → types/text-input.d.ts} +3 -3
- 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/dist/types/typography.d.ts +29 -0
- package/dist/types/typography.d.ts.map +1 -0
- package/dist/types/typography.js +2 -0
- package/dist/types/typography.js.map +1 -0
- package/dist/utils/resolveBoxStyles.d.ts +7 -0
- package/dist/utils/resolveBoxStyles.d.ts.map +1 -0
- package/dist/utils/resolveBoxStyles.js +83 -0
- package/dist/utils/resolveBoxStyles.js.map +1 -0
- package/dist/utils/resolveSpacing.d.ts +5 -0
- package/dist/utils/resolveSpacing.d.ts.map +1 -0
- package/dist/utils/resolveSpacing.js +6 -0
- package/dist/utils/resolveSpacing.js.map +1 -0
- package/package.json +1 -1
- package/src/components/field/Field.tsx +1 -1
- package/src/components/helper-text/HelperText.tsx +1 -1
- package/src/components/label/Label.tsx +1 -1
- package/src/components/list-item/ListItem.tsx +2 -2
- package/src/components/menu/Menu.tsx +4 -2
- package/src/components/modal/Modal.tsx +2 -1
- package/src/components/switch/Switch.tsx +2 -2
- package/src/components/tabs/Tab.tsx +2 -2
- package/src/components/tabs/TabList.tsx +1 -1
- package/src/components/tabs/Tabs.tsx +1 -1
- package/src/components/textarea/Textarea.tsx +1 -1
- package/src/components/textarea/types.ts +1 -1
- package/src/components/toast/Toast.tsx +4 -2
- package/src/components/toast/ToastProvider.tsx +1 -1
- package/src/components/tooltip/Tooltip.tsx +2 -2
- package/src/examples/DocsExamples.tsx +6 -6
- package/src/features/badge/adapters/inbound/Badge.tsx +58 -0
- package/src/features/badge/public.ts +2 -0
- package/src/features/button/adapters/inbound/Button.tsx +159 -0
- package/src/features/button/adapters/inbound/IconButton.tsx +69 -0
- package/src/features/button/public.ts +3 -0
- package/src/features/card/adapters/inbound/Card.tsx +88 -0
- package/src/features/card/public.ts +2 -0
- package/src/features/form/checkbox/adapters/inbound/Checkbox.tsx +207 -0
- package/src/features/form/checkbox/public.ts +2 -0
- package/src/{components/radio → features/form/radio/adapters/inbound}/Radio.test.ts +5 -5
- package/src/features/form/radio/adapters/inbound/Radio.tsx +214 -0
- package/src/features/form/radio/public.ts +2 -0
- package/src/{components/radio → features/form/radio/utils}/isRadioTextContent.ts +1 -3
- package/src/features/form/text-input/adapters/inbound/TextInput.tsx +72 -0
- package/src/features/form/text-input/public.ts +2 -0
- package/src/features/form/text-input/utils/resolveTextInputPresentation.ts +91 -0
- package/src/features/icon/adapters/inbound/Icon.tsx +14 -0
- package/src/{primitives/icon → features/icon/adapters/inbound}/PortableIcon.tsx +41 -97
- package/src/{primitives/icon → features/icon/adapters/inbound}/PortableIcon.web.test.tsx +6 -10
- package/src/features/icon/constants.ts +9 -0
- package/src/features/icon/public.ts +10 -0
- package/src/features/image/adapters/inbound/Image.tsx +55 -0
- package/src/features/image/public.ts +2 -0
- package/src/features/image/utils/getSourceKey.ts +32 -0
- package/src/features/image/utils/normalizeSource.ts +12 -0
- package/src/features/image/utils/resolveAccessibilityLabel.ts +9 -0
- package/src/features/image/utils/resolveAlt.ts +9 -0
- package/src/{primitives/image → features/image/utils}/resolveImageProps.test.ts +10 -22
- package/src/features/image/utils/resolveImageStyle.ts +23 -0
- package/src/features/image/utils/resolveRenderedSource.ts +11 -0
- package/src/features/image/utils/resolveResizeMode.ts +11 -0
- package/src/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.tsx +9 -0
- package/src/features/keyboard-avoiding-view/public.ts +5 -0
- package/src/{layout → features/layout/adapters/inbound}/Box.tsx +7 -15
- package/src/features/layout/adapters/inbound/Container.tsx +43 -0
- package/src/{layout → features/layout/adapters/inbound}/Divider.tsx +3 -8
- package/src/features/layout/adapters/inbound/Grid.tsx +78 -0
- package/src/{layout → features/layout/adapters/inbound}/Stack.test.ts +0 -1
- package/src/{layout → features/layout/adapters/inbound}/Stack.tsx +6 -15
- package/src/features/layout/public.ts +12 -0
- package/src/{layout → features/surface/adapters/inbound}/Surface.tsx +24 -41
- package/src/features/surface/public.ts +2 -0
- package/src/{primitives/heading → features/typography/adapters/inbound}/Heading.tsx +35 -38
- package/src/{primitives/text → features/typography/adapters/inbound}/Text.tsx +25 -35
- package/src/features/typography/public.ts +3 -0
- package/src/{primitives/heading/resolveHeadingStyle.test.ts → features/typography/utils/resolveHeadingTextStyle.test.ts} +5 -12
- package/src/features/typography/utils/resolveHeadingTextStyle.ts +21 -0
- package/src/index.test.ts +58 -28
- package/src/index.ts +37 -26
- package/src/layout/AppBar.tsx +1 -2
- package/src/layout/Center.tsx +1 -1
- package/src/layout/Inline.tsx +1 -1
- package/src/layout/ScrollArea.tsx +2 -1
- package/src/layout/Spacer.tsx +2 -2
- package/src/layout/Template.tsx +3 -2
- package/src/layout/index.ts +0 -17
- package/src/primitives/button-base/ButtonBase.tsx +1 -1
- package/src/primitives/button-base/types.ts +1 -1
- package/src/{components/badge/types.ts → types/badge.ts} +3 -3
- package/src/types/button.ts +34 -0
- package/src/{components/card/types.ts → types/card.ts} +1 -1
- package/src/{components/checkbox/types.ts → types/checkbox.ts} +3 -3
- package/src/types/icon.ts +52 -0
- package/src/{primitives/image/types.ts → types/image.ts} +3 -3
- package/src/types/keyboard-avoiding-view.ts +6 -0
- package/src/types/layout.ts +96 -0
- package/src/{components/radio/types.ts → types/radio.ts} +3 -3
- package/src/types/surface.ts +7 -0
- package/src/{components/text-input/types.ts → types/text-input.ts} +2 -2
- package/src/types/typography.ts +32 -0
- package/src/{layout/helpers.test.ts → utils/resolveBoxStyles.test.ts} +8 -25
- package/src/utils/resolveBoxStyles.ts +135 -0
- package/src/utils/resolveSpacing.ts +11 -0
- package/src/webAcceptance.test.tsx +2 -3
- package/dist/components/badge/Badge.d.ts +0 -4
- package/dist/components/badge/Badge.d.ts.map +0 -1
- package/dist/components/badge/Badge.js +0 -30
- package/dist/components/badge/Badge.js.map +0 -1
- package/dist/components/badge/index.d.ts +0 -3
- package/dist/components/badge/index.d.ts.map +0 -1
- package/dist/components/badge/index.js +0 -2
- package/dist/components/badge/index.js.map +0 -1
- package/dist/components/badge/types.d.ts +0 -12
- package/dist/components/badge/types.d.ts.map +0 -1
- package/dist/components/badge/types.js +0 -2
- package/dist/components/badge/types.js.map +0 -1
- package/dist/components/button/Button.d.ts.map +0 -1
- package/dist/components/button/Button.js +0 -51
- package/dist/components/button/Button.js.map +0 -1
- package/dist/components/button/index.d.ts +0 -3
- package/dist/components/button/index.d.ts.map +0 -1
- package/dist/components/button/index.js +0 -2
- package/dist/components/button/index.js.map +0 -1
- package/dist/components/button/types.d.ts +0 -18
- package/dist/components/button/types.d.ts.map +0 -1
- package/dist/components/button/types.js +0 -2
- package/dist/components/button/types.js.map +0 -1
- package/dist/components/card/Card.d.ts +0 -4
- package/dist/components/card/Card.d.ts.map +0 -1
- package/dist/components/card/Card.js +0 -46
- package/dist/components/card/Card.js.map +0 -1
- package/dist/components/card/index.d.ts +0 -3
- package/dist/components/card/index.d.ts.map +0 -1
- package/dist/components/card/index.js +0 -2
- package/dist/components/card/index.js.map +0 -1
- package/dist/components/card/types.d.ts.map +0 -1
- package/dist/components/card/types.js +0 -2
- package/dist/components/card/types.js.map +0 -1
- package/dist/components/checkbox/Checkbox.d.ts +0 -4
- package/dist/components/checkbox/Checkbox.d.ts.map +0 -1
- package/dist/components/checkbox/Checkbox.js +0 -69
- package/dist/components/checkbox/Checkbox.js.map +0 -1
- package/dist/components/checkbox/index.d.ts +0 -3
- package/dist/components/checkbox/index.d.ts.map +0 -1
- package/dist/components/checkbox/index.js +0 -2
- package/dist/components/checkbox/index.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/icon-button/IconButton.d.ts.map +0 -1
- package/dist/components/icon-button/IconButton.js +0 -28
- package/dist/components/icon-button/IconButton.js.map +0 -1
- package/dist/components/icon-button/index.d.ts +0 -3
- package/dist/components/icon-button/index.d.ts.map +0 -1
- package/dist/components/icon-button/index.js +0 -2
- package/dist/components/icon-button/index.js.map +0 -1
- package/dist/components/icon-button/types.d.ts +0 -13
- package/dist/components/icon-button/types.d.ts.map +0 -1
- package/dist/components/icon-button/types.js +0 -2
- package/dist/components/icon-button/types.js.map +0 -1
- package/dist/components/radio/Radio.d.ts +0 -7
- package/dist/components/radio/Radio.d.ts.map +0 -1
- package/dist/components/radio/Radio.js +0 -75
- package/dist/components/radio/Radio.js.map +0 -1
- package/dist/components/radio/index.d.ts +0 -3
- package/dist/components/radio/index.d.ts.map +0 -1
- package/dist/components/radio/index.js +0 -2
- package/dist/components/radio/index.js.map +0 -1
- package/dist/components/radio/isRadioTextContent.d.ts +0 -6
- package/dist/components/radio/isRadioTextContent.d.ts.map +0 -1
- package/dist/components/radio/isRadioTextContent.js +0 -7
- package/dist/components/radio/isRadioTextContent.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/text-input/TextInput.d.ts +0 -4
- package/dist/components/text-input/TextInput.d.ts.map +0 -1
- package/dist/components/text-input/TextInput.js +0 -72
- package/dist/components/text-input/TextInput.js.map +0 -1
- package/dist/components/text-input/index.d.ts +0 -3
- package/dist/components/text-input/index.d.ts.map +0 -1
- package/dist/components/text-input/index.js +0 -2
- package/dist/components/text-input/index.js.map +0 -1
- package/dist/components/text-input/types.d.ts.map +0 -1
- package/dist/components/text-input/types.js +0 -2
- package/dist/components/text-input/types.js.map +0 -1
- package/dist/layout/Box.d.ts +0 -14
- package/dist/layout/Box.d.ts.map +0 -1
- package/dist/layout/Box.js.map +0 -1
- package/dist/layout/Container.d.ts +0 -11
- package/dist/layout/Container.d.ts.map +0 -1
- package/dist/layout/Container.js +0 -24
- package/dist/layout/Container.js.map +0 -1
- package/dist/layout/Divider.d.ts +0 -10
- package/dist/layout/Divider.d.ts.map +0 -1
- package/dist/layout/Divider.js.map +0 -1
- package/dist/layout/Grid.d.ts +0 -14
- package/dist/layout/Grid.d.ts.map +0 -1
- package/dist/layout/Grid.js +0 -51
- package/dist/layout/Grid.js.map +0 -1
- package/dist/layout/KeyboardAvoidingView.d.ts +0 -7
- package/dist/layout/KeyboardAvoidingView.d.ts.map +0 -1
- package/dist/layout/KeyboardAvoidingView.js.map +0 -1
- package/dist/layout/Stack.d.ts +0 -14
- package/dist/layout/Stack.d.ts.map +0 -1
- package/dist/layout/Stack.js.map +0 -1
- package/dist/layout/Surface.d.ts +0 -8
- package/dist/layout/Surface.d.ts.map +0 -1
- package/dist/layout/Surface.js.map +0 -1
- package/dist/layout/helpers.d.ts.map +0 -1
- package/dist/layout/helpers.js +0 -91
- package/dist/layout/helpers.js.map +0 -1
- package/dist/primitives/heading/Heading.d.ts +0 -4
- package/dist/primitives/heading/Heading.d.ts.map +0 -1
- package/dist/primitives/heading/Heading.js +0 -30
- package/dist/primitives/heading/Heading.js.map +0 -1
- package/dist/primitives/heading/index.d.ts +0 -3
- package/dist/primitives/heading/index.d.ts.map +0 -1
- package/dist/primitives/heading/index.js +0 -2
- package/dist/primitives/heading/index.js.map +0 -1
- package/dist/primitives/heading/resolveHeadingStyle.d.ts +0 -6
- package/dist/primitives/heading/resolveHeadingStyle.d.ts.map +0 -1
- package/dist/primitives/heading/resolveHeadingStyle.js +0 -9
- package/dist/primitives/heading/resolveHeadingStyle.js.map +0 -1
- package/dist/primitives/heading/types.d.ts +0 -15
- package/dist/primitives/heading/types.d.ts.map +0 -1
- package/dist/primitives/heading/types.js +0 -2
- package/dist/primitives/heading/types.js.map +0 -1
- package/dist/primitives/icon/Icon.d.ts +0 -16
- package/dist/primitives/icon/Icon.d.ts.map +0 -1
- package/dist/primitives/icon/Icon.js.map +0 -1
- package/dist/primitives/icon/PortableIcon.d.ts +0 -70
- package/dist/primitives/icon/PortableIcon.d.ts.map +0 -1
- package/dist/primitives/icon/PortableIcon.js.map +0 -1
- package/dist/primitives/icon/index.d.ts +0 -4
- package/dist/primitives/icon/index.d.ts.map +0 -1
- package/dist/primitives/icon/index.js +0 -3
- package/dist/primitives/icon/index.js.map +0 -1
- package/dist/primitives/image/Image.d.ts.map +0 -1
- package/dist/primitives/image/Image.js +0 -26
- package/dist/primitives/image/Image.js.map +0 -1
- package/dist/primitives/image/index.d.ts +0 -3
- package/dist/primitives/image/index.d.ts.map +0 -1
- package/dist/primitives/image/index.js +0 -2
- package/dist/primitives/image/index.js.map +0 -1
- package/dist/primitives/image/resolveImageProps.d.ts +0 -12
- package/dist/primitives/image/resolveImageProps.d.ts.map +0 -1
- package/dist/primitives/image/resolveImageProps.js +0 -67
- package/dist/primitives/image/resolveImageProps.js.map +0 -1
- package/dist/primitives/image/types.d.ts.map +0 -1
- package/dist/primitives/image/types.js +0 -2
- package/dist/primitives/image/types.js.map +0 -1
- package/dist/primitives/text/Text.d.ts.map +0 -1
- package/dist/primitives/text/Text.js.map +0 -1
- package/dist/primitives/text/index.d.ts +0 -3
- package/dist/primitives/text/index.d.ts.map +0 -1
- package/dist/primitives/text/index.js +0 -2
- package/dist/primitives/text/index.js.map +0 -1
- package/dist/primitives/text/types.d.ts +0 -17
- package/dist/primitives/text/types.d.ts.map +0 -1
- package/dist/primitives/text/types.js +0 -2
- package/dist/primitives/text/types.js.map +0 -1
- package/src/components/badge/Badge.tsx +0 -52
- package/src/components/badge/index.ts +0 -2
- package/src/components/button/Button.tsx +0 -98
- package/src/components/button/index.ts +0 -2
- package/src/components/button/types.ts +0 -23
- package/src/components/card/Card.tsx +0 -81
- package/src/components/card/index.ts +0 -2
- package/src/components/checkbox/Checkbox.tsx +0 -120
- package/src/components/checkbox/index.ts +0 -2
- package/src/components/icon-button/IconButton.tsx +0 -55
- package/src/components/icon-button/index.ts +0 -2
- package/src/components/icon-button/types.ts +0 -16
- package/src/components/radio/Radio.tsx +0 -124
- package/src/components/radio/index.ts +0 -2
- package/src/components/text-input/TextInput.tsx +0 -124
- package/src/components/text-input/index.ts +0 -2
- package/src/layout/Container.tsx +0 -43
- package/src/layout/Grid.tsx +0 -83
- package/src/layout/KeyboardAvoidingView.tsx +0 -16
- package/src/layout/helpers.ts +0 -205
- package/src/primitives/heading/index.ts +0 -2
- package/src/primitives/heading/resolveHeadingStyle.ts +0 -20
- package/src/primitives/heading/types.ts +0 -17
- package/src/primitives/icon/Icon.tsx +0 -34
- package/src/primitives/icon/index.ts +0 -10
- package/src/primitives/image/Image.tsx +0 -65
- package/src/primitives/image/index.ts +0 -2
- package/src/primitives/image/resolveImageProps.ts +0 -92
- package/src/primitives/text/index.ts +0 -2
- package/src/primitives/text/types.ts +0 -18
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../src/components/text-input/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,SAAS,IAAI,oBAAoB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEjF,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGpD,MAAM,UAAU,SAAS,CAAC,EACxB,KAAK,EACL,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,IAAI,GAAG,GAAG,EACV,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,KAAK,EACf,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,GAAG,SAAS,EAC7B,KAAK,EACL,MAAM,EACN,OAAO,EACP,MAAM,EACN,GAAG,KAAK,EACO;IACf,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,MAAM,WAAW,GAAG,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACpD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,UAAU,GAAG,iBAAiB,CAAC;QACnC,QAAQ;QACR,OAAO;QACP,OAAO;QACP,QAAQ;KACT,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,kBAAkB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IACrD,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,KAAK,EAAE;QACjD,OAAO,EAAE,WAAW,CAAC,WAAW;KACjC,CA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,EAAE,CAAC;gBACP,SAAS,EAAE,cAAc;gBACzB,OAAO,EAAE,CAAC;gBACV,KAAK,EAAE,MAAM,CAAC,YAAY;gBAC1B,iBAAiB,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ;aACtD;YACD,KAAK;SACN,CAAC,CACF,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,EAEf;MAAA,CAAC,iBAAiB,CAAC,CAAC,CAAC,CACnB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,EAAE,IAAI,CAAC,CACzE,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { Platform, TextInput as ReactNativeTextInput, View } from 'react-native';\n\nimport {\n resolveControlSize,\n resolveFieldState,\n resolveFocusRingStyles,\n resolveInputColors,\n resolveTextStyles,\n} from '../../internal/resolvers';\nimport { useTheme } from '../../theme/ThemeContext';\nimport type { TextInputProps } from './types';\n\nexport function TextInput({\n value,\n defaultValue,\n onChangeText,\n placeholder,\n size = 'm',\n disabled = false,\n readOnly = false,\n invalid = false,\n leadingAccessory,\n trailingAccessory,\n interactionPolicy = 'enabled',\n style,\n testID,\n onFocus,\n onBlur,\n ...props\n}: TextInputProps) {\n const { theme } = useTheme();\n const controlSize = resolveControlSize(theme, size);\n const [focused, setFocused] = React.useState(false);\n const fieldState = resolveFieldState({\n disabled,\n focused,\n invalid,\n readOnly,\n });\n const colors = resolveInputColors(theme, fieldState);\n const resolvedTextStyle = resolveTextStyles(theme, {\n variant: controlSize.textVariant,\n });\n const resolvedLineHeight =\n typeof resolvedTextStyle.lineHeight === 'number'\n ? resolvedTextStyle.lineHeight\n : controlSize.minHeight - controlSize.paddingVertical * 2;\n const lineCount = Math.max(props.numberOfLines ?? 1, 1);\n const inputMinHeight = props.multiline\n ? resolvedLineHeight * lineCount\n : controlSize.minHeight - controlSize.paddingVertical * 2;\n const containerMinHeight = props.multiline\n ? inputMinHeight + controlSize.paddingVertical * 2\n : controlSize.minHeight;\n const passive = interactionPolicy === 'passive';\n\n const handleFocus: NonNullable<TextInputProps['onFocus']> = (event) => {\n setFocused(true);\n onFocus?.(event);\n };\n\n const handleBlur: NonNullable<TextInputProps['onBlur']> = (event) => {\n setFocused(false);\n onBlur?.(event);\n };\n\n return (\n <View\n style={[\n {\n minHeight: containerMinHeight,\n paddingHorizontal: controlSize.paddingHorizontal,\n paddingVertical: controlSize.paddingVertical,\n borderRadius: controlSize.borderRadius,\n borderWidth: 1,\n borderColor: colors.borderColor,\n backgroundColor: colors.backgroundColor,\n flexDirection: 'row',\n alignItems: props.multiline ? 'flex-start' : 'center',\n opacity: colors.opacity,\n },\n resolveFocusRingStyles(theme.semantics.border.focus, focused, Platform.OS === 'web'),\n ]}\n >\n {leadingAccessory ? (\n <View style={{ marginRight: theme.spacing.s }}>{leadingAccessory}</View>\n ) : null}\n <ReactNativeTextInput\n {...props}\n defaultValue={defaultValue}\n editable={passive ? false : !disabled && !readOnly}\n numberOfLines={props.multiline ? props.numberOfLines : 1}\n onBlur={handleBlur}\n onChangeText={(nextValue) => {\n if (passive) {\n return;\n }\n\n onChangeText?.(nextValue);\n }}\n onFocus={handleFocus}\n placeholder={placeholder}\n placeholderTextColor={colors.placeholderColor}\n readOnly={readOnly}\n style={[\n {\n flex: 1,\n minHeight: inputMinHeight,\n padding: 0,\n color: colors.contentColor,\n textAlignVertical: props.multiline ? 'top' : 'center',\n },\n style,\n ]}\n testID={testID}\n value={value}\n />\n {trailingAccessory ? (\n <View style={{ marginLeft: theme.spacing.s }}>{trailingAccessory}</View>\n ) : null}\n </View>\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/text-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/text-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export { TextInput } from './TextInput';\nexport type { TextInputProps } from './types';\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/text-input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EACV,SAAS,EACT,cAAc,IAAI,yBAAyB,EAC3C,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAE/E,MAAM,WAAW,cAAe,SAAQ,IAAI,CAC1C,yBAAyB,EACvB,cAAc,GACd,UAAU,GACV,cAAc,GACd,sBAAsB,GACtB,OAAO,GACP,QAAQ,GACR,OAAO,CACV;IACC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/text-input/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\nimport type {\n StyleProp,\n TextInputProps as ReactNativeTextInputProps,\n TextStyle,\n} from 'react-native';\n\nimport type { InteractionPolicy } from '../../interactionPolicy';\nimport type { ControlSize } from '../../internal/resolvers/resolveControlSize';\n\nexport interface TextInputProps extends Omit<\n ReactNativeTextInputProps,\n | 'defaultValue'\n | 'editable'\n | 'onChangeText'\n | 'placeholderTextColor'\n | 'style'\n | 'testID'\n | 'value'\n> {\n value?: string;\n defaultValue?: string;\n onChangeText?: ((text: string) => void) | undefined;\n placeholder?: string;\n size?: ControlSize;\n disabled?: boolean;\n readOnly?: boolean;\n invalid?: boolean;\n leadingAccessory?: React.ReactNode;\n trailingAccessory?: React.ReactNode;\n interactionPolicy?: InteractionPolicy;\n style?: StyleProp<TextStyle>;\n testID?: string;\n}\n"]}
|
package/dist/layout/Box.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type ViewProps as ReactNativeViewProps } from 'react-native';
|
|
3
|
-
import { type BoxStyleProps } from './helpers';
|
|
4
|
-
export interface BoxProps extends BoxStyleProps {
|
|
5
|
-
accessibilityLabel?: ReactNativeViewProps['accessibilityLabel'];
|
|
6
|
-
accessibilityRole?: ReactNativeViewProps['accessibilityRole'];
|
|
7
|
-
accessibilityState?: ReactNativeViewProps['accessibilityState'];
|
|
8
|
-
accessible?: ReactNativeViewProps['accessible'];
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
pointerEvents?: ReactNativeViewProps['pointerEvents'];
|
|
11
|
-
testID?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare function Box({ accessible, accessibilityLabel, accessibilityRole, accessibilityState, children, pointerEvents, style, testID, ...props }: BoxProps): React.JSX.Element;
|
|
14
|
-
//# sourceMappingURL=Box.d.ts.map
|
package/dist/layout/Box.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../src/layout/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,KAAK,SAAS,IAAI,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAK5E,OAAO,EAAE,KAAK,aAAa,EAAoB,MAAM,WAAW,CAAC;AAEjE,MAAM,WAAW,QAAS,SAAQ,aAAa;IAC7C,kBAAkB,CAAC,EAAE,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;IAChE,iBAAiB,CAAC,EAAE,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;IAC9D,kBAAkB,CAAC,EAAE,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;IAChE,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,aAAa,CAAC,EAAE,oBAAoB,CAAC,eAAe,CAAC,CAAC;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,GAAG,CAAC,EAClB,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,QAAQ,EACR,aAAa,EACb,KAAK,EACL,MAAM,EACN,GAAG,KAAK,EACT,EAAE,QAAQ,qBAmBV"}
|
package/dist/layout/Box.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Box.js","sourceRoot":"","sources":["../../src/layout/Box.tsx"],"names":[],"mappings":"AAAA,OAAO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import { useResponsiveRuntime } from '../core/responsive';\nimport { resolvePointerEvents } from '../internal/resolvePointerEvents';\nimport { useTheme } from '../theme/ThemeContext';\nimport { type BoxStyleProps, resolveBoxStyles } from './helpers';\n\nexport interface BoxProps extends BoxStyleProps {\n accessibilityLabel?: ReactNativeViewProps['accessibilityLabel'];\n accessibilityRole?: ReactNativeViewProps['accessibilityRole'];\n accessibilityState?: ReactNativeViewProps['accessibilityState'];\n accessible?: ReactNativeViewProps['accessible'];\n children?: React.ReactNode;\n pointerEvents?: ReactNativeViewProps['pointerEvents'];\n testID?: string;\n}\n\nexport function Box({\n accessible,\n accessibilityLabel,\n accessibilityRole,\n accessibilityState,\n children,\n pointerEvents,\n style,\n testID,\n ...props\n}: BoxProps) {\n const { theme } = useTheme();\n const { breakpoint } = useResponsiveRuntime();\n const resolved = resolveBoxStyles(theme, breakpoint, props);\n const resolvedPointerEvents = pointerEvents ? resolvePointerEvents(pointerEvents) : null;\n\n return (\n <View\n {...resolvedPointerEvents?.props}\n accessible={accessible}\n accessibilityLabel={accessibilityLabel}\n accessibilityRole={accessibilityRole}\n accessibilityState={accessibilityState}\n testID={testID}\n style={[resolved, resolvedPointerEvents?.style, style]}\n >\n {children}\n </View>\n );\n}\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type Responsive } from '../core/responsive';
|
|
3
|
-
import type { SurfaceTheme } from '../theme/types';
|
|
4
|
-
import { type BoxProps } from './Box';
|
|
5
|
-
export interface ContainerProps extends Omit<BoxProps, 'children'> {
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
maxWidth?: Responsive<number>;
|
|
8
|
-
px?: Responsive<number | keyof SurfaceTheme['spacing']>;
|
|
9
|
-
}
|
|
10
|
-
export declare function Container({ children, maxWidth, px, ...props }: ContainerProps): React.JSX.Element;
|
|
11
|
-
//# sourceMappingURL=Container.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../src/layout/Container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAqB,KAAK,UAAU,EAAwB,MAAM,oBAAoB,CAAC;AAE9F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG3C,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;IAChE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAC9B,EAAE,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,MAAM,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;CACzD;AAED,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,QAAsD,EACtD,EAAiC,EACjC,GAAG,KAAK,EACT,EAAE,cAAc,qBAsBhB"}
|
package/dist/layout/Container.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import { resolveResponsive, useResponsiveRuntime } from '../core/responsive';
|
|
4
|
-
import { useTheme } from '../theme/ThemeContext';
|
|
5
|
-
import { Box } from './Box';
|
|
6
|
-
import { resolveSpacing } from './helpers';
|
|
7
|
-
export function Container({ children, maxWidth = { base: Number.MAX_SAFE_INTEGER, lg: 1120 }, px = { base: 16, md: 24, lg: 32 }, ...props }) {
|
|
8
|
-
const { theme } = useTheme();
|
|
9
|
-
const { breakpoint } = useResponsiveRuntime();
|
|
10
|
-
const activeMaxWidth = resolveResponsive(maxWidth, breakpoint);
|
|
11
|
-
const activePx = resolveSpacing(theme, resolveResponsive(px, breakpoint));
|
|
12
|
-
return (<Box {...props} width="100%" style={[{ width: '100%' }, props.style]}>
|
|
13
|
-
<View style={{
|
|
14
|
-
width: '100%',
|
|
15
|
-
maxWidth: activeMaxWidth,
|
|
16
|
-
alignSelf: 'center',
|
|
17
|
-
paddingLeft: activePx,
|
|
18
|
-
paddingRight: activePx,
|
|
19
|
-
}}>
|
|
20
|
-
{children}
|
|
21
|
-
</View>
|
|
22
|
-
</Box>);
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=Container.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../src/layout/Container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,iBAAiB,EAAmB,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC9F,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,GAAG,EAAiB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAQ3C,MAAM,UAAU,SAAS,CAAC,EACxB,QAAQ,EACR,QAAQ,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,gBAAgB,EAAE,EAAE,EAAE,IAAI,EAAE,EACtD,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EACjC,GAAG,KAAK,EACO;IACf,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,MAAM,EAAE,UAAU,EAAE,GAAG,oBAAoB,EAAE,CAAC;IAE9C,MAAM,cAAc,GAAG,iBAAiB,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC/D,MAAM,QAAQ,GAAG,cAAc,CAAC,KAAK,EAAE,iBAAiB,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC;IAE1E,OAAO,CACL,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CACnE;MAAA,CAAC,IAAI,CACH,KAAK,CAAC,CAAC;YACL,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,cAAc;YACxB,SAAS,EAAE,QAAQ;YACnB,WAAW,EAAE,QAAQ;YACrB,YAAY,EAAE,QAAQ;SACvB,CAAC,CAEF;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport { resolveResponsive, type Responsive, useResponsiveRuntime } from '../core/responsive';\nimport { useTheme } from '../theme/ThemeContext';\nimport type { SurfaceTheme } from '../theme/types';\nimport { Box, type BoxProps } from './Box';\nimport { resolveSpacing } from './helpers';\n\nexport interface ContainerProps extends Omit<BoxProps, 'children'> {\n children?: React.ReactNode;\n maxWidth?: Responsive<number>;\n px?: Responsive<number | keyof SurfaceTheme['spacing']>;\n}\n\nexport function Container({\n children,\n maxWidth = { base: Number.MAX_SAFE_INTEGER, lg: 1120 },\n px = { base: 16, md: 24, lg: 32 },\n ...props\n}: ContainerProps) {\n const { theme } = useTheme();\n const { breakpoint } = useResponsiveRuntime();\n\n const activeMaxWidth = resolveResponsive(maxWidth, breakpoint);\n const activePx = resolveSpacing(theme, resolveResponsive(px, breakpoint));\n\n return (\n <Box {...props} width=\"100%\" style={[{ width: '100%' }, props.style]}>\n <View\n style={{\n width: '100%',\n maxWidth: activeMaxWidth,\n alignSelf: 'center',\n paddingLeft: activePx,\n paddingRight: activePx,\n }}\n >\n {children}\n </View>\n </Box>\n );\n}\n"]}
|
package/dist/layout/Divider.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type BoxProps } from './Box';
|
|
3
|
-
import type { ColorValue } from './helpers';
|
|
4
|
-
export interface DividerProps extends Omit<BoxProps, 'bg' | 'height' | 'width'> {
|
|
5
|
-
orientation?: 'horizontal' | 'vertical';
|
|
6
|
-
color?: ColorValue;
|
|
7
|
-
thickness?: number;
|
|
8
|
-
}
|
|
9
|
-
export declare function Divider({ orientation, color, thickness, ...props }: DividerProps): React.JSX.Element;
|
|
10
|
-
//# sourceMappingURL=Divider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../src/layout/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC7E,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,OAAO,CAAC,EACtB,WAA0B,EAC1B,KAAgB,EAChB,SAAa,EACb,GAAG,KAAK,EACT,EAAE,YAAY,qBASd"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.js","sourceRoot":"","sources":["../../src/layout/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,GAAG,EAAiB,MAAM,OAAO,CAAC;AAS3C,MAAM,UAAU,OAAO,CAAC,EACtB,WAAW,GAAG,YAAY,EAC1B,KAAK,GAAG,QAAQ,EAChB,SAAS,GAAG,CAAC,EACb,GAAG,KAAK,EACK;IACb,OAAO,CACL,CAAC,GAAG,CACF,IAAI,KAAK,CAAC,CACV,EAAE,CAAC,CAAC,KAAK,CAAC,CACV,MAAM,CAAC,CAAC,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAC1D,KAAK,CAAC,CAAC,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,EACvD,CACH,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport { Box, type BoxProps } from './Box';\nimport type { ColorValue } from './helpers';\n\nexport interface DividerProps extends Omit<BoxProps, 'bg' | 'height' | 'width'> {\n orientation?: 'horizontal' | 'vertical';\n color?: ColorValue;\n thickness?: number;\n}\n\nexport function Divider({\n orientation = 'horizontal',\n color = 'border',\n thickness = 1,\n ...props\n}: DividerProps) {\n return (\n <Box\n {...props}\n bg={color}\n height={orientation === 'horizontal' ? thickness : '100%'}\n width={orientation === 'vertical' ? thickness : '100%'}\n />\n );\n}\n"]}
|
package/dist/layout/Grid.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type Responsive } from '../core/responsive';
|
|
3
|
-
import { type BoxProps } from './Box';
|
|
4
|
-
import { type SpaceValue } from './helpers';
|
|
5
|
-
export interface GridProps extends Omit<BoxProps, 'children'> {
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
cols: Responsive<number>;
|
|
8
|
-
gap?: Responsive<SpaceValue>;
|
|
9
|
-
rowGap?: Responsive<SpaceValue>;
|
|
10
|
-
colGap?: Responsive<SpaceValue>;
|
|
11
|
-
minItemWidth?: Responsive<number>;
|
|
12
|
-
}
|
|
13
|
-
export declare function Grid({ children, cols, gap, rowGap, colGap, minItemWidth, ...props }: GridProps): React.JSX.Element;
|
|
14
|
-
//# sourceMappingURL=Grid.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../src/layout/Grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAqB,KAAK,UAAU,EAAwB,MAAM,oBAAoB,CAAC;AAE9F,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5D,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC3D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IACzB,GAAG,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAChC,YAAY,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;CACnC;AAED,wBAAgB,IAAI,CAAC,EACnB,QAAQ,EACR,IAAI,EACJ,GAAO,EACP,MAAM,EACN,MAAM,EACN,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,SAAS,qBAyDX"}
|
package/dist/layout/Grid.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import { resolveResponsive, useResponsiveRuntime } from '../core/responsive';
|
|
4
|
-
import { useTheme } from '../theme/ThemeContext';
|
|
5
|
-
import { Box } from './Box';
|
|
6
|
-
import { resolveSpacing } from './helpers';
|
|
7
|
-
export function Grid({ children, cols, gap = 0, rowGap, colGap, minItemWidth, ...props }) {
|
|
8
|
-
const { theme } = useTheme();
|
|
9
|
-
const { breakpoint } = useResponsiveRuntime();
|
|
10
|
-
const activeCols = Math.max(1, Math.floor(resolveResponsive(cols, breakpoint) ?? 1));
|
|
11
|
-
const defaultGap = resolveResponsive(gap, breakpoint) ?? 0;
|
|
12
|
-
const activeRowGap = resolveResponsive(rowGap, breakpoint) ?? defaultGap;
|
|
13
|
-
const activeColGap = resolveResponsive(colGap, breakpoint) ?? defaultGap;
|
|
14
|
-
const rowSpacing = Number(resolveSpacing(theme, activeRowGap) ?? 0);
|
|
15
|
-
const colSpacing = Number(resolveSpacing(theme, activeColGap) ?? 0);
|
|
16
|
-
const activeMinItemWidth = resolveResponsive(minItemWidth, breakpoint);
|
|
17
|
-
const basisPercent = `${100 / activeCols}%`;
|
|
18
|
-
const nodes = React.Children.toArray(children);
|
|
19
|
-
return (<Box {...props}>
|
|
20
|
-
<View style={{
|
|
21
|
-
flexDirection: 'row',
|
|
22
|
-
flexWrap: 'wrap',
|
|
23
|
-
marginTop: -rowSpacing / 2,
|
|
24
|
-
marginLeft: -colSpacing / 2,
|
|
25
|
-
marginRight: -colSpacing / 2,
|
|
26
|
-
}}>
|
|
27
|
-
{nodes.map((node, index) => {
|
|
28
|
-
const itemStyle = activeMinItemWidth !== undefined
|
|
29
|
-
? {
|
|
30
|
-
minWidth: activeMinItemWidth,
|
|
31
|
-
flexBasis: activeMinItemWidth,
|
|
32
|
-
flexGrow: 1,
|
|
33
|
-
}
|
|
34
|
-
: {
|
|
35
|
-
width: basisPercent,
|
|
36
|
-
flexBasis: basisPercent,
|
|
37
|
-
};
|
|
38
|
-
return (<View key={String(index)} style={{
|
|
39
|
-
paddingTop: rowSpacing / 2,
|
|
40
|
-
paddingBottom: rowSpacing / 2,
|
|
41
|
-
paddingLeft: colSpacing / 2,
|
|
42
|
-
paddingRight: colSpacing / 2,
|
|
43
|
-
...itemStyle,
|
|
44
|
-
}}>
|
|
45
|
-
{node}
|
|
46
|
-
</View>);
|
|
47
|
-
})}
|
|
48
|
-
</View>
|
|
49
|
-
</Box>);
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=Grid.js.map
|
package/dist/layout/Grid.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.js","sourceR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import React from 'react';\nimport { View, type ViewStyle } from 'react-native';\n\nimport { resolveResponsive, type Responsive, useResponsiveRuntime } from '../core/responsive';\nimport { useTheme } from '../theme/ThemeContext';\nimport { Box, type BoxProps } from './Box';\nimport { resolveSpacing, type SpaceValue } from './helpers';\n\nexport interface GridProps extends Omit<BoxProps, 'children'> {\n children?: React.ReactNode;\n cols: Responsive<number>;\n gap?: Responsive<SpaceValue>;\n rowGap?: Responsive<SpaceValue>;\n colGap?: Responsive<SpaceValue>;\n minItemWidth?: Responsive<number>;\n}\n\nexport function Grid({\n children,\n cols,\n gap = 0,\n rowGap,\n colGap,\n minItemWidth,\n ...props\n}: GridProps) {\n const { theme } = useTheme();\n const { breakpoint } = useResponsiveRuntime();\n\n const activeCols = Math.max(1, Math.floor(resolveResponsive(cols, breakpoint) ?? 1));\n const defaultGap = resolveResponsive(gap, breakpoint) ?? 0;\n const activeRowGap = resolveResponsive(rowGap, breakpoint) ?? defaultGap;\n const activeColGap = resolveResponsive(colGap, breakpoint) ?? defaultGap;\n const rowSpacing = Number(resolveSpacing(theme, activeRowGap) ?? 0);\n const colSpacing = Number(resolveSpacing(theme, activeColGap) ?? 0);\n const activeMinItemWidth = resolveResponsive(minItemWidth, breakpoint);\n\n const basisPercent: `${number}%` = `${100 / activeCols}%`;\n const nodes = React.Children.toArray(children);\n\n return (\n <Box {...props}>\n <View\n style={{\n flexDirection: 'row',\n flexWrap: 'wrap',\n marginTop: -rowSpacing / 2,\n marginLeft: -colSpacing / 2,\n marginRight: -colSpacing / 2,\n }}\n >\n {nodes.map((node, index) => {\n const itemStyle: ViewStyle =\n activeMinItemWidth !== undefined\n ? {\n minWidth: activeMinItemWidth,\n flexBasis: activeMinItemWidth,\n flexGrow: 1,\n }\n : {\n width: basisPercent,\n flexBasis: basisPercent,\n };\n\n return (\n <View\n key={String(index)}\n style={{\n paddingTop: rowSpacing / 2,\n paddingBottom: rowSpacing / 2,\n paddingLeft: colSpacing / 2,\n paddingRight: colSpacing / 2,\n ...itemStyle,\n }}\n >\n {node}\n </View>\n );\n })}\n </View>\n </Box>\n );\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type KeyboardAvoidingViewProps as ReactNativeKeyboardAvoidingViewProps } from 'react-native';
|
|
3
|
-
/*** Preserve React Native keyboard avoidance behind the stable Surface layout boundary. */
|
|
4
|
-
export declare function KeyboardAvoidingView(props: KeyboardAvoidingViewProps): React.JSX.Element;
|
|
5
|
-
export type KeyboardAvoidingViewBehavior = NonNullable<ReactNativeKeyboardAvoidingViewProps['behavior']>;
|
|
6
|
-
export type KeyboardAvoidingViewProps = ReactNativeKeyboardAvoidingViewProps;
|
|
7
|
-
//# sourceMappingURL=KeyboardAvoidingView.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KeyboardAvoidingView.d.ts","sourceRoot":"","sources":["../../src/layout/KeyboardAvoidingView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,KAAK,yBAAyB,IAAI,oCAAoC,EACvE,MAAM,cAAc,CAAC;AAEtB,2FAA2F;AAC3F,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,qBAEpE;AAED,MAAM,MAAM,4BAA4B,GAAG,WAAW,CACpD,oCAAoC,CAAC,UAAU,CAAC,CACjD,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,oCAAoC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KeyboardAvoidingView.js","sourceRoot":"","sources":["../../src/layout/KeyboardAvoidingView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,oBAAoB,IAAI,+BAA+B,GAExD,MAAM,cAAc,CAAC;AAEtB,2FAA2F;AAC3F,MAAM,UAAU,oBAAoB,CAAC,KAAgC;IACnE,OAAO,CAAC,+BAA+B,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACxD,CAAC","sourcesContent":["import React from 'react';\nimport {\n KeyboardAvoidingView as ReactNativeKeyboardAvoidingView,\n type KeyboardAvoidingViewProps as ReactNativeKeyboardAvoidingViewProps,\n} from 'react-native';\n\n/*** Preserve React Native keyboard avoidance behind the stable Surface layout boundary. */\nexport function KeyboardAvoidingView(props: KeyboardAvoidingViewProps) {\n return <ReactNativeKeyboardAvoidingView {...props} />;\n}\n\nexport type KeyboardAvoidingViewBehavior = NonNullable<\n ReactNativeKeyboardAvoidingViewProps['behavior']\n>;\n\nexport type KeyboardAvoidingViewProps = ReactNativeKeyboardAvoidingViewProps;\n"]}
|
package/dist/layout/Stack.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import { type Responsive } from '../core/responsive';
|
|
3
|
-
import { type BoxProps } from './Box';
|
|
4
|
-
import { type SpaceValue } from './helpers';
|
|
5
|
-
export interface StackProps extends Omit<BoxProps, 'children'> {
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
direction?: Responsive<'row' | 'column'>;
|
|
8
|
-
gap?: Responsive<SpaceValue>;
|
|
9
|
-
align?: Responsive<'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline'>;
|
|
10
|
-
justify?: Responsive<'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly'>;
|
|
11
|
-
wrap?: Responsive<'nowrap' | 'wrap'>;
|
|
12
|
-
}
|
|
13
|
-
export declare function Stack({ children, direction, gap, align, justify, wrap, ...props }: StackProps): React.JSX.Element;
|
|
14
|
-
//# sourceMappingURL=Stack.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../src/layout/Stack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAqB,KAAK,UAAU,EAAwB,MA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,GAAG,GAAG,CAAC,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACJ,GAAG,KAAK,EACG;IACX,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,MAAM,EAAE,UAAU,EAAE,GAAG,oBAAoB,EAAE,CAAC;IAC9C,MAAM,eAAe,GAAG,iBAAiB,CAAC,SAAS,EAAE,UAAU,CAAC,IAAI,QAAQ,CAAC;IAC7E,MAAM,SAAS,GAAG,cAAc,CAAC,KAAK,EAAE,iBAAiB,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC;IACjF,MAAM,WAAW,GAAG,iBAAiB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IACzD,MAAM,aAAa,GAAG,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC7D,MAAM,UAAU,GAAG,iBAAiB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAEvD,OAAO,CACL,CAAC,GAAG,CACF,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC;YACL;gBACE,aAAa,EAAE,eAAe;gBAC9B,GAAG,EAAE,SAAS;gBACd,UAAU,EAAE,WAAW;gBACvB,cAAc,EAAE,aAAa;gBAC7B,QAAQ,EAAE,UAAU;aACrB;YACD,KAAK,CAAC,KAAK;SACZ,CAAC,CAEF;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC","sourcesContent":["import type React from 'react';\n\nimport { resolveResponsive, type Responsive, useResponsiveRuntime } from '../core/responsive';\nimport { useTheme } from '../theme/ThemeContext';\nimport { Box, type BoxProps } from './Box';\nimport { resolveSpacing, type SpaceValue } from './helpers';\n\nexport interface StackProps extends Omit<BoxProps, 'children'> {\n children?: React.ReactNode;\n direction?: Responsive<'row' | 'column'>;\n gap?: Responsive<SpaceValue>;\n align?: Responsive<'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline'>;\n justify?: Responsive<\n 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly'\n >;\n wrap?: Responsive<'nowrap' | 'wrap'>;\n}\n\nexport function Stack({\n children,\n direction = 'column',\n gap = 0,\n align,\n justify,\n wrap,\n ...props\n}: StackProps) {\n const { theme } = useTheme();\n const { breakpoint } = useResponsiveRuntime();\n const activeDirection = resolveResponsive(direction, breakpoint) ?? 'column';\n const activeGap = resolveSpacing(theme, resolveResponsive(gap, breakpoint)) ?? 0;\n const activeAlign = resolveResponsive(align, breakpoint);\n const activeJustify = resolveResponsive(justify, breakpoint);\n const activeWrap = resolveResponsive(wrap, breakpoint);\n\n return (\n <Box\n {...props}\n style={[\n {\n flexDirection: activeDirection,\n gap: activeGap,\n alignItems: activeAlign,\n justifyContent: activeJustify,\n flexWrap: activeWrap,\n },\n props.style,\n ]}\n >\n {children}\n </Box>\n );\n}\n"]}
|
package/dist/layout/Surface.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type BoxProps } from './Box';
|
|
3
|
-
export type SurfaceVariant = 'default' | 'subtle' | 'raised' | 'outline';
|
|
4
|
-
export interface SurfaceProps extends Omit<BoxProps, 'bg' | 'borderColor' | 'borderWidth'> {
|
|
5
|
-
variant?: SurfaceVariant;
|
|
6
|
-
}
|
|
7
|
-
export declare function Surface({ variant, radius, style, ...props }: SurfaceProps): React.JSX.Element;
|
|
8
|
-
//# sourceMappingURL=Surface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Surface.d.ts","sourceRoot":"","sources":["../../src/layout/Surface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEzE,MAAM,WAAW,YAAa,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GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,KAAK,EAAgB;IAC1F,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAE7B,MAAM,eAAe,GACnB,OAAO,KAAK,QAAQ;QAClB,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM;QAChC,CAAC,CAAC,OAAO,KAAK,QAAQ;YACpB,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM;YAChC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC;IACxC,MAAM,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;IAEnD,OAAO,CACL,CAAC,GAAG,CACF,IAAI,KAAK,CAAC,CACV,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,CAAC,2BAA2B,CAAC,OAAO,EAAE,WAAW,EAAE,eAAe,CAAC,EAAE,KAAK,CAAC,CAAC,EACnF,CACH,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport type { ViewStyle } from 'react-native';\n\nimport { useTheme } from '../theme/ThemeContext';\nimport { Box, type BoxProps } from './Box';\n\nexport type SurfaceVariant = 'default' | 'subtle' | 'raised' | 'outline';\n\nexport interface SurfaceProps extends Omit<BoxProps, 'bg' | 'borderColor' | 'borderWidth'> {\n variant?: SurfaceVariant;\n}\n\nfunction resolveSurfaceVariantStyles(\n variant: SurfaceVariant,\n borderColor: string,\n backgroundColor: string,\n): ViewStyle {\n switch (variant) {\n case 'subtle':\n return {\n backgroundColor,\n borderColor: 'transparent',\n borderWidth: 0,\n };\n case 'raised':\n return {\n backgroundColor,\n borderColor: 'transparent',\n borderWidth: 0,\n elevation: 2,\n shadowColor: '#000000',\n shadowOpacity: 0.08,\n shadowOffset: { width: 0, height: 2 },\n shadowRadius: 8,\n };\n case 'outline':\n return {\n backgroundColor: 'transparent',\n borderColor,\n borderWidth: 1,\n };\n case 'default':\n default:\n return {\n backgroundColor,\n borderColor,\n borderWidth: 1,\n };\n }\n}\n\nexport function Surface({ variant = 'default', radius = 'm', style, ...props }: SurfaceProps) {\n const { theme } = useTheme();\n\n const backgroundColor =\n variant === 'subtle'\n ? theme.semantics.surface.subtle\n : variant === 'raised'\n ? theme.semantics.surface.raised\n : theme.semantics.surface.default;\n const borderColor = theme.semantics.border.default;\n\n return (\n <Box\n {...props}\n radius={radius}\n style={[resolveSurfaceVariantStyles(variant, borderColor, backgroundColor), style]}\n />\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/layout/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzD,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,KAAK,UAAU,GAAG,MAAM,YAAY,CAAC,SAAS,CAAC,CAAC;AAChD,KAAK,WAAW,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,CAAC;AAC/C,KAAK,UAAU,GAAG,MAAM,YAAY,CAAC,QAAQ,CAAC,CAAC;AAE/C,KAAK,WAAW,GAAG,MAAM,GAAG,WAAW,CAAC;AACxC,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,UAAU,CAAC;AAC7C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,UAAU,CAAC;AAE7C,MAAM,WAAW,aAAa;IAC5B,CAAC,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAC3B,EAAE,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAC5B,EAAE,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAC5B,EAAE,CAAC,EAAE,UAAU,CAAC,UAAU,CA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AC;IAC1B,QAAQ,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAChC,SAAS,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACxC,SAAS,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;IAC/C,QAAQ,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;IAC7C,GAAG,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IACzB,MAAM,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAC5B,IAAI,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAC1B,KAAK,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;IAC7C,MAAM,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,UAAU,GAAG,SAAS,GAC5B,MAAM,GAAG,SAAS,CAIpB;AA4BD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,YAAY,EACnB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,aAAa,GACnB,SAAS,CA6GX"}
|
package/dist/layout/helpers.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { resolveResponsive } from '../core/responsive/resolve';
|
|
2
|
-
import { resolveToken } from '../theme/resolveToken';
|
|
3
|
-
export function resolveSpacing(theme, value) {
|
|
4
|
-
if (value === undefined)
|
|
5
|
-
return undefined;
|
|
6
|
-
if (typeof value === 'number')
|
|
7
|
-
return value;
|
|
8
|
-
return theme.spacing[value];
|
|
9
|
-
}
|
|
10
|
-
function resolveRadius(theme, value) {
|
|
11
|
-
if (value === undefined)
|
|
12
|
-
return undefined;
|
|
13
|
-
if (typeof value === 'number')
|
|
14
|
-
return value;
|
|
15
|
-
return theme.radii[value];
|
|
16
|
-
}
|
|
17
|
-
function resolveColor(theme, value) {
|
|
18
|
-
if (value === undefined)
|
|
19
|
-
return undefined;
|
|
20
|
-
if (Object.prototype.hasOwnProperty.call(theme.colors, value)) {
|
|
21
|
-
return theme.colors[value];
|
|
22
|
-
}
|
|
23
|
-
return value;
|
|
24
|
-
}
|
|
25
|
-
function resolveDimension(theme, value) {
|
|
26
|
-
if (value === undefined || typeof value === 'number')
|
|
27
|
-
return value;
|
|
28
|
-
return resolveToken(theme.spacing, value);
|
|
29
|
-
}
|
|
30
|
-
function assignIfDefined(target, key, value) {
|
|
31
|
-
if (value !== undefined)
|
|
32
|
-
target[key] = value;
|
|
33
|
-
}
|
|
34
|
-
export function resolveBoxStyles(theme, breakpoint, props) {
|
|
35
|
-
const styles = {
|
|
36
|
-
elevation: 0,
|
|
37
|
-
};
|
|
38
|
-
const p = resolveSpacing(theme, resolveResponsive(props.p, breakpoint));
|
|
39
|
-
const px = resolveSpacing(theme, resolveResponsive(props.px, breakpoint));
|
|
40
|
-
const py = resolveSpacing(theme, resolveResponsive(props.py, breakpoint));
|
|
41
|
-
const pt = resolveSpacing(theme, resolveResponsive(props.pt, breakpoint));
|
|
42
|
-
const pb = resolveSpacing(theme, resolveResponsive(props.pb, breakpoint));
|
|
43
|
-
const pl = resolveSpacing(theme, resolveResponsive(props.pl, breakpoint));
|
|
44
|
-
const pr = resolveSpacing(theme, resolveResponsive(props.pr, breakpoint));
|
|
45
|
-
const m = resolveSpacing(theme, resolveResponsive(props.m, breakpoint));
|
|
46
|
-
const mx = resolveSpacing(theme, resolveResponsive(props.mx, breakpoint));
|
|
47
|
-
const my = resolveSpacing(theme, resolveResponsive(props.my, breakpoint));
|
|
48
|
-
const mt = resolveSpacing(theme, resolveResponsive(props.mt, breakpoint));
|
|
49
|
-
const mb = resolveSpacing(theme, resolveResponsive(props.mb, breakpoint));
|
|
50
|
-
const ml = resolveSpacing(theme, resolveResponsive(props.ml, breakpoint));
|
|
51
|
-
const mr = resolveSpacing(theme, resolveResponsive(props.mr, breakpoint));
|
|
52
|
-
assignIfDefined(styles, 'padding', p);
|
|
53
|
-
assignIfDefined(styles, 'paddingHorizontal', px);
|
|
54
|
-
assignIfDefined(styles, 'paddingVertical', py);
|
|
55
|
-
assignIfDefined(styles, 'paddingTop', pt);
|
|
56
|
-
assignIfDefined(styles, 'paddingBottom', pb);
|
|
57
|
-
assignIfDefined(styles, 'paddingLeft', pl);
|
|
58
|
-
assignIfDefined(styles, 'paddingRight', pr);
|
|
59
|
-
assignIfDefined(styles, 'margin', m);
|
|
60
|
-
assignIfDefined(styles, 'marginHorizontal', mx);
|
|
61
|
-
assignIfDefined(styles, 'marginVertical', my);
|
|
62
|
-
assignIfDefined(styles, 'marginTop', mt);
|
|
63
|
-
assignIfDefined(styles, 'marginBottom', mb);
|
|
64
|
-
assignIfDefined(styles, 'marginLeft', ml);
|
|
65
|
-
assignIfDefined(styles, 'marginRight', mr);
|
|
66
|
-
assignIfDefined(styles, 'backgroundColor', resolveColor(theme, resolveResponsive(props.bg, breakpoint)));
|
|
67
|
-
assignIfDefined(styles, 'borderRadius', resolveRadius(theme, resolveResponsive(props.radius, breakpoint)));
|
|
68
|
-
assignIfDefined(styles, 'borderWidth', resolveResponsive(props.borderWidth, breakpoint));
|
|
69
|
-
assignIfDefined(styles, 'borderColor', resolveColor(theme, resolveResponsive(props.borderColor, breakpoint)));
|
|
70
|
-
assignIfDefined(styles, 'width', resolveDimension(theme, resolveResponsive(props.width, breakpoint)));
|
|
71
|
-
assignIfDefined(styles, 'height', resolveDimension(theme, resolveResponsive(props.height, breakpoint)));
|
|
72
|
-
assignIfDefined(styles, 'minWidth', resolveDimension(theme, resolveResponsive(props.minWidth, breakpoint)));
|
|
73
|
-
assignIfDefined(styles, 'maxWidth', resolveDimension(theme, resolveResponsive(props.maxWidth, breakpoint)));
|
|
74
|
-
assignIfDefined(styles, 'minHeight', resolveDimension(theme, resolveResponsive(props.minHeight, breakpoint)));
|
|
75
|
-
assignIfDefined(styles, 'maxHeight', resolveDimension(theme, resolveResponsive(props.maxHeight, breakpoint)));
|
|
76
|
-
assignIfDefined(styles, 'flex', resolveResponsive(props.flex, breakpoint));
|
|
77
|
-
assignIfDefined(styles, 'flexGrow', resolveResponsive(props.flexGrow, breakpoint));
|
|
78
|
-
assignIfDefined(styles, 'flexShrink', resolveResponsive(props.flexShrink, breakpoint));
|
|
79
|
-
assignIfDefined(styles, 'flexBasis', resolveResponsive(props.flexBasis, breakpoint));
|
|
80
|
-
assignIfDefined(styles, 'alignSelf', resolveResponsive(props.alignSelf, breakpoint));
|
|
81
|
-
assignIfDefined(styles, 'position', resolveResponsive(props.position, breakpoint));
|
|
82
|
-
assignIfDefined(styles, 'top', resolveResponsive(props.top, breakpoint));
|
|
83
|
-
assignIfDefined(styles, 'bottom', resolveResponsive(props.bottom, breakpoint));
|
|
84
|
-
assignIfDefined(styles, 'left', resolveResponsive(props.left, breakpoint));
|
|
85
|
-
assignIfDefined(styles, 'right', resolveResponsive(props.right, breakpoint));
|
|
86
|
-
assignIfDefined(styles, 'overflow', resolveResponsive(props.overflow, breakpoint));
|
|
87
|
-
assignIfDefined(styles, 'zIndex', resolveResponsive(props.zIndex, breakpoint));
|
|
88
|
-
assignIfDefined(styles, 'opacity', resolveResponsive(props.opacity, breakpoint));
|
|
89
|
-
return styles;
|
|
90
|
-
}
|
|
91
|
-
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/layout/helpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,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MAAM,EAAE,UAAU,EAAE,iBAAiB,CAAC,KAAK,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;IACnF,eAAe,CAAC,MAAM,EAAE,QAAQ,EAAE,iBAAiB,CAAC,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;IAC/E,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,iBAAiB,CAAC,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;IAEjF,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import type { StyleProp, ViewStyle } from 'react-native';\n\nimport { resolveResponsive } from '../core/responsive/resolve';\nimport type { Breakpoint, Responsive } from '../core/responsive/types';\nimport { resolveToken } from '../theme/resolveToken';\nimport type { SurfaceTheme } from '../theme/types';\n\ntype SpaceToken = keyof SurfaceTheme['spacing'];\ntype RadiusToken = keyof SurfaceTheme['radii'];\ntype ColorToken = keyof SurfaceTheme['colors'];\n\ntype RadiusValue = number | RadiusToken;\nexport type SpaceValue = number | SpaceToken;\nexport type ColorValue = string | ColorToken;\n\nexport interface BoxStyleProps {\n p?: Responsive<SpaceValue>;\n px?: Responsive<SpaceValue>;\n py?: Responsive<SpaceValue>;\n pt?: Responsive<SpaceValue>;\n pb?: Responsive<SpaceValue>;\n pl?: Responsive<SpaceValue>;\n pr?: Responsive<SpaceValue>;\n m?: Responsive<SpaceValue>;\n mx?: Responsive<SpaceValue>;\n my?: Responsive<SpaceValue>;\n mt?: Responsive<SpaceValue>;\n mb?: Responsive<SpaceValue>;\n ml?: Responsive<SpaceValue>;\n mr?: Responsive<SpaceValue>;\n bg?: Responsive<ColorValue>;\n radius?: Responsive<RadiusValue>;\n borderWidth?: Responsive<number>;\n borderColor?: Responsive<ColorValue>;\n width?: Responsive<number | string>;\n height?: Responsive<number | string>;\n minWidth?: Responsive<number | string>;\n maxWidth?: Responsive<number | string>;\n minHeight?: Responsive<number | string>;\n maxHeight?: Responsive<number | string>;\n flex?: Responsive<number>;\n flexGrow?: Responsive<number>;\n flexShrink?: Responsive<number>;\n flexBasis?: Responsive<number | string>;\n alignSelf?: Responsive<ViewStyle['alignSelf']>;\n position?: Responsive<ViewStyle['position']>;\n top?: Responsive<number>;\n bottom?: Responsive<number>;\n left?: Responsive<number>;\n right?: Responsive<number>;\n overflow?: Responsive<ViewStyle['overflow']>;\n zIndex?: Responsive<number>;\n opacity?: Responsive<number>;\n style?: StyleProp<ViewStyle>;\n}\n\nexport function resolveSpacing(\n theme: SurfaceTheme,\n value: SpaceValue | undefined,\n): number | undefined {\n if (value === undefined) return undefined;\n if (typeof value === 'number') return value;\n return theme.spacing[value as SpaceToken];\n}\n\nfunction resolveRadius(theme: SurfaceTheme, value: RadiusValue | undefined): number | undefined {\n if (value === undefined) return undefined;\n if (typeof value === 'number') return value;\n return theme.radii[value];\n}\n\nfunction resolveColor(theme: SurfaceTheme, value: ColorValue | undefined): string | undefined {\n if (value === undefined) return undefined;\n if (Object.prototype.hasOwnProperty.call(theme.colors, value)) {\n return theme.colors[value];\n }\n return value as string;\n}\n\nfunction resolveDimension(\n theme: SurfaceTheme,\n value: number | string | undefined,\n): number | string | undefined {\n if (value === undefined || typeof value === 'number') return value;\n return resolveToken(theme.spacing, value);\n}\n\nfunction assignIfDefined<T, K extends keyof T>(target: T, key: K, value: T[K] | undefined) {\n if (value !== undefined) target[key] = value;\n}\n\nexport function resolveBoxStyles(\n theme: SurfaceTheme,\n breakpoint: Breakpoint,\n props: BoxStyleProps,\n): ViewStyle {\n const styles: ViewStyle = {\n elevation: 0,\n };\n\n const p = resolveSpacing(theme, resolveResponsive(props.p, breakpoint));\n const px = resolveSpacing(theme, resolveResponsive(props.px, breakpoint));\n const py = resolveSpacing(theme, resolveResponsive(props.py, breakpoint));\n const pt = resolveSpacing(theme, resolveResponsive(props.pt, breakpoint));\n const pb = resolveSpacing(theme, resolveResponsive(props.pb, breakpoint));\n const pl = resolveSpacing(theme, resolveResponsive(props.pl, breakpoint));\n const pr = resolveSpacing(theme, resolveResponsive(props.pr, breakpoint));\n const m = resolveSpacing(theme, resolveResponsive(props.m, breakpoint));\n const mx = resolveSpacing(theme, resolveResponsive(props.mx, breakpoint));\n const my = resolveSpacing(theme, resolveResponsive(props.my, breakpoint));\n const mt = resolveSpacing(theme, resolveResponsive(props.mt, breakpoint));\n const mb = resolveSpacing(theme, resolveResponsive(props.mb, breakpoint));\n const ml = resolveSpacing(theme, resolveResponsive(props.ml, breakpoint));\n const mr = resolveSpacing(theme, resolveResponsive(props.mr, breakpoint));\n\n assignIfDefined(styles, 'padding', p as ViewStyle['padding']);\n assignIfDefined(styles, 'paddingHorizontal', px as ViewStyle['paddingHorizontal']);\n assignIfDefined(styles, 'paddingVertical', py as ViewStyle['paddingVertical']);\n assignIfDefined(styles, 'paddingTop', pt as ViewStyle['paddingTop']);\n assignIfDefined(styles, 'paddingBottom', pb as ViewStyle['paddingBottom']);\n assignIfDefined(styles, 'paddingLeft', pl as ViewStyle['paddingLeft']);\n assignIfDefined(styles, 'paddingRight', pr as ViewStyle['paddingRight']);\n assignIfDefined(styles, 'margin', m as ViewStyle['margin']);\n assignIfDefined(styles, 'marginHorizontal', mx as ViewStyle['marginHorizontal']);\n assignIfDefined(styles, 'marginVertical', my as ViewStyle['marginVertical']);\n assignIfDefined(styles, 'marginTop', mt as ViewStyle['marginTop']);\n assignIfDefined(styles, 'marginBottom', mb as ViewStyle['marginBottom']);\n assignIfDefined(styles, 'marginLeft', ml as ViewStyle['marginLeft']);\n assignIfDefined(styles, 'marginRight', mr as ViewStyle['marginRight']);\n\n assignIfDefined(\n styles,\n 'backgroundColor',\n resolveColor(theme, resolveResponsive(props.bg, breakpoint)),\n );\n assignIfDefined(\n styles,\n 'borderRadius',\n resolveRadius(theme, resolveResponsive(props.radius, breakpoint)) as ViewStyle['borderRadius'],\n );\n assignIfDefined(styles, 'borderWidth', resolveResponsive(props.borderWidth, breakpoint));\n assignIfDefined(\n styles,\n 'borderColor',\n resolveColor(theme, resolveResponsive(props.borderColor, breakpoint)),\n );\n\n assignIfDefined(\n styles,\n 'width',\n resolveDimension(theme, resolveResponsive(props.width, breakpoint)) as ViewStyle['width'],\n );\n assignIfDefined(\n styles,\n 'height',\n resolveDimension(theme, resolveResponsive(props.height, breakpoint)) as ViewStyle['height'],\n );\n assignIfDefined(\n styles,\n 'minWidth',\n resolveDimension(theme, resolveResponsive(props.minWidth, breakpoint)) as ViewStyle['minWidth'],\n );\n assignIfDefined(\n styles,\n 'maxWidth',\n resolveDimension(theme, resolveResponsive(props.maxWidth, breakpoint)) as ViewStyle['maxWidth'],\n );\n assignIfDefined(\n styles,\n 'minHeight',\n resolveDimension(\n theme,\n resolveResponsive(props.minHeight, breakpoint),\n ) as ViewStyle['minHeight'],\n );\n assignIfDefined(\n styles,\n 'maxHeight',\n resolveDimension(\n theme,\n resolveResponsive(props.maxHeight, breakpoint),\n ) as ViewStyle['maxHeight'],\n );\n\n assignIfDefined(styles, 'flex', resolveResponsive(props.flex, breakpoint));\n assignIfDefined(styles, 'flexGrow', resolveResponsive(props.flexGrow, breakpoint));\n assignIfDefined(styles, 'flexShrink', resolveResponsive(props.flexShrink, breakpoint));\n assignIfDefined(\n styles,\n 'flexBasis',\n resolveResponsive(props.flexBasis, breakpoint) as ViewStyle['flexBasis'],\n );\n assignIfDefined(styles, 'alignSelf', resolveResponsive(props.alignSelf, breakpoint));\n\n assignIfDefined(styles, 'position', resolveResponsive(props.position, breakpoint));\n assignIfDefined(styles, 'top', resolveResponsive(props.top, breakpoint));\n assignIfDefined(styles, 'bottom', resolveResponsive(props.bottom, breakpoint));\n assignIfDefined(styles, 'left', resolveResponsive(props.left, breakpoint));\n assignIfDefined(styles, 'right', resolveResponsive(props.right, breakpoint));\n assignIfDefined(styles, 'overflow', resolveResponsive(props.overflow, breakpoint));\n assignIfDefined(styles, 'zIndex', resolveResponsive(props.zIndex, breakpoint));\n assignIfDefined(styles, 'opacity', resolveResponsive(props.opacity, breakpoint));\n\n return styles;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../src/primitives/heading/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AA8B5C,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAyB1C,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Text } from 'react-native';
|
|
3
|
-
import { useTranslationContext } from '../../context/TranslationContext';
|
|
4
|
-
import { useTheme } from '../../theme/ThemeContext';
|
|
5
|
-
import { resolveHeadingTextStyle } from './resolveHeadingStyle';
|
|
6
|
-
function resolveHeadingContent({ text, children, i18nKey, translate, }) {
|
|
7
|
-
let content = text ?? children;
|
|
8
|
-
if (!i18nKey) {
|
|
9
|
-
return content;
|
|
10
|
-
}
|
|
11
|
-
try {
|
|
12
|
-
const translated = translate(i18nKey);
|
|
13
|
-
if (translated && translated !== i18nKey) {
|
|
14
|
-
content = translated;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
catch (error) {
|
|
18
|
-
console.warn('[Heading] Translation error:', error);
|
|
19
|
-
}
|
|
20
|
-
return content;
|
|
21
|
-
}
|
|
22
|
-
export const Heading = ({ text, children, level = 2, align, color, emphasis = 'default', numberOfLines, i18nKey, testID, }) => {
|
|
23
|
-
const { theme } = useTheme();
|
|
24
|
-
const { t } = useTranslationContext();
|
|
25
|
-
const content = resolveHeadingContent({ text, children, i18nKey, translate: t });
|
|
26
|
-
return (<Text accessibilityRole="header" testID={testID} numberOfLines={numberOfLines} style={resolveHeadingTextStyle(theme, level, align, emphasis, color)}>
|
|
27
|
-
{content}
|
|
28
|
-
</Text>);
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=Heading.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1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E,CAAC,EAAE,CAAC,CAAC;IAEjF,OAAO,CACL,CAAC,IAAI,CACH,iBAAiB,CAAC,QAAQ,CAC1B,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,KAAK,CAAC,CAAC,uBAAuB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAErE;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\n\nimport { useTranslationContext } from '../../context/TranslationContext';\nimport { useTheme } from '../../theme/ThemeContext';\nimport { resolveHeadingTextStyle } from './resolveHeadingStyle';\nimport type { HeadingProps } from './types';\n\nfunction resolveHeadingContent({\n text,\n children,\n i18nKey,\n translate,\n}: {\n text: HeadingProps['text'];\n children: HeadingProps['children'];\n i18nKey: HeadingProps['i18nKey'];\n translate: (key: string) => string;\n}) {\n let content = text ?? children;\n if (!i18nKey) {\n return content;\n }\n\n try {\n const translated = translate(i18nKey);\n if (translated && translated !== i18nKey) {\n content = translated;\n }\n } catch (error) {\n console.warn('[Heading] Translation error:', error);\n }\n\n return content;\n}\n\nexport const Heading: React.FC<HeadingProps> = ({\n text,\n children,\n level = 2,\n align,\n color,\n emphasis = 'default',\n numberOfLines,\n i18nKey,\n testID,\n}) => {\n const { theme } = useTheme();\n const { t } = useTranslationContext();\n const content = resolveHeadingContent({ text, children, i18nKey, translate: t });\n\n return (\n <Text\n accessibilityRole=\"header\"\n testID={testID}\n numberOfLines={numberOfLines}\n style={resolveHeadingTextStyle(theme, level, align, emphasis, color)}\n >\n {content}\n </Text>\n );\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/primitives/heading/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/primitives/heading/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC","sourcesContent":["export { Heading } from './Heading';\nexport type { HeadingLevel, HeadingProps } from './types';\n"]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { TextStyle } from 'react-native';
|
|
2
|
-
import type { SurfaceColor, SurfaceEmphasis } from '../../surfaceColor';
|
|
3
|
-
import type { SurfaceTheme } from '../../theme/types';
|
|
4
|
-
import type { HeadingLevel, HeadingProps } from './types';
|
|
5
|
-
export declare function resolveHeadingTextStyle(theme: SurfaceTheme, level: HeadingLevel, align?: HeadingProps['align'], emphasis?: SurfaceEmphasis, color?: SurfaceColor): TextStyle;
|
|
6
|
-
//# sourceMappingURL=resolveHeadingStyle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveHeadingStyle.d.ts","sourceRoot":"","sources":["../../../src/primitives/heading/resolveHeadingStyle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE1D,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,YAAY,EACnB,KAAK,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,EAC7B,QAAQ,GAAE,eAA2B,EACrC,KAAK,CAAC,EAAE,YAAY,GACnB,SAAS,CAKX"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { resolveTextColor } from '../../internal/resolvers/resolveTextColor';
|
|
2
|
-
import { resolveTextStyles } from '../../internal/resolvers/resolveTextStyles';
|
|
3
|
-
export function resolveHeadingTextStyle(theme, level, align, emphasis = 'default', color) {
|
|
4
|
-
return {
|
|
5
|
-
...resolveTextStyles(theme, { align, level }),
|
|
6
|
-
color: resolveTextColor(theme, emphasis, color),
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=resolveHeadingStyle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveHeadingStyle.js","sourceRoot":"","sources":["../../../src/primitives/heading/resolveHeadingStyle.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAK/E,MAAM,UAAU,uBAAuB,CACrC,KAAmB,EACnB,KAAmB,EACnB,KAA6B,EAC7B,WAA4B,SAAS,EACrC,KAAoB;IAEpB,OAAO;QACL,GAAG,iBAAiB,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QAC7C,KAAK,EAAE,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC;KAChD,CAAC;AACJ,CAAC","sourcesContent":["import type { TextStyle } from 'react-native';\n\nimport { resolveTextColor } from '../../internal/resolvers/resolveTextColor';\nimport { resolveTextStyles } from '../../internal/resolvers/resolveTextStyles';\nimport type { SurfaceColor, SurfaceEmphasis } from '../../surfaceColor';\nimport type { SurfaceTheme } from '../../theme/types';\nimport type { HeadingLevel, HeadingProps } from './types';\n\nexport function resolveHeadingTextStyle(\n theme: SurfaceTheme,\n level: HeadingLevel,\n align?: HeadingProps['align'],\n emphasis: SurfaceEmphasis = 'default',\n color?: SurfaceColor,\n): TextStyle {\n return {\n ...resolveTextStyles(theme, { align, level }),\n color: resolveTextColor(theme, emphasis, color),\n };\n}\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import type { SurfaceColor, SurfaceEmphasis } from '../../surfaceColor';
|
|
3
|
-
export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
4
|
-
export interface HeadingProps {
|
|
5
|
-
text?: string;
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
level?: HeadingLevel;
|
|
8
|
-
align?: 'auto' | 'left' | 'right' | 'center' | 'justify';
|
|
9
|
-
color?: SurfaceColor;
|
|
10
|
-
emphasis?: SurfaceEmphasis;
|
|
11
|
-
numberOfLines?: number;
|
|
12
|
-
i18nKey?: string;
|
|
13
|
-
testID?: string;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/primitives/heading/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAExE,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEjD,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;IACzD,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/primitives/heading/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { SurfaceColor, SurfaceEmphasis } from '../../surfaceColor';\n\nexport type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\n\nexport interface HeadingProps {\n text?: string;\n children?: React.ReactNode;\n level?: HeadingLevel;\n align?: 'auto' | 'left' | 'right' | 'center' | 'justify';\n color?: SurfaceColor;\n emphasis?: SurfaceEmphasis;\n numberOfLines?: number;\n i18nKey?: string;\n testID?: string;\n}\n"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
2
|
-
import type { SurfaceTheme } from '../../theme/types';
|
|
3
|
-
import { type FontIconSource, type SvgIconSource } from './PortableIcon';
|
|
4
|
-
export type { FontIconSource, IconProvider, IconSource, IconVariant, SvgIconSource, } from './PortableIcon';
|
|
5
|
-
interface IconPresentationProps {
|
|
6
|
-
size?: keyof SurfaceTheme['spacing'] | number;
|
|
7
|
-
color?: keyof SurfaceTheme['colors'] | string;
|
|
8
|
-
testID?: string;
|
|
9
|
-
}
|
|
10
|
-
export type IconProps = (FontIconSource & IconPresentationProps & {
|
|
11
|
-
style?: StyleProp<TextStyle>;
|
|
12
|
-
}) | (SvgIconSource & IconPresentationProps & {
|
|
13
|
-
style?: StyleProp<ViewStyle>;
|
|
14
|
-
});
|
|
15
|
-
export declare function Icon(props: IconProps): import("react").JSX.Element;
|
|
16
|
-
//# sourceMappingURL=Icon.d.ts.map
|