@ankhorage/surface 4.1.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 +12 -0
- package/README.md +1 -1
- 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/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.js +7 -0
- 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 -12
- package/dist/layout/index.d.ts.map +1 -1
- package/dist/layout/index.js +0 -6
- 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 +59 -19
- 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 -12
- 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 +18 -2
- 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/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/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,14 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useTheme } from '
|
|
3
|
-
import { Box } from '
|
|
2
|
+
import { useTheme } from '../../../../theme/ThemeContext';
|
|
3
|
+
import { Box } from '../../../layout/public';
|
|
4
|
+
/*** Renders a themed container surface with semantic elevation and border variants. */
|
|
5
|
+
export function Surface({ variant = 'default', radius = 'm', style, ...props }) {
|
|
6
|
+
const { theme } = useTheme();
|
|
7
|
+
const backgroundColor = variant === 'subtle'
|
|
8
|
+
? theme.semantics.surface.subtle
|
|
9
|
+
: variant === 'raised'
|
|
10
|
+
? theme.semantics.surface.raised
|
|
11
|
+
: theme.semantics.surface.default;
|
|
12
|
+
const borderColor = theme.semantics.border.default;
|
|
13
|
+
return (<Box {...props} radius={radius} style={[resolveSurfaceVariantStyles(variant, borderColor, backgroundColor), style]}/>);
|
|
14
|
+
}
|
|
15
|
+
/*** Resolves the semantic visual treatment for one Surface variant. */
|
|
4
16
|
function resolveSurfaceVariantStyles(variant, borderColor, backgroundColor) {
|
|
5
17
|
switch (variant) {
|
|
6
18
|
case 'subtle':
|
|
7
|
-
return {
|
|
8
|
-
backgroundColor,
|
|
9
|
-
borderColor: 'transparent',
|
|
10
|
-
borderWidth: 0,
|
|
11
|
-
};
|
|
19
|
+
return { backgroundColor, borderColor: 'transparent', borderWidth: 0 };
|
|
12
20
|
case 'raised':
|
|
13
21
|
return {
|
|
14
22
|
backgroundColor,
|
|
@@ -21,28 +29,9 @@ function resolveSurfaceVariantStyles(variant, borderColor, backgroundColor) {
|
|
|
21
29
|
shadowRadius: 8,
|
|
22
30
|
};
|
|
23
31
|
case 'outline':
|
|
24
|
-
return {
|
|
25
|
-
backgroundColor: 'transparent',
|
|
26
|
-
borderColor,
|
|
27
|
-
borderWidth: 1,
|
|
28
|
-
};
|
|
32
|
+
return { backgroundColor: 'transparent', borderColor, borderWidth: 1 };
|
|
29
33
|
case 'default':
|
|
30
|
-
|
|
31
|
-
return {
|
|
32
|
-
backgroundColor,
|
|
33
|
-
borderColor,
|
|
34
|
-
borderWidth: 1,
|
|
35
|
-
};
|
|
34
|
+
return { backgroundColor, borderColor, borderWidth: 1 };
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
|
-
export function Surface({ variant = 'default', radius = 'm', style, ...props }) {
|
|
39
|
-
const { theme } = useTheme();
|
|
40
|
-
const backgroundColor = variant === 'subtle'
|
|
41
|
-
? theme.semantics.surface.subtle
|
|
42
|
-
: variant === 'raised'
|
|
43
|
-
? theme.semantics.surface.raised
|
|
44
|
-
: theme.semantics.surface.default;
|
|
45
|
-
const borderColor = theme.semantics.border.default;
|
|
46
|
-
return (<Box {...props} radius={radius} style={[resolveSurfaceVariantStyles(variant, borderColor, backgroundColor), style]}/>);
|
|
47
|
-
}
|
|
48
37
|
//# sourceMappingURL=Surface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Surface.js","sourceRoot":"","sources":["../../../../../src/features/surface/adapters/inbound/Surface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE1D,OAAO,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAE7C,uFAAuF;AACvF,MAAM,UAAU,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,EAAE,MAAM,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,KAAK,EAAgB;IAC1F,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,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;AAED,uEAAuE;AACvE,SAAS,2BAA2B,CAClC,OAAuB,EACvB,WAAmB,EACnB,eAAuB;IAEvB,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,QAAQ;YACX,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC;QACzE,KAAK,QAAQ;YACX,OAAO;gBACL,eAAe;gBACf,WAAW,EAAE,aAAa;gBAC1B,WAAW,EAAE,CAAC;gBACd,SAAS,EAAE,CAAC;gBACZ,WAAW,EAAE,SAAS;gBACtB,aAAa,EAAE,IAAI;gBACnB,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;gBACrC,YAAY,EAAE,CAAC;aAChB,CAAC;QACJ,KAAK,SAAS;YACZ,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC;QACzE,KAAK,SAAS;YACZ,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC;IAC5D,CAAC;AACH,CAAC","sourcesContent":["import React from 'react';\nimport type { ViewStyle } from 'react-native';\n\nimport { useTheme } from '../../../../theme/ThemeContext';\nimport type { SurfaceProps, SurfaceVariant } from '../../../../types/surface';\nimport { Box } from '../../../layout/public';\n\n/*** Renders a themed container surface with semantic elevation and border variants. */\nexport function Surface({ variant = 'default', radius = 'm', style, ...props }: SurfaceProps) {\n const { theme } = useTheme();\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\n/*** Resolves the semantic visual treatment for one Surface variant. */\nfunction resolveSurfaceVariantStyles(\n variant: SurfaceVariant,\n borderColor: string,\n backgroundColor: string,\n): ViewStyle {\n switch (variant) {\n case 'subtle':\n return { backgroundColor, borderColor: 'transparent', borderWidth: 0 };\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 { backgroundColor: 'transparent', borderColor, borderWidth: 1 };\n case 'default':\n return { backgroundColor, borderColor, borderWidth: 1 };\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/features/surface/public.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/features/surface/public.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["export type { SurfaceProps, SurfaceVariant } from '../../types/surface';\nexport { Surface } from './adapters/inbound/Surface';\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { HeadingProps } from '../../../../types/typography';
|
|
3
|
+
/*** Renders a semantic, translatable heading using Surface typography tokens. */
|
|
4
|
+
export declare function Heading({ text, children, level, align, color, emphasis, numberOfLines, i18nKey, testID, }: HeadingProps): React.JSX.Element;
|
|
5
|
+
//# sourceMappingURL=Heading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../../../src/features/typography/adapters/inbound/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAGjE,iFAAiF;AACjF,wBAAgB,OAAO,CAAC,EACtB,IAAI,EACJ,QAAQ,EACR,KAAS,EACT,KAAK,EACL,KAAK,EACL,QAAoB,EACpB,aAAa,EACb,OAAO,EACP,MAAM,GACP,EAAE,YAAY,qBAed"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text as ReactNativeText } from 'react-native';
|
|
3
|
+
import { useTranslationContext } from '../../../../context/TranslationContext';
|
|
4
|
+
import { useTheme } from '../../../../theme/ThemeContext';
|
|
5
|
+
import { resolveHeadingTextStyle } from '../../utils/resolveHeadingTextStyle';
|
|
6
|
+
/*** Renders a semantic, translatable heading using Surface typography tokens. */
|
|
7
|
+
export function Heading({ text, children, level = 2, align, color, emphasis = 'default', numberOfLines, i18nKey, testID, }) {
|
|
8
|
+
const { theme } = useTheme();
|
|
9
|
+
const { t } = useTranslationContext();
|
|
10
|
+
const content = resolveHeadingContent({ text, children, i18nKey, translate: t });
|
|
11
|
+
return (<ReactNativeText accessibilityRole="header" testID={testID} numberOfLines={numberOfLines} style={resolveHeadingTextStyle(theme, level, align, emphasis, color)}>
|
|
12
|
+
{content}
|
|
13
|
+
</ReactNativeText>);
|
|
14
|
+
}
|
|
15
|
+
/*** Resolves authored or translated heading content without mutating source input. */
|
|
16
|
+
function resolveHeadingContent({ text, children, i18nKey, translate, }) {
|
|
17
|
+
const content = text ?? children;
|
|
18
|
+
if (!i18nKey)
|
|
19
|
+
return content;
|
|
20
|
+
try {
|
|
21
|
+
const translated = translate(i18nKey);
|
|
22
|
+
return translated && translated !== i18nKey ? translated : content;
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
console.warn('[Heading] Translation error:', error);
|
|
26
|
+
return content;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=Heading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Heading.js","sourceRoot":"","sources":["../../../../../src/features/typography/adapters/inbound/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE9E,iFAAiF;AACjF,MAAM,UAAU,OAAO,CAAC,EACtB,IAAI,EACJ,QAAQ,EACR,KAAK,GAAG,CAAC,EACT,KAAK,EACL,KAAK,EACL,QAAQ,GAAG,SAAS,EACpB,aAAa,EACb,OAAO,EACP,MAAM,GACO;IACb,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,MAAM,EAAE,CAAC,EAAE,GAAG,qBAAqB,EAAE,CAAC;IACtC,MAAM,OAAO,GAAG,qBAAqB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;IAEjF,OAAO,CACL,CAAC,eAAe,CACd,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,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC;AAED,sFAAsF;AACtF,SAAS,qBAAqB,CAAC,EAC7B,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,SAAS,GAMV;IACC,MAAM,OAAO,GAAG,IAAI,IAAI,QAAQ,CAAC;IACjC,IAAI,CAAC,OAAO;QAAE,OAAO,OAAO,CAAC;IAE7B,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;QACtC,OAAO,UAAU,IAAI,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC;IACrE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC;QACpD,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC","sourcesContent":["import React from 'react';\nimport { Text as ReactNativeText } from 'react-native';\n\nimport { useTranslationContext } from '../../../../context/TranslationContext';\nimport { useTheme } from '../../../../theme/ThemeContext';\nimport type { HeadingProps } from '../../../../types/typography';\nimport { resolveHeadingTextStyle } from '../../utils/resolveHeadingTextStyle';\n\n/*** Renders a semantic, translatable heading using Surface typography tokens. */\nexport function Heading({\n text,\n children,\n level = 2,\n align,\n color,\n emphasis = 'default',\n numberOfLines,\n i18nKey,\n testID,\n}: HeadingProps) {\n const { theme } = useTheme();\n const { t } = useTranslationContext();\n const content = resolveHeadingContent({ text, children, i18nKey, translate: t });\n\n return (\n <ReactNativeText\n accessibilityRole=\"header\"\n testID={testID}\n numberOfLines={numberOfLines}\n style={resolveHeadingTextStyle(theme, level, align, emphasis, color)}\n >\n {content}\n </ReactNativeText>\n );\n}\n\n/*** Resolves authored or translated heading content without mutating source input. */\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 const content = text ?? children;\n if (!i18nKey) return content;\n\n try {\n const translated = translate(i18nKey);\n return translated && translated !== i18nKey ? translated : content;\n } catch (error) {\n console.warn('[Heading] Translation error:', error);\n return content;\n }\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { TextProps } from '
|
|
2
|
+
import type { TextProps } from '../../../../types/typography';
|
|
3
|
+
/*** Renders translatable body text using Surface semantic typography. */
|
|
3
4
|
export declare function Text({ children, i18nKey, variant, emphasis, color, align, weight, italic, numberOfLines, testID, }: TextProps): React.JSX.Element;
|
|
4
5
|
//# sourceMappingURL=Text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../../src/features/typography/adapters/inbound/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAE9D,yEAAyE;AACzE,wBAAgB,IAAI,CAAC,EACnB,QAAQ,EACR,OAAO,EACP,OAAgB,EAChB,QAAoB,EACpB,KAAK,EACL,KAAK,EACL,MAAM,EACN,MAAc,EACd,aAAa,EACb,MAAM,GACP,EAAE,SAAS,qBAiBX"}
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Text as ReactNativeText } from 'react-native';
|
|
3
|
-
import { useTranslationContext } from '
|
|
4
|
-
import { resolveTextColor, resolveTextStyles } from '
|
|
5
|
-
import { useTheme } from '
|
|
3
|
+
import { useTranslationContext } from '../../../../context/TranslationContext';
|
|
4
|
+
import { resolveTextColor, resolveTextStyles } from '../../../../internal/resolvers';
|
|
5
|
+
import { useTheme } from '../../../../theme/ThemeContext';
|
|
6
|
+
/*** Renders translatable body text using Surface semantic typography. */
|
|
7
|
+
export function Text({ children, i18nKey, variant = 'body', emphasis = 'default', color, align, weight, italic = false, numberOfLines, testID, }) {
|
|
8
|
+
const { theme } = useTheme();
|
|
9
|
+
const { t } = useTranslationContext();
|
|
10
|
+
const content = resolveTextContent(children, i18nKey, t);
|
|
11
|
+
return (<ReactNativeText numberOfLines={numberOfLines} testID={testID} style={[
|
|
12
|
+
resolveTextStyles(theme, { align, italic, variant, weight }),
|
|
13
|
+
{ color: resolveTextColor(theme, emphasis, color) },
|
|
14
|
+
]}>
|
|
15
|
+
{content}
|
|
16
|
+
</ReactNativeText>);
|
|
17
|
+
}
|
|
18
|
+
/*** Resolves authored or translated Text content with a stable fallback. */
|
|
6
19
|
function resolveTextContent(children, i18nKey, translate) {
|
|
7
|
-
if (children !== undefined)
|
|
20
|
+
if (children !== undefined)
|
|
8
21
|
return children;
|
|
9
|
-
|
|
10
|
-
if (!i18nKey) {
|
|
22
|
+
if (!i18nKey)
|
|
11
23
|
return null;
|
|
12
|
-
}
|
|
13
24
|
try {
|
|
14
25
|
const translated = translate(i18nKey);
|
|
15
26
|
return translated && translated !== i18nKey ? translated : i18nKey;
|
|
@@ -19,22 +30,4 @@ function resolveTextContent(children, i18nKey, translate) {
|
|
|
19
30
|
return i18nKey;
|
|
20
31
|
}
|
|
21
32
|
}
|
|
22
|
-
export function Text({ children, i18nKey, variant = 'body', emphasis = 'default', color, align, weight, italic = false, numberOfLines, testID, }) {
|
|
23
|
-
const { theme } = useTheme();
|
|
24
|
-
const { t } = useTranslationContext();
|
|
25
|
-
const content = resolveTextContent(children, i18nKey, t);
|
|
26
|
-
return (<ReactNativeText numberOfLines={numberOfLines} testID={testID} style={[
|
|
27
|
-
resolveTextStyles(theme, {
|
|
28
|
-
align,
|
|
29
|
-
italic,
|
|
30
|
-
variant,
|
|
31
|
-
weight,
|
|
32
|
-
}),
|
|
33
|
-
{
|
|
34
|
-
color: resolveTextColor(theme, emphasis, color),
|
|
35
|
-
},
|
|
36
|
-
]}>
|
|
37
|
-
{content}
|
|
38
|
-
</ReactNativeText>);
|
|
39
|
-
}
|
|
40
33
|
//# sourceMappingURL=Text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../../../src/features/typography/adapters/inbound/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAG1D,yEAAyE;AACzE,MAAM,UAAU,IAAI,CAAC,EACnB,QAAQ,EACR,OAAO,EACP,OAAO,GAAG,MAAM,EAChB,QAAQ,GAAG,SAAS,EACpB,KAAK,EACL,KAAK,EACL,MAAM,EACN,MAAM,GAAG,KAAK,EACd,aAAa,EACb,MAAM,GACI;IACV,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,MAAM,EAAE,CAAC,EAAE,GAAG,qBAAqB,EAAE,CAAC;IACtC,MAAM,OAAO,GAAG,kBAAkB,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;IAEzD,OAAO,CACL,CAAC,eAAe,CACd,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC;YACL,iBAAiB,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;YAC5D,EAAE,KAAK,EAAE,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE;SACpD,CAAC,CAEF;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC;AAED,4EAA4E;AAC5E,SAAS,kBAAkB,CACzB,QAA+B,EAC/B,OAA6B,EAC7B,SAAkC;IAElC,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,QAAQ,CAAC;IAC5C,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAE1B,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;QACtC,OAAO,UAAU,IAAI,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC;IACrE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;QACjD,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC","sourcesContent":["import React from 'react';\nimport { Text as ReactNativeText } from 'react-native';\n\nimport { useTranslationContext } from '../../../../context/TranslationContext';\nimport { resolveTextColor, resolveTextStyles } from '../../../../internal/resolvers';\nimport { useTheme } from '../../../../theme/ThemeContext';\nimport type { TextProps } from '../../../../types/typography';\n\n/*** Renders translatable body text using Surface semantic typography. */\nexport function Text({\n children,\n i18nKey,\n variant = 'body',\n emphasis = 'default',\n color,\n align,\n weight,\n italic = false,\n numberOfLines,\n testID,\n}: TextProps) {\n const { theme } = useTheme();\n const { t } = useTranslationContext();\n const content = resolveTextContent(children, i18nKey, t);\n\n return (\n <ReactNativeText\n numberOfLines={numberOfLines}\n testID={testID}\n style={[\n resolveTextStyles(theme, { align, italic, variant, weight }),\n { color: resolveTextColor(theme, emphasis, color) },\n ]}\n >\n {content}\n </ReactNativeText>\n );\n}\n\n/*** Resolves authored or translated Text content with a stable fallback. */\nfunction resolveTextContent(\n children: TextProps['children'],\n i18nKey: TextProps['i18nKey'],\n translate: (key: string) => string,\n) {\n if (children !== undefined) return children;\n if (!i18nKey) return null;\n\n try {\n const translated = translate(i18nKey);\n return translated && translated !== i18nKey ? translated : i18nKey;\n } catch (error) {\n console.warn('[Text] Translation error:', error);\n return i18nKey;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/features/typography/public.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/features/typography/public.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC","sourcesContent":["export type { HeadingLevel, HeadingProps, TextProps } from '../../types/typography';\nexport { Heading } from './adapters/inbound/Heading';\nexport { Text } from './adapters/inbound/Text';\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
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/typography';
|
|
5
|
+
/*** Resolves theme-driven typography styles for one heading level. */
|
|
6
|
+
export declare function resolveHeadingTextStyle(theme: SurfaceTheme, level: HeadingLevel, align?: HeadingProps['align'], emphasis?: SurfaceEmphasis, color?: SurfaceColor): TextStyle;
|
|
7
|
+
//# sourceMappingURL=resolveHeadingTextStyle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveHeadingTextStyle.d.ts","sourceRoot":"","sources":["../../../../src/features/typography/utils/resolveHeadingTextStyle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE5E,sEAAsE;AACtE,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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { resolveTextColor } from '../../../internal/resolvers/resolveTextColor';
|
|
2
|
+
import { resolveTextStyles } from '../../../internal/resolvers/resolveTextStyles';
|
|
3
|
+
/*** Resolves theme-driven typography styles for one heading level. */
|
|
4
|
+
export function resolveHeadingTextStyle(theme, level, align, emphasis = 'default', color) {
|
|
5
|
+
return {
|
|
6
|
+
...resolveTextStyles(theme, { align, level }),
|
|
7
|
+
color: resolveTextColor(theme, emphasis, color),
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=resolveHeadingTextStyle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveHeadingTextStyle.js","sourceRoot":"","sources":["../../../../src/features/typography/utils/resolveHeadingTextStyle.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAKlF,sEAAsE;AACtE,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/typography';\n\n/*** Resolves theme-driven typography styles for one heading level. */\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"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
export type { BadgeProps } from './components/badge';
|
|
2
|
-
export { Badge } from './components/badge';
|
|
3
|
-
export type { ButtonIconSpec, ButtonProps } from './components/button';
|
|
4
|
-
export { Button } from './components/button';
|
|
5
|
-
export type { CardProps } from './components/card';
|
|
6
|
-
export { Card } from './components/card';
|
|
7
|
-
export type { CheckboxProps } from './components/checkbox';
|
|
8
|
-
export { Checkbox } from './components/checkbox';
|
|
9
1
|
export type { FieldProps } from './components/field';
|
|
10
2
|
export { Field } from './components/field';
|
|
11
3
|
export type { HelperTextProps } from './components/helper-text';
|
|
12
4
|
export { HelperText } from './components/helper-text';
|
|
13
|
-
export type { IconButtonProps } from './components/icon-button';
|
|
14
|
-
export { IconButton } from './components/icon-button';
|
|
15
5
|
export type { LabelProps } from './components/label';
|
|
16
6
|
export { Label } from './components/label';
|
|
17
7
|
export type { ListItemProps } from './components/list-item';
|
|
@@ -20,14 +10,10 @@ export type { MenuAction, MenuActionIntent, MenuItem, MenuProps } from './compon
|
|
|
20
10
|
export { Menu } from './components/menu';
|
|
21
11
|
export type { ModalProps } from './components/modal';
|
|
22
12
|
export { Modal } from './components/modal';
|
|
23
|
-
export type { RadioProps } from './components/radio';
|
|
24
|
-
export { Radio } from './components/radio';
|
|
25
13
|
export type { SwitchProps } from './components/switch';
|
|
26
14
|
export { Switch } from './components/switch';
|
|
27
15
|
export type { TabListProps, TabPanelProps, TabProps, TabsProps } from './components/tabs';
|
|
28
16
|
export { Tab, TabList, TabPanel, Tabs } from './components/tabs';
|
|
29
|
-
export type { TextInputProps } from './components/text-input';
|
|
30
|
-
export { TextInput } from './components/text-input';
|
|
31
17
|
export type { TextareaProps } from './components/textarea';
|
|
32
18
|
export { Textarea } from './components/textarea';
|
|
33
19
|
export type { ToastOptions, ToastProps, ToastStatus } from './components/toast';
|
|
@@ -39,18 +25,34 @@ export { FontProvider, useFontContext } from './context/FontContext';
|
|
|
39
25
|
export type { I18nInstance, TranslationRuntime, Translator } from './context/TranslationContext';
|
|
40
26
|
export { TranslationProvider, useTranslationContext } from './context/TranslationContext';
|
|
41
27
|
export * from './core/responsive';
|
|
28
|
+
export type { BadgeProps } from './features/badge/public';
|
|
29
|
+
export { Badge } from './features/badge/public';
|
|
30
|
+
export type { ButtonIconSpec, ButtonProps, IconButtonProps } from './features/button/public';
|
|
31
|
+
export { Button, IconButton } from './features/button/public';
|
|
32
|
+
export type { CardProps } from './features/card/public';
|
|
33
|
+
export { Card } from './features/card/public';
|
|
34
|
+
export type { CheckboxProps } from './features/form/checkbox/public';
|
|
35
|
+
export { Checkbox } from './features/form/checkbox/public';
|
|
36
|
+
export type { RadioProps } from './features/form/radio/public';
|
|
37
|
+
export { Radio } from './features/form/radio/public';
|
|
38
|
+
export type { TextInputProps } from './features/form/text-input/public';
|
|
39
|
+
export { TextInput } from './features/form/text-input/public';
|
|
40
|
+
export type { FontIconSource, IconProps, IconProvider, IconSource, IconVariant, SvgIconSource, } from './features/icon/public';
|
|
41
|
+
export { Icon, SUPPORTED_ICON_PROVIDERS } from './features/icon/public';
|
|
42
|
+
export type { ImageFit, ImageProps, SurfaceImageSource } from './features/image/public';
|
|
43
|
+
export { Image } from './features/image/public';
|
|
44
|
+
export type { KeyboardAvoidingViewBehavior, KeyboardAvoidingViewProps, } from './features/keyboard-avoiding-view/public';
|
|
45
|
+
export { KeyboardAvoidingView } from './features/keyboard-avoiding-view/public';
|
|
46
|
+
export type { BoxProps, ContainerProps, DividerProps, GridProps, StackProps, } from './features/layout/public';
|
|
47
|
+
export { Box, Container, Divider, Grid, Stack } from './features/layout/public';
|
|
48
|
+
export type { SurfaceProps, SurfaceVariant } from './features/surface/public';
|
|
49
|
+
export { Surface } from './features/surface/public';
|
|
50
|
+
export type { HeadingLevel, HeadingProps, TextProps } from './features/typography/public';
|
|
51
|
+
export { Heading, Text } from './features/typography/public';
|
|
42
52
|
export type { InteractionPolicy, InteractionPolicyProps } from './interactionPolicy';
|
|
43
53
|
export * from './layout';
|
|
44
54
|
export type { ButtonBaseProps } from './primitives/button-base';
|
|
45
55
|
export { ButtonBase } from './primitives/button-base';
|
|
46
|
-
export type { HeadingLevel, HeadingProps } from './primitives/heading';
|
|
47
|
-
export { Heading } from './primitives/heading';
|
|
48
|
-
export type { FontIconSource, IconProps, IconProvider, IconSource, IconVariant, SvgIconSource, } from './primitives/icon';
|
|
49
|
-
export { Icon, SUPPORTED_ICON_PROVIDERS } from './primitives/icon';
|
|
50
|
-
export type { ImageFit, ImageProps, SurfaceImageSource } from './primitives/image';
|
|
51
|
-
export { Image } from './primitives/image';
|
|
52
|
-
export type { TextProps } from './primitives/text';
|
|
53
|
-
export { Text } from './primitives/text';
|
|
54
56
|
export type { SurfaceColor, SurfaceEmphasis, SurfacePaletteColor, SurfaceStatusColor, } from './surfaceColor';
|
|
55
57
|
export { SURFACE_COLORS, SURFACE_EMPHASES, SURFACE_PALETTE_COLORS, SURFACE_STATUS_COLORS, } from './surfaceColor';
|
|
56
58
|
export * from './theme';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC3F,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC1F,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACjE,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACpE,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACrE,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AACjG,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC1F,cAAc,mBAAmB,CAAC;AAClC,YAAY,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC7F,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC9D,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,YAAY,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,YAAY,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,YAAY,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,YAAY,EACV,cAAc,EACd,SAAS,EACT,YAAY,EACZ,UAAU,EACV,WAAW,EACX,aAAa,GACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACxE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,YAAY,EACV,4BAA4B,EAC5B,yBAAyB,GAC1B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,YAAY,EACV,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,SAAS,EACT,UAAU,GACX,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAChF,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAC7D,YAAY,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACrF,cAAc,UAAU,CAAC;AACzB,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,YAAY,EACV,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
export { Badge } from './components/badge';
|
|
2
|
-
export { Button } from './components/button';
|
|
3
|
-
export { Card } from './components/card';
|
|
4
|
-
export { Checkbox } from './components/checkbox';
|
|
5
1
|
export { Field } from './components/field';
|
|
6
2
|
export { HelperText } from './components/helper-text';
|
|
7
|
-
export { IconButton } from './components/icon-button';
|
|
8
3
|
export { Label } from './components/label';
|
|
9
4
|
export { ListItem } from './components/list-item';
|
|
10
5
|
export { Menu } from './components/menu';
|
|
11
6
|
export { Modal } from './components/modal';
|
|
12
|
-
export { Radio } from './components/radio';
|
|
13
7
|
export { Switch } from './components/switch';
|
|
14
8
|
export { Tab, TabList, TabPanel, Tabs } from './components/tabs';
|
|
15
|
-
export { TextInput } from './components/text-input';
|
|
16
9
|
export { Textarea } from './components/textarea';
|
|
17
10
|
export { Toast, ToastProvider, useToast } from './components/toast';
|
|
18
11
|
export { Tooltip } from './components/tooltip';
|
|
19
12
|
export { FontProvider, useFontContext } from './context/FontContext';
|
|
20
13
|
export { TranslationProvider, useTranslationContext } from './context/TranslationContext';
|
|
21
14
|
export * from './core/responsive';
|
|
15
|
+
export { Badge } from './features/badge/public';
|
|
16
|
+
export { Button, IconButton } from './features/button/public';
|
|
17
|
+
export { Card } from './features/card/public';
|
|
18
|
+
export { Checkbox } from './features/form/checkbox/public';
|
|
19
|
+
export { Radio } from './features/form/radio/public';
|
|
20
|
+
export { TextInput } from './features/form/text-input/public';
|
|
21
|
+
export { Icon, SUPPORTED_ICON_PROVIDERS } from './features/icon/public';
|
|
22
|
+
export { Image } from './features/image/public';
|
|
23
|
+
export { KeyboardAvoidingView } from './features/keyboard-avoiding-view/public';
|
|
24
|
+
export { Box, Container, Divider, Grid, Stack } from './features/layout/public';
|
|
25
|
+
export { Surface } from './features/surface/public';
|
|
26
|
+
export { Heading, Text } from './features/typography/public';
|
|
22
27
|
export * from './layout';
|
|
23
28
|
export { ButtonBase } from './primitives/button-base';
|
|
24
|
-
export { Heading } from './primitives/heading';
|
|
25
|
-
export { Icon, SUPPORTED_ICON_PROVIDERS } from './primitives/icon';
|
|
26
|
-
export { Image } from './primitives/image';
|
|
27
|
-
export { Text } from './primitives/text';
|
|
28
29
|
export { SURFACE_COLORS, SURFACE_EMPHASES, SURFACE_PALETTE_COLORS, SURFACE_STATUS_COLORS, } from './surfaceColor';
|
|
29
30
|
export * from './theme';
|
|
30
31
|
export { isDeepEqual } from './utils/deepEqual';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEjE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC1F,cAAc,mBAAmB,CAAC;AAElC,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAE3D,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAErD,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAS9D,OAAO,EAAE,IAAI,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAExE,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAKhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAQhF,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEhF,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAE7D,cAAc,UAAU,CAAC;AAEzB,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAOtD,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export type { FieldProps } from './components/field';\nexport { Field } from './components/field';\nexport type { HelperTextProps } from './components/helper-text';\nexport { HelperText } from './components/helper-text';\nexport type { LabelProps } from './components/label';\nexport { Label } from './components/label';\nexport type { ListItemProps } from './components/list-item';\nexport { ListItem } from './components/list-item';\nexport type { MenuAction, MenuActionIntent, MenuItem, MenuProps } from './components/menu';\nexport { Menu } from './components/menu';\nexport type { ModalProps } from './components/modal';\nexport { Modal } from './components/modal';\nexport type { SwitchProps } from './components/switch';\nexport { Switch } from './components/switch';\nexport type { TabListProps, TabPanelProps, TabProps, TabsProps } from './components/tabs';\nexport { Tab, TabList, TabPanel, Tabs } from './components/tabs';\nexport type { TextareaProps } from './components/textarea';\nexport { Textarea } from './components/textarea';\nexport type { ToastOptions, ToastProps, ToastStatus } from './components/toast';\nexport { Toast, ToastProvider, useToast } from './components/toast';\nexport type { TooltipProps } from './components/tooltip';\nexport { Tooltip } from './components/tooltip';\nexport type { FontRuntime } from './context/FontContext';\nexport { FontProvider, useFontContext } from './context/FontContext';\nexport type { I18nInstance, TranslationRuntime, Translator } from './context/TranslationContext';\nexport { TranslationProvider, useTranslationContext } from './context/TranslationContext';\nexport * from './core/responsive';\nexport type { BadgeProps } from './features/badge/public';\nexport { Badge } from './features/badge/public';\nexport type { ButtonIconSpec, ButtonProps, IconButtonProps } from './features/button/public';\nexport { Button, IconButton } from './features/button/public';\nexport type { CardProps } from './features/card/public';\nexport { Card } from './features/card/public';\nexport type { CheckboxProps } from './features/form/checkbox/public';\nexport { Checkbox } from './features/form/checkbox/public';\nexport type { RadioProps } from './features/form/radio/public';\nexport { Radio } from './features/form/radio/public';\nexport type { TextInputProps } from './features/form/text-input/public';\nexport { TextInput } from './features/form/text-input/public';\nexport type {\n FontIconSource,\n IconProps,\n IconProvider,\n IconSource,\n IconVariant,\n SvgIconSource,\n} from './features/icon/public';\nexport { Icon, SUPPORTED_ICON_PROVIDERS } from './features/icon/public';\nexport type { ImageFit, ImageProps, SurfaceImageSource } from './features/image/public';\nexport { Image } from './features/image/public';\nexport type {\n KeyboardAvoidingViewBehavior,\n KeyboardAvoidingViewProps,\n} from './features/keyboard-avoiding-view/public';\nexport { KeyboardAvoidingView } from './features/keyboard-avoiding-view/public';\nexport type {\n BoxProps,\n ContainerProps,\n DividerProps,\n GridProps,\n StackProps,\n} from './features/layout/public';\nexport { Box, Container, Divider, Grid, Stack } from './features/layout/public';\nexport type { SurfaceProps, SurfaceVariant } from './features/surface/public';\nexport { Surface } from './features/surface/public';\nexport type { HeadingLevel, HeadingProps, TextProps } from './features/typography/public';\nexport { Heading, Text } from './features/typography/public';\nexport type { InteractionPolicy, InteractionPolicyProps } from './interactionPolicy';\nexport * from './layout';\nexport type { ButtonBaseProps } from './primitives/button-base';\nexport { ButtonBase } from './primitives/button-base';\nexport type {\n SurfaceColor,\n SurfaceEmphasis,\n SurfacePaletteColor,\n SurfaceStatusColor,\n} from './surfaceColor';\nexport {\n SURFACE_COLORS,\n SURFACE_EMPHASES,\n SURFACE_PALETTE_COLORS,\n SURFACE_STATUS_COLORS,\n} from './surfaceColor';\nexport * from './theme';\nexport { isDeepEqual } from './utils/deepEqual';\nexport { deepMerge } from './utils/deepMerge';\n"]}
|
package/dist/layout/AppBar.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
-
import { type BoxProps } from '
|
|
3
|
+
import { type BoxProps } from '../features/layout/public';
|
|
4
4
|
export interface AppBarProps extends Omit<BoxProps, 'children'> {
|
|
5
5
|
leading?: React.ReactNode;
|
|
6
6
|
trailing?: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppBar.d.ts","sourceRoot":"","sources":["../../src/layout/AppBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"AppBar.d.ts","sourceRoot":"","sources":["../../src/layout/AppBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,OAAO,EAAO,KAAK,QAAQ,EAAW,MAAM,2BAA2B,CAAC;AAGxE,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC7D,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACrC;AAED,wBAAgB,MAAM,CAAC,EACrB,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,WAAkB,EAClB,OAAe,EACf,YAAY,EACZ,EAAE,EACF,KAAK,EACL,GAAG,KAAK,EACT,EAAE,WAAW,qBAiCb"}
|
package/dist/layout/AppBar.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
import { SafeAreaInsetsContext } from 'react-native-safe-area-context';
|
|
4
|
+
import { Box, Divider } from '../features/layout/public';
|
|
4
5
|
import { useTheme } from '../theme/ThemeContext';
|
|
5
|
-
import { Box } from './Box';
|
|
6
|
-
import { Divider } from './Divider';
|
|
7
6
|
export function AppBar({ leading, trailing, children, safeAreaTop = true, divider = false, contentStyle, bg, style, ...props }) {
|
|
8
7
|
const { theme } = useTheme();
|
|
9
8
|
const insets = React.useContext(SafeAreaInsetsContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppBar.js","sourceRoot":"","sources":["../../src/layout/AppBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAkB,IAAI,EAAkB,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"AppBar.js","sourceRoot":"","sources":["../../src/layout/AppBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAkB,IAAI,EAAkB,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,OAAO,EAAE,GAAG,EAAiB,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAWjD,MAAM,UAAU,MAAM,CAAC,EACrB,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,WAAW,GAAG,IAAI,EAClB,OAAO,GAAG,KAAK,EACf,YAAY,EACZ,EAAE,EACF,KAAK,EACL,GAAG,KAAK,EACI;IACZ,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;IACvD,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,aAAa,GACjB,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;IAExD,OAAO,CACL,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CACtE;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,CACzB;QAAA,CAAC,IAAI,CACH,KAAK,CAAC,CAAC;YACL;gBACE,SAAS,EAAE,EAAE;gBACb,aAAa,EAAE,KAAK;gBACpB,UAAU,EAAE,QAAQ;gBACpB,iBAAiB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;aACnC;YACD,YAAY;SACb,CAAC,CAEF;UAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CACT,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAC/E,CAAC,CAAC,CAAC,IAAI,CACR;UAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CACvD;UAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,CACV,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAC/E,CAAC,CAAC,CAAC,IAAI,CACV;QAAA,EAAE,IAAI,CACN;QAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAG,CAAC,CAAC,CAAC,IAAI,CACrF;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { type StyleProp, View, type ViewStyle } from 'react-native';\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context';\n\nimport { Box, type BoxProps, Divider } from '../features/layout/public';\nimport { useTheme } from '../theme/ThemeContext';\n\nexport interface AppBarProps extends Omit<BoxProps, 'children'> {\n leading?: React.ReactNode;\n trailing?: React.ReactNode;\n children?: React.ReactNode;\n safeAreaTop?: boolean;\n divider?: boolean;\n contentStyle?: StyleProp<ViewStyle>;\n}\n\nexport function AppBar({\n leading,\n trailing,\n children,\n safeAreaTop = true,\n divider = false,\n contentStyle,\n bg,\n style,\n ...props\n}: AppBarProps) {\n const { theme } = useTheme();\n const insets = React.useContext(SafeAreaInsetsContext);\n const topInset = safeAreaTop ? (insets?.top ?? 0) : 0;\n const safeAreaStyle: ViewStyle | undefined =\n topInset === 0 ? undefined : { paddingTop: topInset };\n\n return (\n <Box {...props} bg={bg ?? theme.semantics.surface.default} style={style}>\n <View style={safeAreaStyle}>\n <View\n style={[\n {\n minHeight: 56,\n flexDirection: 'row',\n alignItems: 'center',\n paddingHorizontal: theme.spacing.m,\n },\n contentStyle,\n ]}\n >\n {leading ? (\n <View style={{ marginRight: theme.spacing.s, flexShrink: 0 }}>{leading}</View>\n ) : null}\n <View style={{ flex: 1, minWidth: 0 }}>{children}</View>\n {trailing ? (\n <View style={{ marginLeft: theme.spacing.s, flexShrink: 0 }}>{trailing}</View>\n ) : null}\n </View>\n {divider ? <Divider color={theme.semantics.neutral.divider} thickness={1} /> : null}\n </View>\n </Box>\n );\n}\n"]}
|
package/dist/layout/Center.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Center.d.ts","sourceRoot":"","sources":["../../src/layout/Center.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Center.d.ts","sourceRoot":"","sources":["../../src/layout/Center.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,WAAY,SAAQ,QAAQ;IAC3C,IAAI,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,MAAM,CAAC;CAC3C;AAED,wBAAgB,MAAM,CAAC,EAAE,IAAa,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,qBAarE"}
|
package/dist/layout/Center.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Center.js","sourceRoot":"","sources":["../../src/layout/Center.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,GAAG,EAAiB,MAAM,
|
|
1
|
+
{"version":3,"file":"Center.js","sourceRoot":"","sources":["../../src/layout/Center.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,GAAG,EAAiB,MAAM,2BAA2B,CAAC;AAM/D,MAAM,UAAU,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAe;IACpE,OAAO,CACL,CAAC,GAAG,CACF,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC;YACL;gBACE,UAAU,EAAE,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;gBAC3E,cAAc,EAAE,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;aAC9E;YACD,KAAK;SACN,CAAC,EACF,CACH,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport { Box, type BoxProps } from '../features/layout/public';\n\nexport interface CenterProps extends BoxProps {\n axis?: 'horizontal' | 'vertical' | 'both';\n}\n\nexport function Center({ axis = 'both', style, ...props }: CenterProps) {\n return (\n <Box\n {...props}\n style={[\n {\n alignItems: axis === 'both' || axis === 'horizontal' ? 'center' : undefined,\n justifyContent: axis === 'both' || axis === 'vertical' ? 'center' : undefined,\n },\n style,\n ]}\n />\n );\n}\n"]}
|
package/dist/layout/Inline.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type StackProps } from '
|
|
2
|
+
import { type StackProps } from '../features/layout/public';
|
|
3
3
|
export type InlineProps = Omit<StackProps, 'direction'>;
|
|
4
4
|
export declare function Inline({ wrap, align, ...props }: InlineProps): React.JSX.Element;
|
|
5
5
|
//# sourceMappingURL=Inline.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Inline.d.ts","sourceRoot":"","sources":["../../src/layout/Inline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Inline.d.ts","sourceRoot":"","sources":["../../src/layout/Inline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEnE,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;AAExD,wBAAgB,MAAM,CAAC,EAAE,IAAa,EAAE,KAAgB,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,qBAEhF"}
|
package/dist/layout/Inline.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Inline.js","sourceRoot":"","sources":["../../src/layout/Inline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAmB,MAAM,
|
|
1
|
+
{"version":3,"file":"Inline.js","sourceRoot":"","sources":["../../src/layout/Inline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAmB,MAAM,2BAA2B,CAAC;AAInE,MAAM,UAAU,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,GAAG,QAAQ,EAAE,GAAG,KAAK,EAAe;IAC/E,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAG,CAAC;AACxE,CAAC","sourcesContent":["import React from 'react';\n\nimport { Stack, type StackProps } from '../features/layout/public';\n\nexport type InlineProps = Omit<StackProps, 'direction'>;\n\nexport function Inline({ wrap = 'wrap', align = 'center', ...props }: InlineProps) {\n return <Stack {...props} align={align} direction=\"row\" wrap={wrap} />;\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ScrollViewProps as ReactNativeScrollViewProps, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import type { BoxStyleProps } from '../types/layout';
|
|
4
4
|
export interface ScrollAreaProps extends BoxStyleProps, Omit<ReactNativeScrollViewProps, 'children' | 'contentContainerStyle' | 'style'> {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
contentContainerStyle?: StyleProp<ViewStyle>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollArea.d.ts","sourceRoot":"","sources":["../../src/layout/ScrollArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,KAAK,eAAe,IAAI,0BAA0B,EAClD,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ScrollArea.d.ts","sourceRoot":"","sources":["../../src/layout/ScrollArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,KAAK,eAAe,IAAI,0BAA0B,EAClD,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGrD,MAAM,WAAW,eACf,SACE,aAAa,EACb,IAAI,CAAC,0BAA0B,EAAE,UAAU,GAAG,uBAAuB,GAAG,OAAO,CAAC;IAClF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,qBAAqB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9C;AAED,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,qBAAqB,EACrB,CAAC,EACD,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,CAAC,EACD,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,MAAM,EACN,WAAW,EACX,WAAW,EACX,KAAK,EACL,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,SAAS,EACT,SAAS,EACT,QAAQ,EACR,GAAG,EACH,MAAM,EACN,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,MAAM,EACN,OAAO,EACP,KAAK,EACL,GAAG,WAAW,EACf,EAAE,eAAe,qBAoDjB"}
|