@app-studio/components 0.10.19 → 0.10.20
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/dist/fonts/mulish-subset.woff2 +0 -0
- package/dist/illustrations/cross-platform.svg +37 -0
- package/dist/index.d.ts +276 -6
- package/dist/native/components/Accordion/Accordion/Accordion.view.native.js +72 -8
- package/dist/native/components/Accordion/Accordion/Accordion.view.native.js.map +1 -1
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.props.d.ts +36 -0
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.props.js +2 -0
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.props.js.map +1 -0
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.state.d.ts +8 -0
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.state.js +33 -0
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.state.js.map +1 -0
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.style.d.ts +17 -0
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.style.js +39 -0
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.style.js.map +1 -0
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.type.d.ts +37 -0
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.type.js +2 -0
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.type.js.map +1 -0
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.d.ts +4 -0
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.js +122 -0
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.js.map +1 -0
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.native.d.ts +4 -0
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.native.js +173 -0
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.native.js.map +1 -0
- package/dist/native/components/ActionSheet/ActionSheet.d.ts +3 -0
- package/dist/native/components/ActionSheet/ActionSheet.js +9 -0
- package/dist/native/components/ActionSheet/ActionSheet.js.map +1 -0
- package/dist/native/components/ActionSheet/index.d.ts +3 -0
- package/dist/native/components/ActionSheet/index.js +4 -0
- package/dist/native/components/ActionSheet/index.js.map +1 -0
- package/dist/native/components/AppRoot/AppRoot.d.ts +17 -0
- package/dist/native/components/AppRoot/AppRoot.js +25 -0
- package/dist/native/components/AppRoot/AppRoot.js.map +1 -0
- package/dist/native/components/AppRoot/AppRoot.native.d.ts +9 -0
- package/dist/native/components/AppRoot/AppRoot.native.js +33 -0
- package/dist/native/components/AppRoot/AppRoot.native.js.map +1 -0
- package/dist/native/components/AppRoot/AppRoot.types.d.ts +22 -0
- package/dist/native/components/AppRoot/AppRoot.types.js +2 -0
- package/dist/native/components/AppRoot/AppRoot.types.js.map +1 -0
- package/dist/native/components/AppRoot/index.d.ts +2 -0
- package/dist/native/components/AppRoot/index.js +2 -0
- package/dist/native/components/AppRoot/index.js.map +1 -0
- package/dist/native/components/AttachmentGroup/AttachmentGroup/AttachmentGroup.js +8 -1
- package/dist/native/components/AttachmentGroup/AttachmentGroup/AttachmentGroup.js.map +1 -1
- package/dist/native/components/AudioInput/AudioInput/AudioInput.state.d.ts +1 -1
- package/dist/native/components/AudioInput/AudioInput/AudioInput.view.js +1 -1
- package/dist/native/components/AudioInput/AudioInput/AudioInput.view.js.map +1 -1
- package/dist/native/components/AudioInput/useAudioRecording.native.d.ts +25 -0
- package/dist/native/components/AudioInput/useAudioRecording.native.js +96 -0
- package/dist/native/components/AudioInput/useAudioRecording.native.js.map +1 -0
- package/dist/native/components/Background/Background/Background.view.native.js +279 -24
- package/dist/native/components/Background/Background/Background.view.native.js.map +1 -1
- package/dist/native/components/Badge/Badge/Badge.view.js +4 -0
- package/dist/native/components/Badge/Badge/Badge.view.js.map +1 -1
- package/dist/native/components/Button/Button/Button.view.js +4 -1
- package/dist/native/components/Button/Button/Button.view.js.map +1 -1
- package/dist/native/components/Button/Button/Button.view.native.js +13 -4
- package/dist/native/components/Button/Button/Button.view.native.js.map +1 -1
- package/dist/native/components/Carousel/Carousel/Carousel.view.native.js +32 -5
- package/dist/native/components/Carousel/Carousel/Carousel.view.native.js.map +1 -1
- package/dist/native/components/Chart/Chart/BarChart.native.d.ts +15 -0
- package/dist/native/components/Chart/Chart/BarChart.native.js +47 -0
- package/dist/native/components/Chart/Chart/BarChart.native.js.map +1 -0
- package/dist/native/components/Chart/Chart/ChartTooltip.js +6 -0
- package/dist/native/components/Chart/Chart/ChartTooltip.js.map +1 -1
- package/dist/native/components/Chart/Chart/LineChart.native.d.ts +15 -0
- package/dist/native/components/Chart/Chart/LineChart.native.js +44 -0
- package/dist/native/components/Chart/Chart/LineChart.native.js.map +1 -0
- package/dist/native/components/Chart/Chart/PieChart.native.d.ts +15 -0
- package/dist/native/components/Chart/Chart/PieChart.native.js +231 -0
- package/dist/native/components/Chart/Chart/PieChart.native.js.map +1 -0
- package/dist/native/components/ChatInput/EditableInput.native.d.ts +48 -0
- package/dist/native/components/ChatInput/EditableInput.native.js +122 -0
- package/dist/native/components/ChatInput/EditableInput.native.js.map +1 -0
- package/dist/native/components/ChatInput/MessageInput.native.d.ts +46 -0
- package/dist/native/components/ChatInput/MessageInput.native.js +55 -0
- package/dist/native/components/ChatInput/MessageInput.native.js.map +1 -0
- package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.native.d.ts +14 -0
- package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.native.js +89 -0
- package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.native.js.map +1 -0
- package/dist/native/components/ChatWidget/Widget/ChatWidgetWidget.native.d.ts +18 -0
- package/dist/native/components/ChatWidget/Widget/ChatWidgetWidget.native.js +91 -0
- package/dist/native/components/ChatWidget/Widget/ChatWidgetWidget.native.js.map +1 -0
- package/dist/native/components/ChatWidget/Widget/useContextSelector.js +3 -0
- package/dist/native/components/ChatWidget/Widget/useContextSelector.js.map +1 -1
- package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.state.js +10 -2
- package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.state.js.map +1 -1
- package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.style.js +5 -0
- package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.style.js.map +1 -1
- package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.js +20 -13
- package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.js.map +1 -1
- package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.native.d.ts +4 -0
- package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.native.js +88 -0
- package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.native.js.map +1 -0
- package/dist/native/components/Command/Command/Command.state.js +13 -3
- package/dist/native/components/Command/Command/Command.state.js.map +1 -1
- package/dist/native/components/Command/Command/Command.view.js +6 -4
- package/dist/native/components/Command/Command/Command.view.js.map +1 -1
- package/dist/native/components/Command/Command/Command.view.native.d.ts +31 -0
- package/dist/native/components/Command/Command/Command.view.native.js +184 -0
- package/dist/native/components/Command/Command/Command.view.native.js.map +1 -0
- package/dist/native/components/Command/Command/CommandOverlay.d.ts +10 -0
- package/dist/native/components/Command/Command/CommandOverlay.js +13 -0
- package/dist/native/components/Command/Command/CommandOverlay.js.map +1 -0
- package/dist/native/components/Command/Command/CommandOverlay.native.d.ts +12 -0
- package/dist/native/components/Command/Command/CommandOverlay.native.js +12 -0
- package/dist/native/components/Command/Command/CommandOverlay.native.js.map +1 -0
- package/dist/native/components/Command/Command/CommandTextInput.d.ts +8 -0
- package/dist/native/components/Command/Command/CommandTextInput.js +7 -0
- package/dist/native/components/Command/Command/CommandTextInput.js.map +1 -0
- package/dist/native/components/Command/Command/CommandTextInput.native.d.ts +13 -0
- package/dist/native/components/Command/Command/CommandTextInput.native.js +27 -0
- package/dist/native/components/Command/Command/CommandTextInput.native.js.map +1 -0
- package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.props.d.ts +1 -0
- package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.state.js +8 -0
- package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.state.js.map +1 -1
- package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.native.d.ts +3 -1
- package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.native.js +38 -22
- package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.native.js.map +1 -1
- package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.state.js +12 -6
- package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.state.js.map +1 -1
- package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.style.js +8 -8
- package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.style.js.map +1 -1
- package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.view.js +1 -1
- package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.view.js.map +1 -1
- package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.state.js +4 -0
- package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.state.js.map +1 -1
- package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.state.native.d.ts +18 -0
- package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.state.native.js +23 -0
- package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.state.native.js.map +1 -0
- package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.view.native.d.ts +17 -0
- package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.view.native.js +49 -0
- package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.view.native.js.map +1 -0
- package/dist/native/components/Drawer/Drawer/Drawer.view.native.js +54 -14
- package/dist/native/components/Drawer/Drawer/Drawer.view.native.js.map +1 -1
- package/dist/native/components/DropZone/DropZone/DropZone.view.native.d.ts +14 -0
- package/dist/native/components/DropZone/DropZone/DropZone.view.native.js +33 -0
- package/dist/native/components/DropZone/DropZone/DropZone.view.native.js.map +1 -0
- package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.state.js +7 -0
- package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.state.js.map +1 -1
- package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.view.native.js +20 -16
- package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.view.native.js.map +1 -1
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.state.js +6 -2
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.state.js.map +1 -1
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.style.js +9 -0
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.style.js.map +1 -1
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.native.d.ts +4 -0
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.native.js +108 -0
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.native.js.map +1 -0
- package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.state.js +11 -4
- package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.state.js.map +1 -1
- package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.view.native.d.ts +4 -0
- package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.view.native.js +92 -0
- package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.view.native.js.map +1 -0
- package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.view.native.d.ts +13 -0
- package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.view.native.js +118 -0
- package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.view.native.js.map +1 -0
- package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.native.d.ts +3 -0
- package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.native.js +88 -0
- package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.native.js.map +1 -0
- package/dist/native/components/Form/Password/Password/Password.state.d.ts +26 -0
- package/dist/native/components/Form/Select/Select/Select.view.native.d.ts +2 -2
- package/dist/native/components/Form/Select/Select/Select.view.native.js +19 -33
- package/dist/native/components/Form/Select/Select/Select.view.native.js.map +1 -1
- package/dist/native/components/Form/Selector/Selector/Selector.view.native.d.ts +12 -0
- package/dist/native/components/Form/Selector/Selector/Selector.view.native.js +44 -0
- package/dist/native/components/Form/Selector/Selector/Selector.view.native.js.map +1 -0
- package/dist/native/components/Form/Switch/Switch/Switch.view.js +2 -2
- package/dist/native/components/Form/Switch/Switch/Switch.view.js.map +1 -1
- package/dist/native/components/Form/TextArea/TextArea/TextArea.props.d.ts +3 -0
- package/dist/native/components/Form/TextArea/TextArea/TextArea.view.js +2 -2
- package/dist/native/components/Form/TextArea/TextArea/TextArea.view.js.map +1 -1
- package/dist/native/components/Form/TextField/TextField/TextField.props.d.ts +3 -0
- package/dist/native/components/Form/TextField/TextField/TextField.view.js +2 -2
- package/dist/native/components/Form/TextField/TextField/TextField.view.js.map +1 -1
- package/dist/native/components/Formik/Formik.Form.d.ts +4 -10
- package/dist/native/components/Formik/Formik.Form.js +6 -3
- package/dist/native/components/Formik/Formik.Form.js.map +1 -1
- package/dist/native/components/Formik/Formik.Hook.d.ts +5 -1
- package/dist/native/components/Formik/Formik.Hook.js +27 -3
- package/dist/native/components/Formik/Formik.Hook.js.map +1 -1
- package/dist/native/components/Formik/Formik.OTPInput.js +63 -7
- package/dist/native/components/Formik/Formik.OTPInput.js.map +1 -1
- package/dist/native/components/Formik/Formik.Password.js +1 -1
- package/dist/native/components/Formik/Formik.Password.js.map +1 -1
- package/dist/native/components/Formik/Formik.TextField.js +1 -1
- package/dist/native/components/Formik/Formik.TextField.js.map +1 -1
- package/dist/native/components/Gradient/Gradient/Gradient.view.native.js +83 -11
- package/dist/native/components/Gradient/Gradient/Gradient.view.native.js.map +1 -1
- package/dist/native/components/HoverCard/HoverCard/HoverCard.view.native.js +39 -5
- package/dist/native/components/HoverCard/HoverCard/HoverCard.view.native.js.map +1 -1
- package/dist/native/components/Icon/Icon.native.js +9 -1
- package/dist/native/components/Icon/Icon.native.js.map +1 -1
- package/dist/native/components/IconPicker/IconPicker/IconPicker.state.js +4 -0
- package/dist/native/components/IconPicker/IconPicker/IconPicker.state.js.map +1 -1
- package/dist/native/components/IconPicker/IconPicker/IconPicker.style.js +5 -0
- package/dist/native/components/IconPicker/IconPicker/IconPicker.style.js.map +1 -1
- package/dist/native/components/IconPicker/IconPicker/IconPicker.view.native.d.ts +4 -0
- package/dist/native/components/IconPicker/IconPicker/IconPicker.view.native.js +73 -0
- package/dist/native/components/IconPicker/IconPicker/IconPicker.view.native.js.map +1 -0
- package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.d.ts +12 -0
- package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.js +17 -0
- package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.js.map +1 -0
- package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.native.d.ts +12 -0
- package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.native.js +24 -0
- package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.native.js.map +1 -0
- package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.types.d.ts +24 -0
- package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.types.js +2 -0
- package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.types.js.map +1 -0
- package/dist/native/components/KeyboardAvoidingView/index.d.ts +2 -0
- package/dist/native/components/KeyboardAvoidingView/index.js +2 -0
- package/dist/native/components/KeyboardAvoidingView/index.js.map +1 -0
- package/dist/native/components/Menubar/Menubar/Menubar.props.d.ts +4 -1
- package/dist/native/components/Menubar/Menubar/Menubar.state.js +6 -0
- package/dist/native/components/Menubar/Menubar/Menubar.state.js.map +1 -1
- package/dist/native/components/Menubar/Menubar/Menubar.view.native.d.ts +4 -1
- package/dist/native/components/Menubar/Menubar/Menubar.view.native.js +29 -23
- package/dist/native/components/Menubar/Menubar/Menubar.view.native.js.map +1 -1
- package/dist/native/components/Message/Message/Message.layout.native.d.ts +3 -0
- package/dist/native/components/Message/Message/Message.layout.native.js +26 -0
- package/dist/native/components/Message/Message/Message.layout.native.js.map +1 -0
- package/dist/native/components/Modal/Modal/Modal.store.js +0 -1
- package/dist/native/components/Modal/Modal/Modal.store.js.map +1 -1
- package/dist/native/components/Modal/Modal.d.ts +2 -0
- package/dist/native/components/Modal/Modal.js +6 -0
- package/dist/native/components/Modal/Modal.js.map +1 -1
- package/dist/native/components/OTPInput/OTPInput/OTPInput.state.d.ts +2 -2
- package/dist/native/components/OTPInput/OTPInput/OTPInput.state.js +92 -14
- package/dist/native/components/OTPInput/OTPInput/OTPInput.state.js.map +1 -1
- package/dist/native/components/OTPInput/OTPInput/OTPInput.view.native.js +64 -11
- package/dist/native/components/OTPInput/OTPInput/OTPInput.view.native.js.map +1 -1
- package/dist/native/components/OTPInput/OTPInput.js +34 -2
- package/dist/native/components/OTPInput/OTPInput.js.map +1 -1
- package/dist/native/components/PageLayout/PageLayout.d.ts +16 -0
- package/dist/native/components/PageLayout/PageLayout.js +49 -0
- package/dist/native/components/PageLayout/PageLayout.js.map +1 -0
- package/dist/native/components/PageLayout/PageLayout.types.d.ts +30 -0
- package/dist/native/components/PageLayout/PageLayout.types.js +2 -0
- package/dist/native/components/PageLayout/PageLayout.types.js.map +1 -0
- package/dist/native/components/PageLayout/index.d.ts +2 -0
- package/dist/native/components/PageLayout/index.js +2 -0
- package/dist/native/components/PageLayout/index.js.map +1 -0
- package/dist/native/components/Pagination/Pagination/Pagination.view.native.js +12 -1
- package/dist/native/components/Pagination/Pagination/Pagination.view.native.js.map +1 -1
- package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.native.js +48 -1
- package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.native.js.map +1 -1
- package/dist/native/components/Resizable/Resizable/Resizable.state.js +6 -0
- package/dist/native/components/Resizable/Resizable/Resizable.state.js.map +1 -1
- package/dist/native/components/Router/Router.d.ts +11 -0
- package/dist/native/components/Router/Router.js +51 -0
- package/dist/native/components/Router/Router.js.map +1 -0
- package/dist/native/components/Router/Router.match.d.ts +15 -0
- package/dist/native/components/Router/Router.match.js +45 -0
- package/dist/native/components/Router/Router.match.js.map +1 -0
- package/dist/native/components/Router/Router.native.d.ts +11 -0
- package/dist/native/components/Router/Router.native.js +27 -0
- package/dist/native/components/Router/Router.native.js.map +1 -0
- package/dist/native/components/Router/Router.store.d.ts +28 -0
- package/dist/native/components/Router/Router.store.js +38 -0
- package/dist/native/components/Router/Router.store.js.map +1 -0
- package/dist/native/components/Router/Router.types.d.ts +16 -0
- package/dist/native/components/Router/Router.types.js +2 -0
- package/dist/native/components/Router/Router.types.js.map +1 -0
- package/dist/native/components/Router/index.d.ts +5 -0
- package/dist/native/components/Router/index.js +5 -0
- package/dist/native/components/Router/index.js.map +1 -0
- package/dist/native/components/Router/useHistory.d.ts +21 -0
- package/dist/native/components/Router/useHistory.js +34 -0
- package/dist/native/components/Router/useHistory.js.map +1 -0
- package/dist/native/components/ShareButton/ShareButton/ShareButton.state.native.d.ts +15 -0
- package/dist/native/components/ShareButton/ShareButton/ShareButton.state.native.js +55 -0
- package/dist/native/components/ShareButton/ShareButton/ShareButton.state.native.js.map +1 -0
- package/dist/native/components/Slider/Slider/Slider.state.js +14 -2
- package/dist/native/components/Slider/Slider/Slider.state.js.map +1 -1
- package/dist/native/components/Slider/Slider/Slider.view.native.js +6 -2
- package/dist/native/components/Slider/Slider/Slider.view.native.js.map +1 -1
- package/dist/native/components/SplashScreen/SplashScreen.d.ts +14 -0
- package/dist/native/components/SplashScreen/SplashScreen.js +49 -0
- package/dist/native/components/SplashScreen/SplashScreen.js.map +1 -0
- package/dist/native/components/SplashScreen/SplashScreen.store.d.ts +18 -0
- package/dist/native/components/SplashScreen/SplashScreen.store.js +13 -0
- package/dist/native/components/SplashScreen/SplashScreen.store.js.map +1 -0
- package/dist/native/components/SplashScreen/SplashScreen.types.d.ts +23 -0
- package/dist/native/components/SplashScreen/SplashScreen.types.js +2 -0
- package/dist/native/components/SplashScreen/SplashScreen.types.js.map +1 -0
- package/dist/native/components/SplashScreen/index.d.ts +3 -0
- package/dist/native/components/SplashScreen/index.js +3 -0
- package/dist/native/components/SplashScreen/index.js.map +1 -0
- package/dist/native/components/Table/Table/Table.style.js +10 -0
- package/dist/native/components/Table/Table/Table.style.js.map +1 -1
- package/dist/native/components/Table/Table/Table.view.js +27 -20
- package/dist/native/components/Table/Table/Table.view.js.map +1 -1
- package/dist/native/components/Table/Table/TableScroll.d.ts +8 -0
- package/dist/native/components/Table/Table/TableScroll.js +10 -0
- package/dist/native/components/Table/Table/TableScroll.js.map +1 -0
- package/dist/native/components/Table/Table/TableScroll.native.d.ts +9 -0
- package/dist/native/components/Table/Table/TableScroll.native.js +11 -0
- package/dist/native/components/Table/Table/TableScroll.native.js.map +1 -0
- package/dist/native/components/TextArea/TextArea.native.d.ts +21 -0
- package/dist/native/components/TextArea/TextArea.native.js +15 -0
- package/dist/native/components/TextArea/TextArea.native.js.map +1 -0
- package/dist/native/components/Toast/Toast/Toast.view.native.js +6 -1
- package/dist/native/components/Toast/Toast/Toast.view.native.js.map +1 -1
- package/dist/native/components/Toggle/Toggle/Toggle.view.native.js +11 -3
- package/dist/native/components/Toggle/Toggle/Toggle.view.native.js.map +1 -1
- package/dist/native/components/Tooltip/Tooltip/Tooltip.state.js +3 -0
- package/dist/native/components/Tooltip/Tooltip/Tooltip.state.js.map +1 -1
- package/dist/native/components/Tooltip/Tooltip/Tooltip.view.native.js +84 -7
- package/dist/native/components/Tooltip/Tooltip/Tooltip.view.native.js.map +1 -1
- package/dist/native/components/Uploader/Uploader/Uploader.state.d.ts +1 -1
- package/dist/native/components/Uploader/Uploader/Uploader.state.js +18 -5
- package/dist/native/components/Uploader/Uploader/Uploader.state.js.map +1 -1
- package/dist/native/components/index.d.ts +7 -0
- package/dist/native/components/index.js +7 -0
- package/dist/native/components/index.js.map +1 -1
- package/dist/orange.webp +0 -0
- package/dist/web.cjs.js +9 -9
- package/dist/web.cjs.js.map +1 -1
- package/dist/web.esm.js +8266 -7578
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.js +9 -9
- package/dist/web.umd.js.map +1 -1
- package/docs/LIGHTHOUSE_100_GUIDE.md +277 -0
- package/docs/app-studio/Design.md +1 -1
- package/docs/app-studio/Theming.md +3 -3
- package/package.json +5 -3
|
Binary file
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<svg width="520" height="380" viewBox="0 0 520 380" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="App Studio running on web and native">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="cpBg" x1="0" y1="0" x2="520" y2="380" gradientUnits="userSpaceOnUse">
|
|
4
|
+
<stop stop-color="#EFF4FF"/>
|
|
5
|
+
<stop offset="1" stop-color="#FFF3E9"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<linearGradient id="cpBar" x1="0" y1="0" x2="0" y2="1">
|
|
8
|
+
<stop stop-color="#F59E3B"/>
|
|
9
|
+
<stop offset="1" stop-color="#1D4ED8"/>
|
|
10
|
+
</linearGradient>
|
|
11
|
+
</defs>
|
|
12
|
+
<rect width="520" height="380" rx="24" fill="url(#cpBg)"/>
|
|
13
|
+
<!-- Browser window -->
|
|
14
|
+
<rect x="40" y="60" width="320" height="220" rx="14" fill="#FFFFFF" stroke="#E5E7EB" stroke-width="2"/>
|
|
15
|
+
<rect x="40" y="60" width="320" height="34" rx="14" fill="#F8FAFC"/>
|
|
16
|
+
<circle cx="62" cy="77" r="5" fill="#F87171"/>
|
|
17
|
+
<circle cx="80" cy="77" r="5" fill="#FBBF24"/>
|
|
18
|
+
<circle cx="98" cy="77" r="5" fill="#34D399"/>
|
|
19
|
+
<rect x="150" y="70" width="180" height="14" rx="7" fill="#EEF2F7"/>
|
|
20
|
+
<!-- Browser content -->
|
|
21
|
+
<circle cx="120" cy="150" r="34" fill="none" stroke="#F59E3B" stroke-width="8" stroke-dasharray="170 40" transform="rotate(-20 120 150)"/>
|
|
22
|
+
<rect x="180" y="124" width="150" height="16" rx="8" fill="#1F2937"/>
|
|
23
|
+
<rect x="180" y="150" width="120" height="12" rx="6" fill="#9CA3AF"/>
|
|
24
|
+
<rect x="180" y="172" width="96" height="12" rx="6" fill="#9CA3AF"/>
|
|
25
|
+
<rect x="72" y="220" width="120" height="34" rx="10" fill="#1D4ED8"/>
|
|
26
|
+
<rect x="204" y="220" width="120" height="34" rx="10" fill="none" stroke="#1D4ED8" stroke-width="2"/>
|
|
27
|
+
<!-- Phone -->
|
|
28
|
+
<rect x="360" y="120" width="130" height="230" rx="26" fill="#0F172A"/>
|
|
29
|
+
<rect x="370" y="140" width="110" height="190" rx="12" fill="#FFFFFF"/>
|
|
30
|
+
<rect x="404" y="128" width="42" height="7" rx="3.5" fill="#1F2937"/>
|
|
31
|
+
<circle cx="425" cy="190" r="22" fill="none" stroke="#F59E3B" stroke-width="6" stroke-dasharray="110 26" transform="rotate(-20 425 190)"/>
|
|
32
|
+
<rect x="388" y="228" width="74" height="11" rx="5.5" fill="#1F2937"/>
|
|
33
|
+
<rect x="388" y="248" width="60" height="9" rx="4.5" fill="#9CA3AF"/>
|
|
34
|
+
<rect x="388" y="286" width="74" height="26" rx="8" fill="#1D4ED8"/>
|
|
35
|
+
<!-- connecting accent -->
|
|
36
|
+
<rect x="40" y="300" width="450" height="6" rx="3" fill="url(#cpBar)" opacity="0.5"/>
|
|
37
|
+
</svg>
|
package/dist/index.d.ts
CHANGED
|
@@ -133,6 +133,83 @@ export declare interface AccordionTriggerProps extends ViewProps {
|
|
|
133
133
|
|
|
134
134
|
declare type AccordionType = 'single' | 'multiple';
|
|
135
135
|
|
|
136
|
+
export declare const ActionSheet: default_2.FC<ActionSheetProps>;
|
|
137
|
+
|
|
138
|
+
export declare type ActionSheetAnimation = 'none' | 'slide' | 'fade';
|
|
139
|
+
|
|
140
|
+
export declare interface ActionSheetItem {
|
|
141
|
+
id?: string;
|
|
142
|
+
value?: string;
|
|
143
|
+
label?: default_2.ReactNode;
|
|
144
|
+
description?: default_2.ReactNode;
|
|
145
|
+
icon?: default_2.ReactNode;
|
|
146
|
+
selected?: boolean;
|
|
147
|
+
disabled?: boolean;
|
|
148
|
+
isDisabled?: boolean;
|
|
149
|
+
destructive?: boolean;
|
|
150
|
+
divider?: boolean;
|
|
151
|
+
closeOnSelect?: boolean;
|
|
152
|
+
onPress?: (item: ActionSheetItem) => void;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export declare interface ActionSheetProps extends Omit<ViewProps, 'children' | 'onChange' | 'onSelect' | 'title'> {
|
|
156
|
+
isOpen?: boolean;
|
|
157
|
+
defaultOpen?: boolean;
|
|
158
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
159
|
+
onClose?: () => void;
|
|
160
|
+
isClosePrevented?: boolean;
|
|
161
|
+
dismissOnBackdropPress?: boolean;
|
|
162
|
+
title?: default_2.ReactNode;
|
|
163
|
+
description?: default_2.ReactNode;
|
|
164
|
+
header?: default_2.ReactNode;
|
|
165
|
+
children?: default_2.ReactNode;
|
|
166
|
+
items?: ActionSheetItem[];
|
|
167
|
+
value?: ActionSheetValue;
|
|
168
|
+
defaultValue?: ActionSheetValue;
|
|
169
|
+
isMulti?: boolean;
|
|
170
|
+
closeOnSelect?: boolean;
|
|
171
|
+
onSelect?: (value: string, item: ActionSheetItem) => void;
|
|
172
|
+
onChange?: (value: ActionSheetValue, item: ActionSheetItem) => void;
|
|
173
|
+
showCancel?: boolean;
|
|
174
|
+
cancelLabel?: string;
|
|
175
|
+
onCancel?: () => void;
|
|
176
|
+
showHandle?: boolean;
|
|
177
|
+
size?: ActionSheetSize;
|
|
178
|
+
maxHeight?: number | string;
|
|
179
|
+
animationType?: ActionSheetAnimation;
|
|
180
|
+
views?: ActionSheetStyles;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export declare type ActionSheetSize = 'sm' | 'md' | 'lg';
|
|
184
|
+
|
|
185
|
+
export declare type ActionSheetStyles = {
|
|
186
|
+
overlay?: ViewProps;
|
|
187
|
+
container?: ViewProps;
|
|
188
|
+
sheet?: ViewProps;
|
|
189
|
+
handle?: ViewProps;
|
|
190
|
+
header?: ViewProps;
|
|
191
|
+
title?: ViewProps;
|
|
192
|
+
description?: ViewProps;
|
|
193
|
+
content?: ViewProps;
|
|
194
|
+
item?: ViewProps;
|
|
195
|
+
itemIcon?: ViewProps;
|
|
196
|
+
itemLabel?: ViewProps;
|
|
197
|
+
itemDescription?: ViewProps;
|
|
198
|
+
itemIndicator?: ViewProps;
|
|
199
|
+
divider?: ViewProps;
|
|
200
|
+
cancelButton?: ViewProps;
|
|
201
|
+
cancelLabel?: ViewProps;
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
export declare type ActionSheetValue = string | string[];
|
|
205
|
+
|
|
206
|
+
export declare interface ActionSheetViewProps extends ActionSheetProps {
|
|
207
|
+
isSheetOpen: boolean;
|
|
208
|
+
selectedValue: ActionSheetValue;
|
|
209
|
+
setSelectedValue: (value: ActionSheetValue) => void;
|
|
210
|
+
closeSheet: () => void;
|
|
211
|
+
}
|
|
212
|
+
|
|
136
213
|
export declare const Alert: (props: AlertProps) => default_2.JSX.Element;
|
|
137
214
|
|
|
138
215
|
export declare interface AlertProps extends ViewProps {
|
|
@@ -1591,6 +1668,7 @@ export declare interface ContextMenuTriggerProps {
|
|
|
1591
1668
|
isDisabled?: boolean;
|
|
1592
1669
|
views?: {
|
|
1593
1670
|
container?: ViewProps;
|
|
1671
|
+
indicator?: ViewProps;
|
|
1594
1672
|
};
|
|
1595
1673
|
}
|
|
1596
1674
|
|
|
@@ -1686,11 +1764,6 @@ declare interface CustomFormProps<T> extends FormikConfig<T> {
|
|
|
1686
1764
|
initFocus?: string;
|
|
1687
1765
|
}
|
|
1688
1766
|
|
|
1689
|
-
declare interface CustomFormProps<T> extends FormikConfig<T> {
|
|
1690
|
-
autoFocus?: boolean;
|
|
1691
|
-
initFocus?: string;
|
|
1692
|
-
}
|
|
1693
|
-
|
|
1694
1767
|
/**
|
|
1695
1768
|
* Date picker allows users to select a date from a calendar view.
|
|
1696
1769
|
*/
|
|
@@ -2443,6 +2516,9 @@ export declare const getDesignSystemComponentProps: (componentName: DesignSystem
|
|
|
2443
2516
|
|
|
2444
2517
|
export declare const GiftIcon: default_2.FC<Omit<IconProps, "name">>;
|
|
2445
2518
|
|
|
2519
|
+
/** Imperatively go back. Returns false when already at the root. */
|
|
2520
|
+
export declare const goBack: () => boolean;
|
|
2521
|
+
|
|
2446
2522
|
export declare const Gradient: default_2.FC<GradientProps>;
|
|
2447
2523
|
|
|
2448
2524
|
declare interface GradientProps extends Omit<ViewProps, 'colors' | 'animate' | 'animationDuration' | 'direction' | 'position'> {
|
|
@@ -2512,6 +2588,14 @@ export declare const hideModal: (name?: string) => void;
|
|
|
2512
2588
|
|
|
2513
2589
|
declare type HighlightStyle = 'underline' | 'background' | 'gradient' | 'outline' | 'glow' | 'solid' | 'default';
|
|
2514
2590
|
|
|
2591
|
+
/**
|
|
2592
|
+
* A single entry in the navigation history.
|
|
2593
|
+
*/
|
|
2594
|
+
export declare interface HistoryEntry {
|
|
2595
|
+
path: string;
|
|
2596
|
+
params: Record<string, any>;
|
|
2597
|
+
}
|
|
2598
|
+
|
|
2515
2599
|
export declare const HomeIcon: default_2.FC<Omit<IconProps, "name">>;
|
|
2516
2600
|
|
|
2517
2601
|
export declare const HoverCard: HoverCardType;
|
|
@@ -2633,6 +2717,31 @@ export declare interface ItemProps extends Omit<InputProps, 'size'> {
|
|
|
2633
2717
|
setIsHovered?: Function;
|
|
2634
2718
|
}
|
|
2635
2719
|
|
|
2720
|
+
export declare const KeyboardAvoidingView: default_2.FC<KeyboardAvoidingViewProps>;
|
|
2721
|
+
|
|
2722
|
+
export declare interface KeyboardAvoidingViewProps extends ViewProps {
|
|
2723
|
+
/**
|
|
2724
|
+
* How the view reacts to the on-screen keyboard (native only). Defaults to
|
|
2725
|
+
* 'padding' on iOS and 'height' on Android — the combination that behaves
|
|
2726
|
+
* best in practice. Ignored on web.
|
|
2727
|
+
*/
|
|
2728
|
+
behavior?: 'height' | 'position' | 'padding';
|
|
2729
|
+
/**
|
|
2730
|
+
* Distance between the top of the keyboard and the focused field (native
|
|
2731
|
+
* only) — e.g. to account for a fixed header. Ignored on web.
|
|
2732
|
+
*/
|
|
2733
|
+
keyboardVerticalOffset?: number;
|
|
2734
|
+
/**
|
|
2735
|
+
* When true, tapping an empty (non-input) area dismisses the keyboard
|
|
2736
|
+
* (native only). Web browsers reflow around their own keyboard, so this is a
|
|
2737
|
+
* no-op there.
|
|
2738
|
+
*/
|
|
2739
|
+
dismissOnTap?: boolean;
|
|
2740
|
+
/** Enable/disable the avoiding behavior (native only). Default true. */
|
|
2741
|
+
enabled?: boolean;
|
|
2742
|
+
children?: default_2.ReactNode;
|
|
2743
|
+
}
|
|
2744
|
+
|
|
2636
2745
|
export declare const LayoutIcon: default_2.FC<Omit<IconProps, "name">>;
|
|
2637
2746
|
|
|
2638
2747
|
export declare const LikeIcon: default_2.FC<Omit<IconProps, "name">>;
|
|
@@ -2681,6 +2790,12 @@ export declare const MagicWandIcon: default_2.FC<Omit<IconProps, "name">>;
|
|
|
2681
2790
|
|
|
2682
2791
|
export declare const MapPinIcon: default_2.FC<Omit<IconProps, "name">>;
|
|
2683
2792
|
|
|
2793
|
+
/**
|
|
2794
|
+
* Match a `:param`-style pattern against a concrete path. Returns the parsed
|
|
2795
|
+
* params on success, or null when it doesn't match.
|
|
2796
|
+
*/
|
|
2797
|
+
export declare const matchPath: (pattern: string, path: string) => Record<string, string> | null;
|
|
2798
|
+
|
|
2684
2799
|
/**
|
|
2685
2800
|
* MediaPreview renders a square thumbnail for image, video or audio files.
|
|
2686
2801
|
* It falls back to a file icon for unsupported types. Clicking the preview
|
|
@@ -2698,10 +2813,13 @@ export declare interface MediaPreviewProps {
|
|
|
2698
2813
|
export declare const Menubar: MenubarType;
|
|
2699
2814
|
|
|
2700
2815
|
export declare interface MenubarContentProps {
|
|
2701
|
-
children
|
|
2816
|
+
children?: default_2.ReactNode;
|
|
2702
2817
|
menuId: string;
|
|
2703
2818
|
views?: {
|
|
2704
2819
|
content?: ViewProps;
|
|
2820
|
+
item?: ViewProps;
|
|
2821
|
+
icon?: ViewProps;
|
|
2822
|
+
separator?: ViewProps;
|
|
2705
2823
|
};
|
|
2706
2824
|
}
|
|
2707
2825
|
|
|
@@ -2883,6 +3001,10 @@ export declare interface ModalItem {
|
|
|
2883
3001
|
overlayProps: any;
|
|
2884
3002
|
}
|
|
2885
3003
|
|
|
3004
|
+
declare const ModalLayout: ({ modals: availableModals, onShow, onHide, }: ModalLayoutProps) => default_2.JSX.Element | null;
|
|
3005
|
+
export { ModalLayout }
|
|
3006
|
+
export { ModalLayout as ModalRouter }
|
|
3007
|
+
|
|
2886
3008
|
export declare interface ModalLayoutProps {
|
|
2887
3009
|
modals: {
|
|
2888
3010
|
[x: string]: default_2.FC<any>;
|
|
@@ -2949,6 +3071,9 @@ export declare interface MultiSelectProps extends Omit<InputProps, 'size'> {
|
|
|
2949
3071
|
size?: Size_7;
|
|
2950
3072
|
}
|
|
2951
3073
|
|
|
3074
|
+
/** Imperatively navigate to a path from outside React. */
|
|
3075
|
+
export declare const navigate: (path: string, params?: Record<string, any>) => void;
|
|
3076
|
+
|
|
2952
3077
|
declare interface NavigationItem {
|
|
2953
3078
|
id: string;
|
|
2954
3079
|
label: string;
|
|
@@ -3126,6 +3251,38 @@ export declare interface OverlayProps extends Omit<ViewProps, 'position' | 'isOp
|
|
|
3126
3251
|
onClose: () => void;
|
|
3127
3252
|
}
|
|
3128
3253
|
|
|
3254
|
+
export declare const PageLayout: default_2.FC<PageLayoutProps>;
|
|
3255
|
+
|
|
3256
|
+
export declare interface PageLayoutProps extends ViewProps {
|
|
3257
|
+
/** Pinned header rendered above the scrollable content. */
|
|
3258
|
+
header?: default_2.ReactNode;
|
|
3259
|
+
/**
|
|
3260
|
+
* Pinned footer (e.g. a submit bar). It rides above the keyboard on native
|
|
3261
|
+
* because it sits inside the keyboard-avoiding region.
|
|
3262
|
+
*/
|
|
3263
|
+
footer?: default_2.ReactNode;
|
|
3264
|
+
/** Replace the content with a centered Loader. */
|
|
3265
|
+
isLoading?: boolean;
|
|
3266
|
+
/** Apply device safe-area insets to the outer container. Default true. */
|
|
3267
|
+
safe?: boolean;
|
|
3268
|
+
/** Make the content area scroll when it overflows. Default true. */
|
|
3269
|
+
scrollable?: boolean;
|
|
3270
|
+
/** Tap an empty area to dismiss the keyboard (native only). Default true. */
|
|
3271
|
+
dismissKeyboardOnTap?: boolean;
|
|
3272
|
+
/** Offset for the keyboard-avoiding region, e.g. a fixed header height. */
|
|
3273
|
+
keyboardVerticalOffset?: number;
|
|
3274
|
+
/** Per-slot style overrides. */
|
|
3275
|
+
views?: PageLayoutViews;
|
|
3276
|
+
children?: default_2.ReactNode;
|
|
3277
|
+
}
|
|
3278
|
+
|
|
3279
|
+
export declare interface PageLayoutViews {
|
|
3280
|
+
container?: ViewProps;
|
|
3281
|
+
header?: ViewProps;
|
|
3282
|
+
content?: ViewProps;
|
|
3283
|
+
footer?: ViewProps;
|
|
3284
|
+
}
|
|
3285
|
+
|
|
3129
3286
|
declare interface PageSizeOption {
|
|
3130
3287
|
label: string;
|
|
3131
3288
|
value: number;
|
|
@@ -3396,6 +3553,36 @@ export declare interface RipplesProps extends Omit<ViewProps, 'colors'> {
|
|
|
3396
3553
|
|
|
3397
3554
|
export declare const RotateIcon: default_2.FC<Omit<IconProps, "name">>;
|
|
3398
3555
|
|
|
3556
|
+
export declare interface RouteConfig {
|
|
3557
|
+
path: string;
|
|
3558
|
+
component: default_2.ComponentType<any>;
|
|
3559
|
+
}
|
|
3560
|
+
|
|
3561
|
+
export declare type RouteList = RouteConfig[] | Record<string, default_2.ComponentType<any>>;
|
|
3562
|
+
|
|
3563
|
+
export declare const Router: default_2.FC<RouterProps>;
|
|
3564
|
+
|
|
3565
|
+
export declare interface RouterProps {
|
|
3566
|
+
routes: RouteList;
|
|
3567
|
+
initialPath?: string;
|
|
3568
|
+
notFound?: default_2.ComponentType<any>;
|
|
3569
|
+
/**
|
|
3570
|
+
* Reflect navigation to the browser URL and honour the browser Back button
|
|
3571
|
+
* (web only, default false). Native always honours the hardware Back button.
|
|
3572
|
+
*/
|
|
3573
|
+
syncBrowserHistory?: boolean;
|
|
3574
|
+
}
|
|
3575
|
+
|
|
3576
|
+
export declare interface RouterState {
|
|
3577
|
+
stack: HistoryEntry[];
|
|
3578
|
+
index: number;
|
|
3579
|
+
push: (path: string, params?: Record<string, any>) => void;
|
|
3580
|
+
replace: (path: string, params?: Record<string, any>) => void;
|
|
3581
|
+
back: () => boolean;
|
|
3582
|
+
go: (delta: number) => void;
|
|
3583
|
+
reset: (path: string, params?: Record<string, any>) => void;
|
|
3584
|
+
}
|
|
3585
|
+
|
|
3399
3586
|
export declare const SaveIcon: default_2.FC<Omit<IconProps, "name">>;
|
|
3400
3587
|
|
|
3401
3588
|
export declare const SearchIcon: default_2.FC<Omit<IconProps, "name">>;
|
|
@@ -3491,6 +3678,12 @@ declare interface SeparatorStyles {
|
|
|
3491
3678
|
label?: ViewProps;
|
|
3492
3679
|
}
|
|
3493
3680
|
|
|
3681
|
+
/** Imperatively flag the app as loaded, dismissing the splash. */
|
|
3682
|
+
export declare const setSplashLoaded: (value?: boolean) => void;
|
|
3683
|
+
|
|
3684
|
+
/** Imperatively flag the app as started. */
|
|
3685
|
+
export declare const setSplashStarted: (value?: boolean) => void;
|
|
3686
|
+
|
|
3494
3687
|
export declare const SettingsIcon: default_2.FC<Omit<IconProps, "name">>;
|
|
3495
3688
|
|
|
3496
3689
|
declare type Shape = 'square' | 'rounded';
|
|
@@ -3753,6 +3946,44 @@ declare interface SliderStyles {
|
|
|
3753
3946
|
|
|
3754
3947
|
export declare const SpinnerIcon: default_2.FC<Omit<IconProps, "name">>;
|
|
3755
3948
|
|
|
3949
|
+
export declare const SplashScreen: default_2.FC<SplashScreenProps>;
|
|
3950
|
+
|
|
3951
|
+
export declare interface SplashScreenProps extends ViewProps {
|
|
3952
|
+
/** Custom logo node. Takes precedence over `logoSrc`. */
|
|
3953
|
+
logo?: default_2.ReactNode;
|
|
3954
|
+
/** Image URL used for the logo when `logo` isn't provided. */
|
|
3955
|
+
logoSrc?: string;
|
|
3956
|
+
/** Custom loading indicator. Defaults to the `Loader` component. */
|
|
3957
|
+
loader?: default_2.ReactNode;
|
|
3958
|
+
/** Show the loading indicator under the logo. Default true. */
|
|
3959
|
+
showLoader?: boolean;
|
|
3960
|
+
/** Exit animation duration in ms (also the unmount delay). Default 600. */
|
|
3961
|
+
duration?: number;
|
|
3962
|
+
/**
|
|
3963
|
+
* Controlled "loaded" flag. When omitted the component reads the shared
|
|
3964
|
+
* `useSplashStore`. When the flag flips true, the splash fades out and
|
|
3965
|
+
* unmounts.
|
|
3966
|
+
*/
|
|
3967
|
+
isLoaded?: boolean;
|
|
3968
|
+
/** Called once the exit animation completes and the splash unmounts. */
|
|
3969
|
+
onHidden?: () => void;
|
|
3970
|
+
children?: default_2.ReactNode;
|
|
3971
|
+
}
|
|
3972
|
+
|
|
3973
|
+
/**
|
|
3974
|
+
* Splash state machine, mirroring the original app-demo SplashLayout
|
|
3975
|
+
* (`started` / `loaded`) but framework-agnostic (zustand instead of Redux) and
|
|
3976
|
+
* with NO `react-native-bootsplash` dependency — the overlay is pure JS so it
|
|
3977
|
+
* works on web and native alike.
|
|
3978
|
+
*/
|
|
3979
|
+
export declare interface SplashState {
|
|
3980
|
+
started: boolean;
|
|
3981
|
+
loaded: boolean;
|
|
3982
|
+
setStarted: (value?: boolean) => void;
|
|
3983
|
+
setLoaded: (value?: boolean) => void;
|
|
3984
|
+
reset: () => void;
|
|
3985
|
+
}
|
|
3986
|
+
|
|
3756
3987
|
export declare const StarIcon: default_2.FC<Omit<IconProps, "name">>;
|
|
3757
3988
|
|
|
3758
3989
|
declare type Status = 'default' | 'info' | 'success' | 'warning' | 'error';
|
|
@@ -4068,6 +4299,9 @@ export declare interface TextAreaProps extends Omit<InputProps, 'size' | 'shadow
|
|
|
4068
4299
|
labelProps?: any;
|
|
4069
4300
|
onSubmit?: (input: string) => void;
|
|
4070
4301
|
isWorkerRunning?: boolean;
|
|
4302
|
+
inputRef?: (node: {
|
|
4303
|
+
focus: () => void;
|
|
4304
|
+
} | null) => void;
|
|
4071
4305
|
}
|
|
4072
4306
|
|
|
4073
4307
|
declare type TextAreaStyles = {
|
|
@@ -4124,6 +4358,9 @@ export declare interface TextFieldProps extends Omit<InputProps, 'size' | 'shado
|
|
|
4124
4358
|
variant?: Variant_10;
|
|
4125
4359
|
isMultiline?: boolean;
|
|
4126
4360
|
rows?: number;
|
|
4361
|
+
inputRef?: (node: {
|
|
4362
|
+
focus: () => void;
|
|
4363
|
+
} | null) => void;
|
|
4127
4364
|
}
|
|
4128
4365
|
|
|
4129
4366
|
export declare interface TextFieldViewProps extends TextFieldProps {
|
|
@@ -4485,6 +4722,28 @@ export declare const useDesignSystemComponentProps: (componentName: DesignSystem
|
|
|
4485
4722
|
|
|
4486
4723
|
export declare const useDrawerStore: UseBoundStore<StoreApi<DrawerState>>;
|
|
4487
4724
|
|
|
4725
|
+
/**
|
|
4726
|
+
* Read the current route and drive navigation from a component.
|
|
4727
|
+
*
|
|
4728
|
+
* ```tsx
|
|
4729
|
+
* const { path, params, push, back, canGoBack } = useHistory();
|
|
4730
|
+
* push('/profile/42');
|
|
4731
|
+
* ```
|
|
4732
|
+
*/
|
|
4733
|
+
export declare const useHistory: () => {
|
|
4734
|
+
path: string;
|
|
4735
|
+
params: Record<string, any>;
|
|
4736
|
+
stack: HistoryEntry[];
|
|
4737
|
+
index: number;
|
|
4738
|
+
canGoBack: boolean;
|
|
4739
|
+
push: (path: string, params?: Record<string, any>) => void;
|
|
4740
|
+
replace: (path: string, params?: Record<string, any>) => void;
|
|
4741
|
+
back: () => boolean;
|
|
4742
|
+
go: (delta: number) => void;
|
|
4743
|
+
reset: (path: string, params?: Record<string, any>) => void;
|
|
4744
|
+
navigate: (path: string, params?: Record<string, any>) => void;
|
|
4745
|
+
};
|
|
4746
|
+
|
|
4488
4747
|
export declare const useMergedDesignSystemComponentProps: <T extends Record<string, any>>(componentName: DesignSystemComponentName, props: T) => T;
|
|
4489
4748
|
|
|
4490
4749
|
export declare const useMessageStore: UseBoundStore<StoreApi<MessageState>>;
|
|
@@ -4493,6 +4752,17 @@ export declare const useModalStore: UseBoundStore<StoreApi<ModalState>>;
|
|
|
4493
4752
|
|
|
4494
4753
|
export declare const UserIcon: default_2.FC<Omit<IconProps, "name">>;
|
|
4495
4754
|
|
|
4755
|
+
/**
|
|
4756
|
+
* The cross-platform history store. This is the single source of truth shared
|
|
4757
|
+
* by web and native — replacing the original app-demo RouterLayout's reliance
|
|
4758
|
+
* on `react-router-native` + a global history singleton. The store is plain
|
|
4759
|
+
* zustand, so it works identically on both platforms and can be driven
|
|
4760
|
+
* imperatively from anywhere via `navigate` / `goBack`.
|
|
4761
|
+
*/
|
|
4762
|
+
export declare const useRouterStore: UseBoundStore<StoreApi<RouterState>>;
|
|
4763
|
+
|
|
4764
|
+
export declare const useSplashStore: UseBoundStore<StoreApi<SplashState>>;
|
|
4765
|
+
|
|
4496
4766
|
export declare const useToast: () => {
|
|
4497
4767
|
toast: (variant: ToastVariant, title: string, description?: string, options?: ToastOptions) => string;
|
|
4498
4768
|
info: (title: string, description?: string, options?: ToastOptions) => string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import React, { createContext, useContext, Children, cloneElement, isValidElement, } from 'react';
|
|
1
|
+
import React, { createContext, useContext, Children, cloneElement, isValidElement, useEffect, useRef, useState, } from 'react';
|
|
2
|
+
import { Animated, Easing } from 'react-native';
|
|
2
3
|
import { View, Horizontal, Vertical } from 'app-studio';
|
|
3
4
|
import { ChevronIcon } from '../../Icon/Icon';
|
|
4
5
|
import { AccordionShapes, AccordionVariants } from './Accordion.style';
|
|
@@ -51,9 +52,18 @@ export const AccordionItem = ({ value, children, isDisabled = false, views, ...p
|
|
|
51
52
|
export const AccordionTrigger = ({ children, value, isExpanded, isDisabled, triggerId, contentId, views, asChild = false, ...props }) => {
|
|
52
53
|
const { toggleItem } = useAccordionContext();
|
|
53
54
|
const designSystemAccordion = useDesignSystemComponentProps('accordion');
|
|
55
|
+
const iconProgress = useRef(new Animated.Value(isExpanded ? 1 : 0)).current;
|
|
54
56
|
const mergedViews = deepMerge({
|
|
55
57
|
container: designSystemAccordion.views?.trigger,
|
|
56
58
|
}, views);
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
Animated.timing(iconProgress, {
|
|
61
|
+
toValue: isExpanded ? 1 : 0,
|
|
62
|
+
duration: 220,
|
|
63
|
+
easing: Easing.out(Easing.cubic),
|
|
64
|
+
useNativeDriver: true,
|
|
65
|
+
}).start();
|
|
66
|
+
}, [iconProgress, isExpanded]);
|
|
57
67
|
const handlePress = () => {
|
|
58
68
|
if (value && !isDisabled) {
|
|
59
69
|
toggleItem(value);
|
|
@@ -75,9 +85,20 @@ export const AccordionTrigger = ({ children, value, isExpanded, isDisabled, trig
|
|
|
75
85
|
}
|
|
76
86
|
return (<Horizontal {...triggerProps}>
|
|
77
87
|
{children}
|
|
78
|
-
<View
|
|
79
|
-
|
|
80
|
-
|
|
88
|
+
<Animated.View style={{
|
|
89
|
+
transform: [
|
|
90
|
+
{
|
|
91
|
+
rotate: iconProgress.interpolate({
|
|
92
|
+
inputRange: [0, 1],
|
|
93
|
+
outputRange: ['0deg', '180deg'],
|
|
94
|
+
}),
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
}}>
|
|
98
|
+
<View width={24} height={24} alignItems="center" justifyContent="center" {...mergedViews?.icon}>
|
|
99
|
+
<ChevronIcon widthHeight={16} orientation="down"/>
|
|
100
|
+
</View>
|
|
101
|
+
</Animated.View>
|
|
81
102
|
</Horizontal>);
|
|
82
103
|
};
|
|
83
104
|
export const AccordionContent = ({ children, isExpanded, isDisabled, triggerId, contentId, views, ...props }) => {
|
|
@@ -85,12 +106,55 @@ export const AccordionContent = ({ children, isExpanded, isDisabled, triggerId,
|
|
|
85
106
|
const mergedViews = deepMerge({
|
|
86
107
|
container: designSystemAccordion.views?.content,
|
|
87
108
|
}, views);
|
|
88
|
-
|
|
109
|
+
const transitionMs = 260;
|
|
110
|
+
const contentProgress = useRef(new Animated.Value(isExpanded ? 1 : 0)).current;
|
|
111
|
+
const [shouldRender, setShouldRender] = useState(Boolean(isExpanded));
|
|
112
|
+
const [contentHeight, setContentHeight] = useState(0);
|
|
113
|
+
useEffect(() => {
|
|
114
|
+
if (isExpanded) {
|
|
115
|
+
setShouldRender(true);
|
|
116
|
+
}
|
|
117
|
+
}, [isExpanded]);
|
|
118
|
+
useEffect(() => {
|
|
119
|
+
if (!shouldRender)
|
|
120
|
+
return;
|
|
121
|
+
const isOpeningWithoutMeasurement = isExpanded && contentHeight === 0;
|
|
122
|
+
if (isOpeningWithoutMeasurement)
|
|
123
|
+
return;
|
|
124
|
+
const animation = Animated.timing(contentProgress, {
|
|
125
|
+
toValue: isExpanded ? 1 : 0,
|
|
126
|
+
duration: transitionMs,
|
|
127
|
+
easing: Easing.out(Easing.cubic),
|
|
128
|
+
useNativeDriver: false,
|
|
129
|
+
});
|
|
130
|
+
animation.start(({ finished }) => {
|
|
131
|
+
if (finished && !isExpanded) {
|
|
132
|
+
setShouldRender(false);
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
return () => {
|
|
136
|
+
animation.stop();
|
|
137
|
+
};
|
|
138
|
+
}, [contentHeight, contentProgress, isExpanded, shouldRender]);
|
|
139
|
+
if (!shouldRender) {
|
|
89
140
|
return null;
|
|
90
141
|
}
|
|
91
|
-
return (<View
|
|
92
|
-
|
|
93
|
-
|
|
142
|
+
return (<Animated.View style={{
|
|
143
|
+
height: contentProgress.interpolate({
|
|
144
|
+
inputRange: [0, 1],
|
|
145
|
+
outputRange: [0, contentHeight],
|
|
146
|
+
}),
|
|
147
|
+
opacity: contentProgress,
|
|
148
|
+
overflow: 'hidden',
|
|
149
|
+
}}>
|
|
150
|
+
<View overflow="hidden" {...mergedViews?.container} {...props}>
|
|
151
|
+
<View padding={16} onLayout={(event) => {
|
|
152
|
+
setContentHeight(event.nativeEvent.layout.height);
|
|
153
|
+
}}>
|
|
154
|
+
{children}
|
|
155
|
+
</View>
|
|
156
|
+
</View>
|
|
157
|
+
</Animated.View>);
|
|
94
158
|
};
|
|
95
159
|
export const AccordionView = ({ children, shape = 'rounded', variant = 'default', views, baseId, type, collapsible, themeMode: elementMode, ...props }) => {
|
|
96
160
|
return (<Vertical width="100%" {...AccordionShapes[shape]} {...AccordionVariants[variant]} {...views?.container} {...props}>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.view.native.js","sourceRoot":"","sources":["../../../../../src/components/Accordion/Accordion/Accordion.view.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,aAAa,EACb,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,cAAc,
|
|
1
|
+
{"version":3,"file":"Accordion.view.native.js","sourceRoot":"","sources":["../../../../../src/components/Accordion/Accordion/Accordion.view.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,aAAa,EACb,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,SAAS,EACT,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAa,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAO9C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAE7E,MAAM,gBAAgB,GAAG,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ChC,CAAC;YACF,OAAO,EAAE,eAAe;YACxB,QAAQ,EAAE,QAAQ;SACnB,CAAC,CAEF;MAAA,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,WAAW,EAAE,SAAS,CAAC,CAAC,IAAI,KAAK,CAAC,CAC5D;QAAA,CAAC,IAAI,CACH,OAAO,CAAC,CAAC,EAAE,CAAC,CACZ,QAAQ,CAAC,CAAC,CAAC,KAAU,EAAE,EAAE;YACvB,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACpD,CAAC,CAAC,CAEF;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,IAAI,CACR;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,QAAQ,CAAC,IAAI,CAAC,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAUtB,CAAC,EACH,QAAQ,EACR,KAAK,GAAG,SAAS,EACjB,OAAO,GAAG,SAAS,EACnB,KAAK,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,SAAS,EAAE,WAAW,EACtB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,CAAC,QAAQ,CACP,KAAK,CAAC,MAAM,CACZ,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC,CAC3B,IAAI,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAC/B,IAAI,KAAK,EAAE,SAAS,CAAC,CACrB,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,QAAQ,CAAC,CACZ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ViewProps } from 'app-studio';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ActionSheetAnimation, ActionSheetItem, ActionSheetSize, ActionSheetStyles, ActionSheetValue } from './ActionSheet.type';
|
|
4
|
+
export interface ActionSheetProps extends Omit<ViewProps, 'children' | 'onChange' | 'onSelect' | 'title'> {
|
|
5
|
+
isOpen?: boolean;
|
|
6
|
+
defaultOpen?: boolean;
|
|
7
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
isClosePrevented?: boolean;
|
|
10
|
+
dismissOnBackdropPress?: boolean;
|
|
11
|
+
title?: React.ReactNode;
|
|
12
|
+
description?: React.ReactNode;
|
|
13
|
+
header?: React.ReactNode;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
items?: ActionSheetItem[];
|
|
16
|
+
value?: ActionSheetValue;
|
|
17
|
+
defaultValue?: ActionSheetValue;
|
|
18
|
+
isMulti?: boolean;
|
|
19
|
+
closeOnSelect?: boolean;
|
|
20
|
+
onSelect?: (value: string, item: ActionSheetItem) => void;
|
|
21
|
+
onChange?: (value: ActionSheetValue, item: ActionSheetItem) => void;
|
|
22
|
+
showCancel?: boolean;
|
|
23
|
+
cancelLabel?: string;
|
|
24
|
+
onCancel?: () => void;
|
|
25
|
+
showHandle?: boolean;
|
|
26
|
+
size?: ActionSheetSize;
|
|
27
|
+
maxHeight?: number | string;
|
|
28
|
+
animationType?: ActionSheetAnimation;
|
|
29
|
+
views?: ActionSheetStyles;
|
|
30
|
+
}
|
|
31
|
+
export interface ActionSheetViewProps extends ActionSheetProps {
|
|
32
|
+
isSheetOpen: boolean;
|
|
33
|
+
selectedValue: ActionSheetValue;
|
|
34
|
+
setSelectedValue: (value: ActionSheetValue) => void;
|
|
35
|
+
closeSheet: () => void;
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionSheet.props.js","sourceRoot":"","sources":["../../../../../src/components/ActionSheet/ActionSheet/ActionSheet.props.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ActionSheetProps } from './ActionSheet.props';
|
|
2
|
+
import { ActionSheetValue } from './ActionSheet.type';
|
|
3
|
+
export declare const useActionSheetState: ({ isOpen, defaultOpen, value, defaultValue, isMulti, onOpenChange, onClose, }: ActionSheetProps) => {
|
|
4
|
+
isSheetOpen: boolean;
|
|
5
|
+
selectedValue: ActionSheetValue;
|
|
6
|
+
setSelectedValue: (nextValue: ActionSheetValue) => void;
|
|
7
|
+
closeSheet: () => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const useActionSheetState = ({ isOpen, defaultOpen = false, value, defaultValue, isMulti = false, onOpenChange, onClose, }) => {
|
|
3
|
+
const isOpenControlled = typeof isOpen === 'boolean';
|
|
4
|
+
const isValueControlled = value !== undefined;
|
|
5
|
+
const initialValue = defaultValue ?? (isMulti ? [] : '');
|
|
6
|
+
const [internalOpen, setInternalOpen] = React.useState(defaultOpen);
|
|
7
|
+
const [internalValue, setInternalValue] = React.useState(initialValue);
|
|
8
|
+
const isSheetOpen = isOpenControlled ? !!isOpen : internalOpen;
|
|
9
|
+
const selectedValue = isValueControlled
|
|
10
|
+
? value
|
|
11
|
+
: internalValue;
|
|
12
|
+
const setSheetOpen = React.useCallback((nextOpen) => {
|
|
13
|
+
if (!isOpenControlled)
|
|
14
|
+
setInternalOpen(nextOpen);
|
|
15
|
+
onOpenChange?.(nextOpen);
|
|
16
|
+
if (!nextOpen)
|
|
17
|
+
onClose?.();
|
|
18
|
+
}, [isOpenControlled, onClose, onOpenChange]);
|
|
19
|
+
const closeSheet = React.useCallback(() => {
|
|
20
|
+
setSheetOpen(false);
|
|
21
|
+
}, [setSheetOpen]);
|
|
22
|
+
const setSelectedValue = React.useCallback((nextValue) => {
|
|
23
|
+
if (!isValueControlled)
|
|
24
|
+
setInternalValue(nextValue);
|
|
25
|
+
}, [isValueControlled]);
|
|
26
|
+
return {
|
|
27
|
+
isSheetOpen,
|
|
28
|
+
selectedValue,
|
|
29
|
+
setSelectedValue,
|
|
30
|
+
closeSheet,
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=ActionSheet.state.js.map
|