@getcortexlabs/mavis 0.1.0-alpha.1 → 0.1.0-alpha.11
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/README.md +9 -5
- package/dist/app-icons.d.ts +26 -0
- package/dist/app-icons.d.ts.map +1 -0
- package/dist/app-icons.js +9 -0
- package/dist/app-icons.js.map +1 -0
- package/dist/date-format.d.ts +3 -0
- package/dist/date-format.d.ts.map +1 -0
- package/dist/date-format.js +2 -0
- package/dist/date-format.js.map +1 -0
- package/dist/files.d.ts +4 -0
- package/dist/files.d.ts.map +1 -0
- package/dist/files.js +3 -0
- package/dist/files.js.map +1 -0
- package/dist/native/app-icons.android.d.ts +4 -0
- package/dist/native/app-icons.android.d.ts.map +1 -0
- package/dist/native/app-icons.android.js +67 -0
- package/dist/native/app-icons.android.js.map +1 -0
- package/dist/native/app-icons.d.ts +4 -0
- package/dist/native/app-icons.d.ts.map +1 -0
- package/dist/native/app-icons.ios.d.ts +4 -0
- package/dist/native/app-icons.ios.d.ts.map +1 -0
- package/dist/native/app-icons.ios.js +45 -0
- package/dist/native/app-icons.ios.js.map +1 -0
- package/dist/native/app-icons.js +9 -0
- package/dist/native/app-icons.js.map +1 -0
- package/dist/native/appearance.android.d.ts +4 -0
- package/dist/native/appearance.android.d.ts.map +1 -0
- package/dist/native/appearance.android.js +55 -0
- package/dist/native/appearance.android.js.map +1 -0
- package/dist/native/appearance.d.ts +4 -0
- package/dist/native/appearance.d.ts.map +1 -0
- package/dist/native/appearance.js +31 -0
- package/dist/native/appearance.js.map +1 -0
- package/dist/native/avatar-image.d.ts +4 -0
- package/dist/native/avatar-image.d.ts.map +1 -0
- package/dist/native/avatar-image.js +12 -0
- package/dist/native/avatar-image.js.map +1 -0
- package/dist/native/avatar-label.android.d.ts +9 -0
- package/dist/native/avatar-label.android.d.ts.map +1 -0
- package/dist/native/avatar-label.android.js +9 -0
- package/dist/native/avatar-label.android.js.map +1 -0
- package/dist/native/avatar-label.d.ts +2 -0
- package/dist/native/avatar-label.d.ts.map +1 -0
- package/dist/native/avatar-label.js +2 -0
- package/dist/native/avatar-label.js.map +1 -0
- package/dist/native/box.android.d.ts +5 -0
- package/dist/native/box.android.d.ts.map +1 -0
- package/dist/native/box.android.js +7 -0
- package/dist/native/box.android.js.map +1 -0
- package/dist/native/box.d.ts +2 -0
- package/dist/native/box.d.ts.map +1 -0
- package/dist/native/box.ios.d.ts +10 -0
- package/dist/native/box.ios.d.ts.map +1 -0
- package/dist/native/box.ios.js +40 -0
- package/dist/native/box.ios.js.map +1 -0
- package/dist/native/box.js +3 -0
- package/dist/native/box.js.map +1 -0
- package/dist/native/button.android.d.ts +11 -0
- package/dist/native/button.android.d.ts.map +1 -0
- package/dist/native/button.android.js +31 -0
- package/dist/native/button.android.js.map +1 -0
- package/dist/native/button.ios.d.ts +13 -1
- package/dist/native/button.ios.d.ts.map +1 -1
- package/dist/native/button.ios.js +29 -1
- package/dist/native/button.ios.js.map +1 -1
- package/dist/native/checkbox.android.d.ts +7 -0
- package/dist/native/checkbox.android.d.ts.map +1 -0
- package/dist/native/checkbox.android.js +26 -0
- package/dist/native/checkbox.android.js.map +1 -0
- package/dist/native/checkbox.d.ts +7 -0
- package/dist/native/checkbox.d.ts.map +1 -0
- package/dist/native/checkbox.js +7 -0
- package/dist/native/checkbox.js.map +1 -0
- package/dist/native/collection-motion.d.ts +5 -0
- package/dist/native/collection-motion.d.ts.map +1 -0
- package/dist/native/collection-motion.js +157 -0
- package/dist/native/collection-motion.js.map +1 -0
- package/dist/native/combobox-editor.android.d.ts +3 -0
- package/dist/native/combobox-editor.android.d.ts.map +1 -0
- package/dist/native/combobox-editor.android.js +5 -0
- package/dist/native/combobox-editor.android.js.map +1 -0
- package/dist/native/combobox-editor.d.ts +4 -0
- package/dist/native/combobox-editor.d.ts.map +1 -0
- package/dist/native/combobox-editor.js +5 -0
- package/dist/native/combobox-editor.js.map +1 -0
- package/dist/native/composed-button.android.d.ts +4 -0
- package/dist/native/composed-button.android.d.ts.map +1 -0
- package/dist/native/composed-button.android.js +53 -0
- package/dist/native/composed-button.android.js.map +1 -0
- package/dist/native/composed-button.d.ts +3 -0
- package/dist/native/composed-button.d.ts.map +1 -0
- package/dist/native/composed-button.js +4 -0
- package/dist/native/composed-button.js.map +1 -0
- package/dist/native/date-format.android.d.ts +5 -0
- package/dist/native/date-format.android.d.ts.map +1 -0
- package/dist/native/date-format.android.js +39 -0
- package/dist/native/date-format.android.js.map +1 -0
- package/dist/native/date-format.d.ts +6 -0
- package/dist/native/date-format.d.ts.map +1 -0
- package/dist/native/date-format.ios.d.ts +5 -0
- package/dist/native/date-format.ios.d.ts.map +1 -0
- package/dist/native/date-format.ios.js +29 -0
- package/dist/native/date-format.ios.js.map +1 -0
- package/dist/native/date-format.js +8 -0
- package/dist/native/date-format.js.map +1 -0
- package/dist/native/dialog.android.d.ts +12 -0
- package/dist/native/dialog.android.d.ts.map +1 -0
- package/dist/native/dialog.android.js +46 -0
- package/dist/native/dialog.android.js.map +1 -0
- package/dist/native/dialog.d.ts +12 -0
- package/dist/native/dialog.d.ts.map +1 -0
- package/dist/native/dialog.ios.d.ts +12 -0
- package/dist/native/dialog.ios.d.ts.map +1 -0
- package/dist/native/dialog.ios.js +13 -0
- package/dist/native/dialog.ios.js.map +1 -0
- package/dist/native/dialog.js +4 -0
- package/dist/native/dialog.js.map +1 -0
- package/dist/native/dynamic-type.d.ts +15 -0
- package/dist/native/dynamic-type.d.ts.map +1 -0
- package/dist/native/dynamic-type.js +47 -0
- package/dist/native/dynamic-type.js.map +1 -0
- package/dist/native/file-access.d.ts +23 -0
- package/dist/native/file-access.d.ts.map +1 -0
- package/dist/native/file-access.js +55 -0
- package/dist/native/file-access.js.map +1 -0
- package/dist/native/file-picker.android.d.ts +3 -0
- package/dist/native/file-picker.android.d.ts.map +1 -0
- package/dist/native/file-picker.android.js +147 -0
- package/dist/native/file-picker.android.js.map +1 -0
- package/dist/native/file-picker.d.ts +4 -0
- package/dist/native/file-picker.d.ts.map +1 -0
- package/dist/native/file-picker.ios.d.ts +3 -0
- package/dist/native/file-picker.ios.d.ts.map +1 -0
- package/dist/native/file-picker.ios.js +152 -0
- package/dist/native/file-picker.ios.js.map +1 -0
- package/dist/native/file-picker.js +7 -0
- package/dist/native/file-picker.js.map +1 -0
- package/dist/native/flex-children.d.ts +4 -0
- package/dist/native/flex-children.d.ts.map +1 -0
- package/dist/native/flex-children.js +12 -0
- package/dist/native/flex-children.js.map +1 -0
- package/dist/native/flex-layout.android.d.ts +3 -1
- package/dist/native/flex-layout.android.d.ts.map +1 -1
- package/dist/native/flex-layout.android.js +9 -0
- package/dist/native/flex-layout.android.js.map +1 -1
- package/dist/native/flex-layout.ios.d.ts +14 -1
- package/dist/native/flex-layout.ios.d.ts.map +1 -1
- package/dist/native/flex-layout.ios.js +113 -0
- package/dist/native/flex-layout.ios.js.map +1 -1
- package/dist/native/image-effects.d.ts +11 -0
- package/dist/native/image-effects.d.ts.map +1 -0
- package/dist/native/image-effects.js +61 -0
- package/dist/native/image-effects.js.map +1 -0
- package/dist/native/input-action.d.ts +5 -0
- package/dist/native/input-action.d.ts.map +1 -0
- package/dist/native/input-action.js +13 -0
- package/dist/native/input-action.js.map +1 -0
- package/dist/native/keyboard-dismiss.android.d.ts +8 -0
- package/dist/native/keyboard-dismiss.android.d.ts.map +1 -0
- package/dist/native/keyboard-dismiss.android.js +9 -0
- package/dist/native/keyboard-dismiss.android.js.map +1 -0
- package/dist/native/keyboard-dismiss.d.ts +10 -0
- package/dist/native/keyboard-dismiss.d.ts.map +1 -0
- package/dist/native/keyboard-dismiss.ios.d.ts +8 -0
- package/dist/native/keyboard-dismiss.ios.d.ts.map +1 -0
- package/dist/native/keyboard-dismiss.ios.js +91 -0
- package/dist/native/keyboard-dismiss.ios.js.map +1 -0
- package/dist/native/keyboard-dismiss.js +6 -0
- package/dist/native/keyboard-dismiss.js.map +1 -0
- package/dist/native/label.android.d.ts +12 -0
- package/dist/native/label.android.d.ts.map +1 -0
- package/dist/native/label.android.js +19 -0
- package/dist/native/label.android.js.map +1 -0
- package/dist/native/label.ios.d.ts +14 -1
- package/dist/native/label.ios.d.ts.map +1 -1
- package/dist/native/label.ios.js +37 -1
- package/dist/native/label.ios.js.map +1 -1
- package/dist/native/measure-memo.d.ts +37 -0
- package/dist/native/measure-memo.d.ts.map +1 -0
- package/dist/native/measure-memo.js +82 -0
- package/dist/native/measure-memo.js.map +1 -0
- package/dist/native/motion-owner.d.ts +5 -0
- package/dist/native/motion-owner.d.ts.map +1 -0
- package/dist/native/motion-owner.js +58 -0
- package/dist/native/motion-owner.js.map +1 -0
- package/dist/native/motion-region.d.ts +7 -0
- package/dist/native/motion-region.d.ts.map +1 -0
- package/dist/native/motion-region.js +249 -0
- package/dist/native/motion-region.js.map +1 -0
- package/dist/native/motion-surface.d.ts +9 -0
- package/dist/native/motion-surface.d.ts.map +1 -0
- package/dist/native/motion-surface.js +229 -0
- package/dist/native/motion-surface.js.map +1 -0
- package/dist/native/platform-motion.d.ts +5 -0
- package/dist/native/platform-motion.d.ts.map +1 -0
- package/dist/native/platform-motion.js +90 -0
- package/dist/native/platform-motion.js.map +1 -0
- package/dist/native/press.d.ts +8 -2
- package/dist/native/press.d.ts.map +1 -1
- package/dist/native/press.js +58 -8
- package/dist/native/press.js.map +1 -1
- package/dist/native/progress.d.ts +7 -0
- package/dist/native/progress.d.ts.map +1 -0
- package/dist/native/progress.js +77 -0
- package/dist/native/progress.js.map +1 -0
- package/dist/native/screen.android.d.ts +6 -0
- package/dist/native/screen.android.d.ts.map +1 -0
- package/dist/native/screen.android.js +8 -0
- package/dist/native/screen.android.js.map +1 -0
- package/dist/native/screen.d.ts +2 -0
- package/dist/native/screen.d.ts.map +1 -0
- package/dist/native/screen.js +3 -0
- package/dist/native/screen.js.map +1 -0
- package/dist/native/scroll-motion.d.ts +12 -0
- package/dist/native/scroll-motion.d.ts.map +1 -0
- package/dist/native/scroll-motion.js +100 -0
- package/dist/native/scroll-motion.js.map +1 -0
- package/dist/native/section-scroll.d.ts +9 -0
- package/dist/native/section-scroll.d.ts.map +1 -0
- package/dist/native/section-scroll.js +69 -0
- package/dist/native/section-scroll.js.map +1 -0
- package/dist/native/segmented.d.ts +14 -0
- package/dist/native/segmented.d.ts.map +1 -0
- package/dist/native/segmented.js +86 -0
- package/dist/native/segmented.js.map +1 -0
- package/dist/native/sheet.android.d.ts +18 -0
- package/dist/native/sheet.android.d.ts.map +1 -0
- package/dist/native/sheet.android.js +16 -0
- package/dist/native/sheet.android.js.map +1 -0
- package/dist/native/sheet.d.ts +21 -0
- package/dist/native/sheet.d.ts.map +1 -0
- package/dist/native/sheet.ios.d.ts +19 -0
- package/dist/native/sheet.ios.d.ts.map +1 -0
- package/dist/native/sheet.ios.js +41 -0
- package/dist/native/sheet.ios.js.map +1 -0
- package/dist/native/sheet.js +17 -0
- package/dist/native/sheet.js.map +1 -0
- package/dist/native/surface-effects.d.ts +4 -0
- package/dist/native/surface-effects.d.ts.map +1 -0
- package/dist/native/surface-effects.js +31 -0
- package/dist/native/surface-effects.js.map +1 -0
- package/dist/native/tabs.android.d.ts +3 -0
- package/dist/native/tabs.android.d.ts.map +1 -0
- package/dist/native/tabs.android.js +29 -0
- package/dist/native/tabs.android.js.map +1 -0
- package/dist/native/tabs.d.ts +3 -0
- package/dist/native/tabs.d.ts.map +1 -0
- package/dist/native/tabs.js +4 -0
- package/dist/native/tabs.js.map +1 -0
- package/dist/native/text-field.android.d.ts +1 -0
- package/dist/native/text-field.android.d.ts.map +1 -1
- package/dist/native/text-field.android.js +13 -0
- package/dist/native/text-field.android.js.map +1 -1
- package/dist/native/text-field.ios.d.ts +9 -0
- package/dist/native/text-field.ios.d.ts.map +1 -0
- package/dist/native/text-field.ios.js +52 -0
- package/dist/native/text-field.ios.js.map +1 -0
- package/dist/native/text-view.ios.d.ts +7 -0
- package/dist/native/text-view.ios.d.ts.map +1 -0
- package/dist/native/text-view.ios.js +10 -0
- package/dist/native/text-view.ios.js.map +1 -0
- package/dist/native/toast.android.d.ts +4 -0
- package/dist/native/toast.android.d.ts.map +1 -0
- package/dist/native/toast.android.js +10 -0
- package/dist/native/toast.android.js.map +1 -0
- package/dist/native/toast.d.ts +4 -0
- package/dist/native/toast.d.ts.map +1 -0
- package/dist/native/toast.ios.d.ts +4 -0
- package/dist/native/toast.ios.d.ts.map +1 -0
- package/dist/native/toast.ios.js +8 -0
- package/dist/native/toast.ios.js.map +1 -0
- package/dist/native/toast.js +5 -0
- package/dist/native/toast.js.map +1 -0
- package/dist/native/visual-effects.d.ts +5 -0
- package/dist/native/visual-effects.d.ts.map +1 -0
- package/dist/native/visual-effects.js +126 -0
- package/dist/native/visual-effects.js.map +1 -0
- package/dist/vue/components/ChartPlot.d.ts +65 -0
- package/dist/vue/components/ChartPlot.d.ts.map +1 -0
- package/dist/vue/components/ChartPlot.js +100 -0
- package/dist/vue/components/ChartPlot.js.map +1 -0
- package/dist/vue/components/ChoiceControl.d.ts +114 -0
- package/dist/vue/components/ChoiceControl.d.ts.map +1 -0
- package/dist/vue/components/ChoiceControl.js +218 -0
- package/dist/vue/components/ChoiceControl.js.map +1 -0
- package/dist/vue/components/DateCalendar.d.ts +109 -0
- package/dist/vue/components/DateCalendar.d.ts.map +1 -0
- package/dist/vue/components/DateCalendar.js +98 -0
- package/dist/vue/components/DateCalendar.js.map +1 -0
- package/dist/vue/components/LoadingDecoration.d.ts +116 -0
- package/dist/vue/components/LoadingDecoration.d.ts.map +1 -0
- package/dist/vue/components/LoadingDecoration.js +34 -0
- package/dist/vue/components/LoadingDecoration.js.map +1 -0
- package/dist/vue/components/MAccordion.d.ts +119 -0
- package/dist/vue/components/MAccordion.d.ts.map +1 -0
- package/dist/vue/components/MAccordion.js +83 -0
- package/dist/vue/components/MAccordion.js.map +1 -0
- package/dist/vue/components/MAlert.d.ts +109 -0
- package/dist/vue/components/MAlert.d.ts.map +1 -0
- package/dist/vue/components/MAlert.js +126 -0
- package/dist/vue/components/MAlert.js.map +1 -0
- package/dist/vue/components/MAvatar.d.ts +80 -0
- package/dist/vue/components/MAvatar.d.ts.map +1 -0
- package/dist/vue/components/MAvatar.js +86 -0
- package/dist/vue/components/MAvatar.js.map +1 -0
- package/dist/vue/components/MBadge.d.ts +70 -0
- package/dist/vue/components/MBadge.d.ts.map +1 -0
- package/dist/vue/components/MBadge.js +30 -0
- package/dist/vue/components/MBadge.js.map +1 -0
- package/dist/vue/components/MButton.d.ts +212 -32
- package/dist/vue/components/MButton.d.ts.map +1 -1
- package/dist/vue/components/MButton.js +192 -20
- package/dist/vue/components/MButton.js.map +1 -1
- package/dist/vue/components/MCard.d.ts +113 -21
- package/dist/vue/components/MCard.d.ts.map +1 -1
- package/dist/vue/components/MCard.js +24 -6
- package/dist/vue/components/MCard.js.map +1 -1
- package/dist/vue/components/MCheckbox.d.ts +103 -0
- package/dist/vue/components/MCheckbox.d.ts.map +1 -0
- package/dist/vue/components/MCheckbox.js +26 -0
- package/dist/vue/components/MCheckbox.js.map +1 -0
- package/dist/vue/components/MChip.d.ts +117 -0
- package/dist/vue/components/MChip.d.ts.map +1 -0
- package/dist/vue/components/MChip.js +120 -0
- package/dist/vue/components/MChip.js.map +1 -0
- package/dist/vue/components/MCombobox.d.ts +279 -0
- package/dist/vue/components/MCombobox.d.ts.map +1 -0
- package/dist/vue/components/MCombobox.js +234 -0
- package/dist/vue/components/MCombobox.js.map +1 -0
- package/dist/vue/components/MDatePicker.d.ts +1350 -0
- package/dist/vue/components/MDatePicker.d.ts.map +1 -0
- package/dist/vue/components/MDatePicker.js +25 -0
- package/dist/vue/components/MDatePicker.js.map +1 -0
- package/dist/vue/components/MDialog.d.ts +100 -0
- package/dist/vue/components/MDialog.d.ts.map +1 -0
- package/dist/vue/components/MDialog.js +245 -0
- package/dist/vue/components/MDialog.js.map +1 -0
- package/dist/vue/components/MEmptyState.d.ts +117 -0
- package/dist/vue/components/MEmptyState.d.ts.map +1 -0
- package/dist/vue/components/MEmptyState.js +79 -0
- package/dist/vue/components/MEmptyState.js.map +1 -0
- package/dist/vue/components/MFilePicker.d.ts +112 -0
- package/dist/vue/components/MFilePicker.d.ts.map +1 -0
- package/dist/vue/components/MFilePicker.js +196 -0
- package/dist/vue/components/MFilePicker.js.map +1 -0
- package/dist/vue/components/MGrid.d.ts +165 -0
- package/dist/vue/components/MGrid.d.ts.map +1 -0
- package/dist/vue/components/MGrid.js +52 -0
- package/dist/vue/components/MGrid.js.map +1 -0
- package/dist/vue/components/MIcon.d.ts +75 -0
- package/dist/vue/components/MIcon.d.ts.map +1 -0
- package/dist/vue/components/MIcon.js +45 -0
- package/dist/vue/components/MIcon.js.map +1 -0
- package/dist/vue/components/MImage.d.ts +248 -0
- package/dist/vue/components/MImage.d.ts.map +1 -0
- package/dist/vue/components/MImage.js +157 -0
- package/dist/vue/components/MImage.js.map +1 -0
- package/dist/vue/components/MInput.d.ts +195 -50
- package/dist/vue/components/MInput.d.ts.map +1 -1
- package/dist/vue/components/MInput.js +134 -20
- package/dist/vue/components/MInput.js.map +1 -1
- package/dist/vue/components/MLink.d.ts +120 -0
- package/dist/vue/components/MLink.d.ts.map +1 -0
- package/dist/vue/components/MLink.js +76 -0
- package/dist/vue/components/MLink.js.map +1 -0
- package/dist/vue/components/MListItem.d.ts +106 -0
- package/dist/vue/components/MListItem.d.ts.map +1 -0
- package/dist/vue/components/MListItem.js +53 -0
- package/dist/vue/components/MListItem.js.map +1 -0
- package/dist/vue/components/MPopover.d.ts +106 -0
- package/dist/vue/components/MPopover.d.ts.map +1 -0
- package/dist/vue/components/MPopover.js +209 -0
- package/dist/vue/components/MPopover.js.map +1 -0
- package/dist/vue/components/MProgress.d.ts +122 -0
- package/dist/vue/components/MProgress.d.ts.map +1 -0
- package/dist/vue/components/MProgress.js +75 -0
- package/dist/vue/components/MProgress.js.map +1 -0
- package/dist/vue/components/MRadioGroup.d.ts +103 -0
- package/dist/vue/components/MRadioGroup.d.ts.map +1 -0
- package/dist/vue/components/MRadioGroup.js +57 -0
- package/dist/vue/components/MRadioGroup.js.map +1 -0
- package/dist/vue/components/MRangeSlider.d.ts +105 -0
- package/dist/vue/components/MRangeSlider.d.ts.map +1 -0
- package/dist/vue/components/MRangeSlider.js +107 -0
- package/dist/vue/components/MRangeSlider.js.map +1 -0
- package/dist/vue/components/MReveal.d.ts +73 -37
- package/dist/vue/components/MReveal.d.ts.map +1 -1
- package/dist/vue/components/MReveal.js +80 -37
- package/dist/vue/components/MReveal.js.map +1 -1
- package/dist/vue/components/MScreen.d.ts +42 -8
- package/dist/vue/components/MScreen.d.ts.map +1 -1
- package/dist/vue/components/MScreen.js +91 -6
- package/dist/vue/components/MScreen.js.map +1 -1
- package/dist/vue/components/MSegmentedControl.d.ts +95 -0
- package/dist/vue/components/MSegmentedControl.d.ts.map +1 -0
- package/dist/vue/components/MSegmentedControl.js +172 -0
- package/dist/vue/components/MSegmentedControl.js.map +1 -0
- package/dist/vue/components/MSelect.d.ts +140 -0
- package/dist/vue/components/MSelect.d.ts.map +1 -0
- package/dist/vue/components/MSelect.js +158 -0
- package/dist/vue/components/MSelect.js.map +1 -0
- package/dist/vue/components/MSeparator.d.ts +56 -0
- package/dist/vue/components/MSeparator.d.ts.map +1 -0
- package/dist/vue/components/MSeparator.js +36 -0
- package/dist/vue/components/MSeparator.js.map +1 -0
- package/dist/vue/components/MSheet.d.ts +116 -0
- package/dist/vue/components/MSheet.d.ts.map +1 -0
- package/dist/vue/components/MSheet.js +313 -0
- package/dist/vue/components/MSheet.js.map +1 -0
- package/dist/vue/components/MSkeleton.d.ts +89 -0
- package/dist/vue/components/MSkeleton.d.ts.map +1 -0
- package/dist/vue/components/MSkeleton.js +89 -0
- package/dist/vue/components/MSkeleton.js.map +1 -0
- package/dist/vue/components/MSlider.d.ts +8 -4
- package/dist/vue/components/MSlider.d.ts.map +1 -1
- package/dist/vue/components/MSlider.js +3 -2
- package/dist/vue/components/MSlider.js.map +1 -1
- package/dist/vue/components/MStack.d.ts +199 -0
- package/dist/vue/components/MStack.d.ts.map +1 -0
- package/dist/vue/components/MStack.js +62 -0
- package/dist/vue/components/MStack.js.map +1 -0
- package/dist/vue/components/MSwitch.d.ts +89 -0
- package/dist/vue/components/MSwitch.d.ts.map +1 -0
- package/dist/vue/components/MSwitch.js +173 -0
- package/dist/vue/components/MSwitch.js.map +1 -0
- package/dist/vue/components/MTabs.d.ts +101 -0
- package/dist/vue/components/MTabs.d.ts.map +1 -0
- package/dist/vue/components/MTabs.js +245 -0
- package/dist/vue/components/MTabs.js.map +1 -0
- package/dist/vue/components/MText.d.ts +61 -25
- package/dist/vue/components/MText.d.ts.map +1 -1
- package/dist/vue/components/MText.js +47 -19
- package/dist/vue/components/MText.js.map +1 -1
- package/dist/vue/components/MTimePicker.d.ts +655 -0
- package/dist/vue/components/MTimePicker.d.ts.map +1 -0
- package/dist/vue/components/MTimePicker.js +50 -0
- package/dist/vue/components/MTimePicker.js.map +1 -0
- package/dist/vue/components/MToast.d.ts +23 -0
- package/dist/vue/components/MToast.d.ts.map +1 -0
- package/dist/vue/components/MToast.js +242 -0
- package/dist/vue/components/MToast.js.map +1 -0
- package/dist/vue/components/MTooltip.d.ts +65 -0
- package/dist/vue/components/MTooltip.d.ts.map +1 -0
- package/dist/vue/components/MTooltip.js +35 -0
- package/dist/vue/components/MTooltip.js.map +1 -0
- package/dist/vue/components/MVirtualList.d.ts +3 -0
- package/dist/vue/components/MVirtualList.d.ts.map +1 -0
- package/dist/vue/components/MVirtualList.js +88 -0
- package/dist/vue/components/MVirtualList.js.map +1 -0
- package/dist/vue/components/configurator.d.ts +541 -0
- package/dist/vue/components/configurator.d.ts.map +1 -0
- package/dist/vue/components/configurator.js +24 -0
- package/dist/vue/components/configurator.js.map +1 -0
- package/dist/vue/components/discovery.d.ts +282 -0
- package/dist/vue/components/discovery.d.ts.map +1 -0
- package/dist/vue/components/discovery.js +67 -0
- package/dist/vue/components/discovery.js.map +1 -0
- package/dist/vue/components/layout.d.ts +230 -88
- package/dist/vue/components/layout.d.ts.map +1 -1
- package/dist/vue/components/layout.js +16 -9
- package/dist/vue/components/layout.js.map +1 -1
- package/dist/vue/components/navigation.d.ts +225 -0
- package/dist/vue/components/navigation.d.ts.map +1 -0
- package/dist/vue/components/navigation.js +16 -0
- package/dist/vue/components/navigation.js.map +1 -0
- package/dist/vue/components/wayfinding.d.ts +441 -0
- package/dist/vue/components/wayfinding.d.ts.map +1 -0
- package/dist/vue/components/wayfinding.js +37 -0
- package/dist/vue/components/wayfinding.js.map +1 -0
- package/dist/vue/components/workflows.d.ts +251 -0
- package/dist/vue/components/workflows.d.ts.map +1 -0
- package/dist/vue/components/workflows.js +35 -0
- package/dist/vue/components/workflows.js.map +1 -0
- package/dist/vue/index.d.ts +54 -9
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/index.js +105 -7
- package/dist/vue/index.js.map +1 -1
- package/dist/vue/layers.d.ts +19 -0
- package/dist/vue/layers.d.ts.map +1 -0
- package/dist/vue/layers.js +26 -0
- package/dist/vue/layers.js.map +1 -0
- package/dist/vue/native-view.d.ts +6 -0
- package/dist/vue/native-view.d.ts.map +1 -0
- package/dist/vue/native-view.js +5 -0
- package/dist/vue/native-view.js.map +1 -0
- package/dist/vue/navigation.d.ts +4 -0
- package/dist/vue/navigation.d.ts.map +1 -0
- package/dist/vue/navigation.js +16 -0
- package/dist/vue/navigation.js.map +1 -0
- package/dist/vue/props.d.ts +12 -11
- package/dist/vue/props.d.ts.map +1 -1
- package/dist/vue/props.js +25 -10
- package/dist/vue/props.js.map +1 -1
- package/dist/vue/router-navigation.d.ts +25 -0
- package/dist/vue/router-navigation.d.ts.map +1 -0
- package/dist/vue/router-navigation.js +15 -0
- package/dist/vue/router-navigation.js.map +1 -0
- package/dist/vue/services.d.ts +16 -0
- package/dist/vue/services.d.ts.map +1 -0
- package/dist/vue/services.js +23 -0
- package/dist/vue/services.js.map +1 -0
- package/dist/vue/system-back.d.ts +11 -0
- package/dist/vue/system-back.d.ts.map +1 -0
- package/dist/vue/system-back.js +2 -0
- package/dist/vue/system-back.js.map +1 -0
- package/dist/vue/use-choice-paint.d.ts +9 -0
- package/dist/vue/use-choice-paint.d.ts.map +1 -0
- package/dist/vue/use-choice-paint.js +32 -0
- package/dist/vue/use-choice-paint.js.map +1 -0
- package/dist/vue/use-motion-region.d.ts +7 -0
- package/dist/vue/use-motion-region.d.ts.map +1 -0
- package/dist/vue/use-motion-region.js +28 -0
- package/dist/vue/use-motion-region.js.map +1 -0
- package/dist/vue/use-motion-surface.d.ts +8 -0
- package/dist/vue/use-motion-surface.d.ts.map +1 -0
- package/dist/vue/use-motion-surface.js +105 -0
- package/dist/vue/use-motion-surface.js.map +1 -0
- package/dist/vue/use-press.d.ts +1 -1
- package/dist/vue/use-press.d.ts.map +1 -1
- package/dist/vue/use-press.js +13 -5
- package/dist/vue/use-press.js.map +1 -1
- package/dist/vue/use-scroll-motion.d.ts +7 -0
- package/dist/vue/use-scroll-motion.d.ts.map +1 -0
- package/dist/vue/use-scroll-motion.js +30 -0
- package/dist/vue/use-scroll-motion.js.map +1 -0
- package/fonts/LICENSE +45 -0
- package/fonts/lucide.ttf +0 -0
- package/package.json +20 -4
- package/platforms/android/java/com/mavis/ui/Box.java +65 -0
- package/platforms/android/java/com/mavis/ui/ContentWidth.java +77 -0
- package/platforms/android/java/com/mavis/ui/FlexLayout.java +101 -4
- package/platforms/android/java/com/mavis/ui/MeasureMemo.java +145 -0
- package/platforms/android/java/com/mavis/ui/Screen.java +108 -0
- package/src/app-icons.ts +21 -0
- package/src/date-format.ts +2 -0
- package/src/files.ts +3 -0
- package/src/native/app-icons.android.ts +95 -0
- package/src/native/app-icons.ios.ts +74 -0
- package/src/native/app-icons.ts +12 -0
- package/src/native/appearance.android.ts +75 -0
- package/src/native/appearance.ts +33 -0
- package/src/native/avatar-image.ts +9 -0
- package/src/native/avatar-label.android.ts +14 -0
- package/src/native/avatar-label.ts +1 -0
- package/src/native/box.android.ts +11 -0
- package/src/native/box.ios.ts +61 -0
- package/src/native/box.ts +2 -0
- package/src/native/button.android.ts +38 -0
- package/src/native/button.ios.ts +53 -1
- package/src/native/checkbox.android.ts +35 -0
- package/src/native/checkbox.ts +9 -0
- package/src/native/collection-motion.ts +166 -0
- package/src/native/combobox-editor.android.ts +11 -0
- package/src/native/combobox-editor.ts +6 -0
- package/src/native/composed-button.android.ts +74 -0
- package/src/native/composed-button.ts +9 -0
- package/src/native/date-format.android.ts +72 -0
- package/src/native/date-format.ios.ts +54 -0
- package/src/native/date-format.ts +17 -0
- package/src/native/dialog.android.ts +56 -0
- package/src/native/dialog.ios.ts +23 -0
- package/src/native/dialog.ts +10 -0
- package/src/native/dynamic-type.ts +71 -0
- package/src/native/file-access.ts +71 -0
- package/src/native/file-picker.android.ts +191 -0
- package/src/native/file-picker.ios.ts +230 -0
- package/src/native/file-picker.ts +8 -0
- package/src/native/flex-children.ts +12 -0
- package/src/native/flex-layout.android.ts +12 -1
- package/src/native/flex-layout.ios.ts +148 -1
- package/src/native/image-effects.ts +71 -0
- package/src/native/input-action.ts +15 -0
- package/src/native/keyboard-dismiss.android.ts +17 -0
- package/src/native/keyboard-dismiss.ios.ts +124 -0
- package/src/native/keyboard-dismiss.ts +14 -0
- package/src/native/label.android.ts +27 -0
- package/src/native/label.ios.ts +54 -1
- package/src/native/measure-memo.ts +116 -0
- package/src/native/motion-owner.ts +66 -0
- package/src/native/motion-region.ts +293 -0
- package/src/native/motion-surface.ts +273 -0
- package/src/native/platform-motion.ts +103 -0
- package/src/native/press.ts +58 -10
- package/src/native/progress.ts +78 -0
- package/src/native/screen.android.ts +12 -0
- package/src/native/screen.ts +2 -0
- package/src/native/scroll-motion.ts +106 -0
- package/src/native/section-scroll.ts +81 -0
- package/src/native/segmented.ts +95 -0
- package/src/native/sheet.android.ts +24 -0
- package/src/native/sheet.ios.ts +52 -0
- package/src/native/sheet.ts +26 -0
- package/src/native/surface-effects.ts +33 -0
- package/src/native/tabs.android.ts +58 -0
- package/src/native/tabs.ts +8 -0
- package/src/native/text-field.android.ts +19 -0
- package/src/native/text-field.ios.ts +53 -0
- package/src/native/text-view.ios.ts +10 -0
- package/src/native/toast.android.ts +9 -0
- package/src/native/toast.ios.ts +13 -0
- package/src/native/toast.ts +6 -0
- package/src/native/visual-effects.ts +147 -0
- package/src/vue/components/ChartPlot.ts +114 -0
- package/src/vue/components/ChoiceControl.ts +265 -0
- package/src/vue/components/DateCalendar.ts +121 -0
- package/src/vue/components/LoadingDecoration.ts +38 -0
- package/src/vue/components/MAccordion.ts +123 -0
- package/src/vue/components/MAlert.ts +156 -0
- package/src/vue/components/MAvatar.ts +103 -0
- package/src/vue/components/MBadge.ts +34 -0
- package/src/vue/components/MButton.ts +255 -18
- package/src/vue/components/MCard.ts +44 -5
- package/src/vue/components/MCheckbox.ts +25 -0
- package/src/vue/components/MChip.ts +134 -0
- package/src/vue/components/MCombobox.ts +257 -0
- package/src/vue/components/MDatePicker.ts +25 -0
- package/src/vue/components/MDialog.ts +312 -0
- package/src/vue/components/MEmptyState.ts +96 -0
- package/src/vue/components/MFilePicker.ts +226 -0
- package/src/vue/components/MGrid.ts +86 -0
- package/src/vue/components/MIcon.ts +53 -0
- package/src/vue/components/MImage.ts +181 -0
- package/src/vue/components/MInput.ts +143 -21
- package/src/vue/components/MLink.ts +99 -0
- package/src/vue/components/MListItem.ts +66 -0
- package/src/vue/components/MPopover.ts +254 -0
- package/src/vue/components/MProgress.ts +94 -0
- package/src/vue/components/MRadioGroup.ts +64 -0
- package/src/vue/components/MRangeSlider.ts +125 -0
- package/src/vue/components/MReveal.ts +89 -48
- package/src/vue/components/MScreen.ts +122 -6
- package/src/vue/components/MSegmentedControl.ts +214 -0
- package/src/vue/components/MSelect.ts +185 -0
- package/src/vue/components/MSeparator.ts +40 -0
- package/src/vue/components/MSheet.ts +375 -0
- package/src/vue/components/MSkeleton.ts +102 -0
- package/src/vue/components/MSlider.ts +8 -2
- package/src/vue/components/MStack.ts +83 -0
- package/src/vue/components/MSwitch.ts +200 -0
- package/src/vue/components/MTabs.ts +302 -0
- package/src/vue/components/MText.ts +48 -10
- package/src/vue/components/MTimePicker.ts +57 -0
- package/src/vue/components/MToast.ts +289 -0
- package/src/vue/components/MTooltip.ts +39 -0
- package/src/vue/components/MVirtualList.ts +120 -0
- package/src/vue/components/configurator.ts +27 -0
- package/src/vue/components/discovery.ts +92 -0
- package/src/vue/components/layout.ts +24 -9
- package/src/vue/components/navigation.ts +19 -0
- package/src/vue/components/wayfinding.ts +46 -0
- package/src/vue/components/workflows.ts +38 -0
- package/src/vue/index.ts +217 -22
- package/src/vue/layers.ts +48 -0
- package/src/vue/native-view.ts +6 -0
- package/src/vue/navigation.ts +15 -0
- package/src/vue/props.ts +37 -12
- package/src/vue/router-navigation.ts +39 -0
- package/src/vue/services.ts +39 -0
- package/src/vue/system-back.ts +12 -0
- package/src/vue/use-choice-paint.ts +39 -0
- package/src/vue/use-motion-region.ts +29 -0
- package/src/vue/use-motion-surface.ts +115 -0
- package/src/vue/use-press.ts +13 -5
- package/src/vue/use-scroll-motion.ts +31 -0
- package/dist/native/input-description.android.d.ts +0 -4
- package/dist/native/input-description.android.d.ts.map +0 -1
- package/dist/native/input-description.android.js +0 -18
- package/dist/native/input-description.android.js.map +0 -1
- package/dist/theme/resolve.d.ts +0 -3
- package/dist/theme/resolve.d.ts.map +0 -1
- package/dist/theme/resolve.js +0 -8
- package/dist/theme/resolve.js.map +0 -1
- package/dist/theme/themes.d.ts +0 -6
- package/dist/theme/themes.d.ts.map +0 -1
- package/dist/theme/themes.js +0 -83
- package/dist/theme/themes.js.map +0 -1
- package/dist/theme/types.d.ts +0 -50
- package/dist/theme/types.d.ts.map +0 -1
- package/dist/theme/types.js +0 -2
- package/dist/theme/types.js.map +0 -1
- package/dist/vue/global-components.d.ts +0 -21
- package/dist/vue/global-components.d.ts.map +0 -1
- package/dist/vue/global-components.js +0 -2
- package/dist/vue/global-components.js.map +0 -1
- package/dist/vue/layout-context.d.ts +0 -5
- package/dist/vue/layout-context.d.ts.map +0 -1
- package/dist/vue/layout-context.js +0 -7
- package/dist/vue/layout-context.js.map +0 -1
- package/dist/vue/text-content.d.ts +0 -4
- package/dist/vue/text-content.d.ts.map +0 -1
- package/dist/vue/text-content.js +0 -17
- package/dist/vue/text-content.js.map +0 -1
- package/dist/vue/theme.d.ts +0 -177
- package/dist/vue/theme.d.ts.map +0 -1
- package/dist/vue/theme.js +0 -17
- package/dist/vue/theme.js.map +0 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { defineComponent, h, mergeProps, onBeforeUnmount, watch } from 'nativescript-vue'
|
|
2
|
+
import type { EventData, View } from '@nativescript/core'
|
|
3
|
+
import { progressProps, useMavisTheme } from '@getcortexlabs/mavis-core/vue'
|
|
4
|
+
import {
|
|
5
|
+
progressSizes,
|
|
6
|
+
progressMotion,
|
|
7
|
+
progressState,
|
|
8
|
+
checkProgressLabels,
|
|
9
|
+
} from '@getcortexlabs/mavis-core'
|
|
10
|
+
import { attachProgressMotion } from '../../native/progress'
|
|
11
|
+
import { useNativeViewAttrs } from '../accessibility.js'
|
|
12
|
+
import { MBox } from './layout.js'
|
|
13
|
+
|
|
14
|
+
export const MProgress = defineComponent({
|
|
15
|
+
name: 'MProgress',
|
|
16
|
+
inheritAttrs: false,
|
|
17
|
+
props: progressProps,
|
|
18
|
+
setup(props, { attrs }) {
|
|
19
|
+
const { theme } = useMavisTheme()
|
|
20
|
+
const nativeAttrs = useNativeViewAttrs(props)
|
|
21
|
+
let track: View | undefined
|
|
22
|
+
let fill: View | undefined
|
|
23
|
+
let motion: ReturnType<typeof attachProgressMotion> | undefined
|
|
24
|
+
function connect() {
|
|
25
|
+
if (track && fill && !motion) motion = attachProgressMotion(track, fill, props.indeterminate)
|
|
26
|
+
}
|
|
27
|
+
function release() {
|
|
28
|
+
motion?.dispose()
|
|
29
|
+
motion = undefined
|
|
30
|
+
}
|
|
31
|
+
watch(
|
|
32
|
+
() => props.indeterminate,
|
|
33
|
+
(value) => motion?.update(value),
|
|
34
|
+
{ flush: 'post' },
|
|
35
|
+
)
|
|
36
|
+
onBeforeUnmount(release)
|
|
37
|
+
return () => {
|
|
38
|
+
checkProgressLabels(props.label, props.indeterminateLabel)
|
|
39
|
+
const reading = progressState(props.value, props.max)
|
|
40
|
+
const fraction = props.indeterminate ? progressMotion.segment : reading.ratio
|
|
41
|
+
return h(
|
|
42
|
+
MBox,
|
|
43
|
+
mergeProps(
|
|
44
|
+
{
|
|
45
|
+
width: props.width,
|
|
46
|
+
height: progressSizes[props.size],
|
|
47
|
+
grow: props.grow,
|
|
48
|
+
shrink: props.shrink,
|
|
49
|
+
radius: 'full',
|
|
50
|
+
backgroundColor: theme.value.colors.border,
|
|
51
|
+
},
|
|
52
|
+
attrs,
|
|
53
|
+
nativeAttrs(),
|
|
54
|
+
{
|
|
55
|
+
accessible: true,
|
|
56
|
+
accessibilityRole: 'progressBar',
|
|
57
|
+
accessibilityLabel: props.label,
|
|
58
|
+
accessibilityValue: props.indeterminate ? props.indeterminateLabel : reading.text,
|
|
59
|
+
clipToBounds: true,
|
|
60
|
+
onLoaded: (event: EventData) => {
|
|
61
|
+
track = event.object as View
|
|
62
|
+
connect()
|
|
63
|
+
},
|
|
64
|
+
onUnloaded: () => {
|
|
65
|
+
release()
|
|
66
|
+
track = undefined
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
),
|
|
70
|
+
{
|
|
71
|
+
default: () =>
|
|
72
|
+
h(MBox, {
|
|
73
|
+
width: fraction === 0 ? 0 : `${fraction * 100}%`,
|
|
74
|
+
height: progressSizes[props.size],
|
|
75
|
+
radius: 'full',
|
|
76
|
+
horizontalAlignment: 'left',
|
|
77
|
+
backgroundColor: theme.value.colors[props.tone],
|
|
78
|
+
accessible: false,
|
|
79
|
+
accessibilityHidden: true,
|
|
80
|
+
isUserInteractionEnabled: false,
|
|
81
|
+
onLoaded: (event: EventData) => {
|
|
82
|
+
fill = event.object as View
|
|
83
|
+
connect()
|
|
84
|
+
},
|
|
85
|
+
onUnloaded: () => {
|
|
86
|
+
release()
|
|
87
|
+
fill = undefined
|
|
88
|
+
},
|
|
89
|
+
}),
|
|
90
|
+
},
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
})
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { computed, defineComponent, h, mergeProps } from 'nativescript-vue'
|
|
2
|
+
import { choiceKey, validateChoices, canChoose } from '@getcortexlabs/mavis-core'
|
|
3
|
+
import { useButtonAction, radioGroupProps, radioGroupEmits } from '@getcortexlabs/mavis-core/vue'
|
|
4
|
+
import { MColumn } from './layout.js'
|
|
5
|
+
import { MText } from './MText.js'
|
|
6
|
+
import { ChoiceControl } from './ChoiceControl.js'
|
|
7
|
+
|
|
8
|
+
export const MRadioGroup = defineComponent({
|
|
9
|
+
name: 'MRadioGroup',
|
|
10
|
+
inheritAttrs: false,
|
|
11
|
+
props: radioGroupProps,
|
|
12
|
+
emits: radioGroupEmits,
|
|
13
|
+
setup(props, { attrs, emit }) {
|
|
14
|
+
useButtonAction()
|
|
15
|
+
const options = computed(() => {
|
|
16
|
+
validateChoices(props.options, props.modelValue)
|
|
17
|
+
return props.options
|
|
18
|
+
})
|
|
19
|
+
return () =>
|
|
20
|
+
h(
|
|
21
|
+
MColumn,
|
|
22
|
+
mergeProps(attrs, {
|
|
23
|
+
id: props.id,
|
|
24
|
+
width: props.width,
|
|
25
|
+
grow: props.grow,
|
|
26
|
+
shrink: props.shrink,
|
|
27
|
+
gap: 'sm',
|
|
28
|
+
accessibilityHidden: props.accessibilityHidden,
|
|
29
|
+
}),
|
|
30
|
+
{
|
|
31
|
+
default: () => [
|
|
32
|
+
h(MText, {
|
|
33
|
+
text: props.label,
|
|
34
|
+
style: { fontWeight: '600' },
|
|
35
|
+
accessibilityHidden: props.accessibilityHidden,
|
|
36
|
+
}),
|
|
37
|
+
props.helperText
|
|
38
|
+
? h(MText, {
|
|
39
|
+
text: props.helperText,
|
|
40
|
+
variant: 'caption',
|
|
41
|
+
tone: 'muted',
|
|
42
|
+
accessibilityHidden: props.accessibilityHidden,
|
|
43
|
+
})
|
|
44
|
+
: null,
|
|
45
|
+
...options.value.map((option) =>
|
|
46
|
+
h(ChoiceControl, {
|
|
47
|
+
key: choiceKey(option.value),
|
|
48
|
+
radio: true,
|
|
49
|
+
modelValue: props.modelValue === option.value,
|
|
50
|
+
label: option.label,
|
|
51
|
+
helperText: option.helperText,
|
|
52
|
+
disabled: props.disabled || option.disabled,
|
|
53
|
+
accessibilityHidden: props.accessibilityHidden,
|
|
54
|
+
onActivate() {
|
|
55
|
+
if (canChoose(option, props.modelValue, props.disabled))
|
|
56
|
+
emit('update:modelValue', option.value)
|
|
57
|
+
},
|
|
58
|
+
}),
|
|
59
|
+
),
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
)
|
|
63
|
+
},
|
|
64
|
+
})
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { computed, defineComponent, h, markRaw, mergeProps, ref } from 'nativescript-vue'
|
|
2
|
+
import type { EventData, PanGestureEventData, View } from '@nativescript/core'
|
|
3
|
+
import { moveRange, rangeValue, type RangeValue } from '@getcortexlabs/mavis-core'
|
|
4
|
+
import { createMotionSurface } from '@getcortexlabs/mavis-core/experimental'
|
|
5
|
+
import { rangeSliderProps, useMavisTheme } from '@getcortexlabs/mavis-core/vue'
|
|
6
|
+
import { MColumn, MRow, MBox } from './layout.js'
|
|
7
|
+
import { MText } from './MText.js'
|
|
8
|
+
import { MNumberInput } from './configurator.js'
|
|
9
|
+
|
|
10
|
+
/** Large touch handles plus labelled native editors for precise and assistive input. */
|
|
11
|
+
export const MRangeSlider = defineComponent({
|
|
12
|
+
name: 'MRangeSlider',
|
|
13
|
+
inheritAttrs: false,
|
|
14
|
+
props: rangeSliderProps,
|
|
15
|
+
emits: { 'update:modelValue': (_value: RangeValue) => true },
|
|
16
|
+
setup(props, { attrs, emit }) {
|
|
17
|
+
const { theme } = useMavisTheme()
|
|
18
|
+
const width = ref(0)
|
|
19
|
+
const surfaces = [markRaw(createMotionSurface()), markRaw(createMotionSurface())]
|
|
20
|
+
const pair = computed(() => rangeValue(props.modelValue, props.min, props.max, props.step))
|
|
21
|
+
const origins = [0, 0]
|
|
22
|
+
const format = (value: number) => props.formatValue?.(value) ?? String(value)
|
|
23
|
+
function update(thumb: 0 | 1, value: number | null) {
|
|
24
|
+
if (value === null || props.disabled || props.readonly) return
|
|
25
|
+
const next = moveRange(pair.value, thumb, value, props.min, props.max, props.step)
|
|
26
|
+
if (next[thumb] !== pair.value[thumb]) emit('update:modelValue', next)
|
|
27
|
+
}
|
|
28
|
+
return () => {
|
|
29
|
+
const travel = Math.max(0, width.value - 48)
|
|
30
|
+
const position = (value: number) => ((value - props.min) / (props.max - props.min)) * travel
|
|
31
|
+
return h(MColumn, mergeProps({ id: props.id, gap: 'sm' }, attrs), () => [
|
|
32
|
+
h(MRow, { justify: 'between', gap: 'md', wrap: true }, () => [
|
|
33
|
+
h(MText, { text: props.label, weight: '600' }),
|
|
34
|
+
h(MText, { text: `${format(pair.value[0])} – ${format(pair.value[1])}`, tone: 'muted' }),
|
|
35
|
+
]),
|
|
36
|
+
h(
|
|
37
|
+
'AbsoluteLayout',
|
|
38
|
+
{
|
|
39
|
+
height: 56,
|
|
40
|
+
onLayoutChanged: (event: EventData) => {
|
|
41
|
+
width.value = (event.object as View).getActualSize().width
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
[
|
|
45
|
+
h('StackLayout', {
|
|
46
|
+
left: 24,
|
|
47
|
+
top: 25,
|
|
48
|
+
width: travel,
|
|
49
|
+
height: 6,
|
|
50
|
+
borderRadius: 3,
|
|
51
|
+
backgroundColor: theme.value.colors.border,
|
|
52
|
+
accessibilityHidden: true,
|
|
53
|
+
}),
|
|
54
|
+
h('StackLayout', {
|
|
55
|
+
left: 24 + position(pair.value[0]),
|
|
56
|
+
top: 25,
|
|
57
|
+
width: position(pair.value[1]) - position(pair.value[0]),
|
|
58
|
+
height: 6,
|
|
59
|
+
borderRadius: 3,
|
|
60
|
+
backgroundColor: theme.value.colors.primary,
|
|
61
|
+
accessibilityHidden: true,
|
|
62
|
+
}),
|
|
63
|
+
...([0, 1] as const).map((thumb) =>
|
|
64
|
+
h(
|
|
65
|
+
MBox,
|
|
66
|
+
{
|
|
67
|
+
key: thumb,
|
|
68
|
+
left: position(pair.value[thumb]),
|
|
69
|
+
top: 4,
|
|
70
|
+
width: 48,
|
|
71
|
+
height: 48,
|
|
72
|
+
accessibilityHidden: true,
|
|
73
|
+
onPan: (event: PanGestureEventData) => {
|
|
74
|
+
if (props.disabled || props.readonly || !travel) return
|
|
75
|
+
const motion = surfaces[thumb]!
|
|
76
|
+
if (event.state === 1) {
|
|
77
|
+
origins[thumb] = pair.value[thumb]
|
|
78
|
+
if (motion.available) motion.animate({ scale: 1.15 }, { duration: 120 })
|
|
79
|
+
}
|
|
80
|
+
if (event.state === 2)
|
|
81
|
+
update(
|
|
82
|
+
thumb,
|
|
83
|
+
origins[thumb]! + (event.deltaX / travel) * (props.max - props.min),
|
|
84
|
+
)
|
|
85
|
+
if (event.state === 3 || event.state === 4) {
|
|
86
|
+
if (motion.available)
|
|
87
|
+
motion.animate(
|
|
88
|
+
{ scale: 1 },
|
|
89
|
+
{ type: 'spring', duration: 180, bounce: 0.15 },
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
() =>
|
|
95
|
+
h(MBox, {
|
|
96
|
+
motionSurface: surfaces[thumb],
|
|
97
|
+
width: 26,
|
|
98
|
+
height: 26,
|
|
99
|
+
radius: 'full',
|
|
100
|
+
backgroundColor: theme.value.colors.primary,
|
|
101
|
+
horizontalAlignment: 'center',
|
|
102
|
+
verticalAlignment: 'middle',
|
|
103
|
+
}),
|
|
104
|
+
),
|
|
105
|
+
),
|
|
106
|
+
],
|
|
107
|
+
),
|
|
108
|
+
h(MColumn, { gap: 'md' }, () =>
|
|
109
|
+
([0, 1] as const).map((thumb) =>
|
|
110
|
+
h(MNumberInput, {
|
|
111
|
+
label: thumb === 0 ? props.lowerLabel : props.upperLabel,
|
|
112
|
+
modelValue: pair.value[thumb],
|
|
113
|
+
min: thumb === 0 ? props.min : pair.value[0],
|
|
114
|
+
max: thumb === 0 ? pair.value[1] : props.max,
|
|
115
|
+
step: props.step,
|
|
116
|
+
disabled: props.disabled,
|
|
117
|
+
readonly: props.readonly,
|
|
118
|
+
'onUpdate:modelValue': (value: number | null) => update(thumb, value),
|
|
119
|
+
}),
|
|
120
|
+
),
|
|
121
|
+
),
|
|
122
|
+
])
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
})
|
|
@@ -1,62 +1,103 @@
|
|
|
1
1
|
import { defineComponent, h, mergeProps } from 'nativescript-vue'
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { animate, animateSize } from '@rafaelaugusto/jolt'
|
|
3
|
+
import { motionRecipe } from '@getcortexlabs/mavis-core'
|
|
4
|
+
import { revealProps, useMavisTheme, useRevealState } from '@getcortexlabs/mavis-core/vue'
|
|
5
|
+
import { MColumn, MBox } from './layout.js'
|
|
6
|
+
import { isAndroid, type EventData, type View } from '@nativescript/core'
|
|
6
7
|
import { focusedView } from '../accessibility.js'
|
|
7
|
-
import { notifyAccessibilityLayout } from '../../native/accessibility-layout
|
|
8
|
+
import { notifyAccessibilityLayout } from '../../native/accessibility-layout'
|
|
8
9
|
|
|
9
10
|
export const MReveal = defineComponent({
|
|
10
11
|
name: 'MReveal',
|
|
11
12
|
inheritAttrs: false,
|
|
12
13
|
props: revealProps,
|
|
13
14
|
setup(props, { attrs, slots }) {
|
|
15
|
+
const { theme } = useMavisTheme()
|
|
16
|
+
const state = useRevealState(() => props.show)
|
|
14
17
|
let trigger: WeakRef<View> | undefined
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
trigger = undefined
|
|
52
|
-
restore = false
|
|
53
|
-
},
|
|
18
|
+
function activeView(root: View): View | undefined {
|
|
19
|
+
if (
|
|
20
|
+
isAndroid
|
|
21
|
+
? root.android?.hasFocus?.() && !root.android?.getFocusedChild?.()
|
|
22
|
+
: root.ios?.isFirstResponder
|
|
23
|
+
)
|
|
24
|
+
return root
|
|
25
|
+
let found: View | undefined
|
|
26
|
+
root.eachChildView((child) => {
|
|
27
|
+
found = activeView(child)
|
|
28
|
+
return !found
|
|
29
|
+
})
|
|
30
|
+
return found
|
|
31
|
+
}
|
|
32
|
+
function currentFocus(view: View) {
|
|
33
|
+
return view.page && (activeView(view.page) ?? focusedView(view.page))
|
|
34
|
+
}
|
|
35
|
+
function attach(view: View) {
|
|
36
|
+
const focusability = isAndroid ? view.android.getDescendantFocusability() : undefined
|
|
37
|
+
return state.attach({
|
|
38
|
+
animate(open, fromClosed) {
|
|
39
|
+
if (fromClosed) {
|
|
40
|
+
view.height = 0
|
|
41
|
+
view.opacity = 0
|
|
42
|
+
}
|
|
43
|
+
const recipe = motionRecipe(theme.value, open ? 'enter' : 'exit')
|
|
44
|
+
const size = animateSize(view, { height: open ? 'auto' : 0 }, recipe.transition)
|
|
45
|
+
const opacity = animate(view, { opacity: open ? 1 : 0 }, recipe.transition)
|
|
46
|
+
return {
|
|
47
|
+
finished: size.finished,
|
|
48
|
+
stop() {
|
|
49
|
+
size.stop({ restore: true })
|
|
50
|
+
opacity.stop()
|
|
51
|
+
},
|
|
52
|
+
}
|
|
54
53
|
},
|
|
55
|
-
{
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
interactive(enabled) {
|
|
55
|
+
view.accessibilityHidden = !enabled || Boolean(props.accessibilityHidden)
|
|
56
|
+
view.isUserInteractionEnabled = enabled
|
|
57
|
+
if (isAndroid) view.android.setDescendantFocusability(enabled ? focusability : 393216)
|
|
58
58
|
},
|
|
59
|
-
|
|
59
|
+
captureFocus() {
|
|
60
|
+
const active = currentFocus(view)
|
|
61
|
+
let ancestor = active
|
|
62
|
+
while (ancestor && ancestor !== view) ancestor = ancestor.parent as View | undefined
|
|
63
|
+
if (active && !ancestor) trigger = new WeakRef(active)
|
|
64
|
+
},
|
|
65
|
+
restoreFocus() {
|
|
66
|
+
const focused = currentFocus(view)
|
|
67
|
+
let active = focused
|
|
68
|
+
while (active && active !== view) active = active.parent as View | undefined
|
|
69
|
+
const target = trigger?.deref()
|
|
70
|
+
if (active === view && target?.isLoaded) {
|
|
71
|
+
;(focused as View & { dismissSoftInput?(): void })?.dismissSoftInput?.()
|
|
72
|
+
target.focus()
|
|
73
|
+
if (isAndroid) target.android.performAccessibilityAction(64, null)
|
|
74
|
+
else notifyAccessibilityLayout(target)
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
release() {
|
|
78
|
+
view.height = 'auto'
|
|
79
|
+
view.opacity = 1
|
|
80
|
+
if (isAndroid && view.android) view.android.setDescendantFocusability(focusability)
|
|
81
|
+
},
|
|
82
|
+
})
|
|
83
|
+
}
|
|
84
|
+
return () => {
|
|
85
|
+
const { show, grow, shrink, width, id, ...content } = props
|
|
86
|
+
return state.present.value
|
|
87
|
+
? h(MBox, mergeProps({ grow, shrink, width, id }, attrs), {
|
|
88
|
+
default: () =>
|
|
89
|
+
h(
|
|
90
|
+
MBox,
|
|
91
|
+
{
|
|
92
|
+
clipToBounds: true,
|
|
93
|
+
accessibilityHidden: !show || props.accessibilityHidden,
|
|
94
|
+
onLoaded: (event: EventData) => attach(event.object as View),
|
|
95
|
+
onUnloaded: state.detach,
|
|
96
|
+
},
|
|
97
|
+
{ default: () => h(MColumn, content, slots) },
|
|
98
|
+
),
|
|
99
|
+
})
|
|
100
|
+
: null
|
|
60
101
|
}
|
|
61
102
|
},
|
|
62
103
|
})
|
|
@@ -1,25 +1,102 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useScrollMotion } from '../use-scroll-motion.js'
|
|
2
|
+
import { useAppToastHost } from '@getcortexlabs/mavis-core/vue'
|
|
3
|
+
import { MToast } from './MToast.js'
|
|
4
|
+
import {
|
|
5
|
+
defineComponent,
|
|
6
|
+
cloneVNode,
|
|
7
|
+
Fragment,
|
|
8
|
+
h,
|
|
9
|
+
mergeProps,
|
|
10
|
+
onBeforeUnmount,
|
|
11
|
+
provide,
|
|
12
|
+
registerElement,
|
|
13
|
+
watch,
|
|
14
|
+
type VNode,
|
|
15
|
+
} from 'nativescript-vue'
|
|
16
|
+
import { isIOS, type EventData, type View } from '@nativescript/core'
|
|
2
17
|
import { screenProps, useMavisTheme, layoutDirection } from '@getcortexlabs/mavis-core/vue'
|
|
3
18
|
import { MColumn } from './layout.js'
|
|
4
|
-
import { MavisScreenScroll } from '../../native/screen-scroll
|
|
19
|
+
import { MavisScreenScroll } from '../../native/screen-scroll'
|
|
20
|
+
import { MavisScreen } from '../../native/screen'
|
|
21
|
+
import { dismissKeyboardOn } from '../../native/keyboard-dismiss'
|
|
5
22
|
import { useNativeViewAttrs } from '../accessibility.js'
|
|
23
|
+
import { provideLayerHost } from '../layers.js'
|
|
24
|
+
import { expandLayerHost } from '../../native/sheet'
|
|
25
|
+
import { useMotionRegion } from '../use-motion-region.js'
|
|
6
26
|
|
|
7
27
|
registerElement('MavisScreenScroll', () => MavisScreenScroll, {
|
|
8
28
|
// NSVViewFlags.CONTENT_VIEW; ScrollView owns one content view.
|
|
9
29
|
viewFlags: 2,
|
|
10
30
|
})
|
|
31
|
+
// NSVViewFlags.LAYOUT_VIEW; the page container also puts the keyboard away.
|
|
32
|
+
registerElement('MavisScreen', () => MavisScreen, { viewFlags: 4 })
|
|
33
|
+
|
|
34
|
+
// Overlay children must remain siblings of the ScrollView for retained headers.
|
|
35
|
+
function placeOverlay(node: VNode, covered: boolean): VNode {
|
|
36
|
+
if (node.type !== Fragment)
|
|
37
|
+
return cloneVNode(node, {
|
|
38
|
+
iosOverflowSafeArea: false,
|
|
39
|
+
...(covered ? { accessibilityHidden: true } : {}),
|
|
40
|
+
})
|
|
41
|
+
const copy = cloneVNode(node)
|
|
42
|
+
if (Array.isArray(copy.children))
|
|
43
|
+
copy.children = copy.children.map((child) =>
|
|
44
|
+
child && typeof child === 'object' && 'type' in child
|
|
45
|
+
? placeOverlay(child as VNode, covered)
|
|
46
|
+
: child,
|
|
47
|
+
)
|
|
48
|
+
return copy
|
|
49
|
+
}
|
|
11
50
|
|
|
12
51
|
export const MScreen = defineComponent({
|
|
13
52
|
name: 'MScreen',
|
|
14
53
|
inheritAttrs: false,
|
|
15
54
|
props: screenProps,
|
|
16
55
|
setup(props, { attrs, slots }) {
|
|
56
|
+
const region = useMotionRegion(() => props.motionRegion)
|
|
57
|
+
const scrollMotion = useScrollMotion(() => props.motionScroll)
|
|
17
58
|
const { theme } = useMavisTheme()
|
|
59
|
+
const appToast = useAppToastHost()
|
|
18
60
|
const nativeAttrs = useNativeViewAttrs(props)
|
|
61
|
+
const layers = provideLayerHost()
|
|
19
62
|
provide(layoutDirection, 'column')
|
|
63
|
+
let container: View | undefined
|
|
64
|
+
let release: (() => void) | undefined
|
|
65
|
+
const applyKeyboard = () => {
|
|
66
|
+
release?.()
|
|
67
|
+
release = undefined
|
|
68
|
+
if (!container || !props.dismissKeyboard) return
|
|
69
|
+
release = dismissKeyboardOn(container, { tap: true, drag: props.scroll })
|
|
70
|
+
}
|
|
71
|
+
watch(() => [props.dismissKeyboard, props.scroll], applyKeyboard)
|
|
72
|
+
onBeforeUnmount(() => {
|
|
73
|
+
release?.()
|
|
74
|
+
release = undefined
|
|
75
|
+
})
|
|
20
76
|
return () => {
|
|
77
|
+
// A presented layer covers the content, which leaves the accessibility tree meanwhile.
|
|
78
|
+
const presented = layers.filter((layer) => layer.presented.value)
|
|
79
|
+
const modal = presented.filter((layer) => layer.modal !== false)
|
|
80
|
+
const notices = presented.filter((layer) => layer.modal === false)
|
|
81
|
+
const covered = modal.length > 0
|
|
21
82
|
// Page and ScrollView require one content view; the column also accepts multiple slot children.
|
|
22
|
-
const content = h(
|
|
83
|
+
const content = h(
|
|
84
|
+
MColumn,
|
|
85
|
+
{
|
|
86
|
+
accessibilityHidden: props.scroll ? undefined : covered,
|
|
87
|
+
// The retained scroll header reserves its spacer on this private host.
|
|
88
|
+
// Core's unset padding is not a numeric DIP value in every runtime.
|
|
89
|
+
style: { paddingTop: 0 },
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
default: () => [
|
|
93
|
+
slots.default?.(),
|
|
94
|
+
appToast?.requested.value
|
|
95
|
+
? h(MToast, { controller: appToast.controller, closeLabel: appToast.closeLabel })
|
|
96
|
+
: null,
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
)
|
|
23
100
|
return h(
|
|
24
101
|
'Page',
|
|
25
102
|
mergeProps(
|
|
@@ -33,9 +110,48 @@ export const MScreen = defineComponent({
|
|
|
33
110
|
attrs,
|
|
34
111
|
),
|
|
35
112
|
[
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
113
|
+
h(
|
|
114
|
+
'MavisScreen',
|
|
115
|
+
mergeProps(region, {
|
|
116
|
+
...(isIOS ? { clipToBounds: false } : {}),
|
|
117
|
+
onLoaded: (event: EventData) => {
|
|
118
|
+
container = event.object as View
|
|
119
|
+
applyKeyboard()
|
|
120
|
+
},
|
|
121
|
+
onUnloaded: () => {
|
|
122
|
+
release?.()
|
|
123
|
+
release = undefined
|
|
124
|
+
container = undefined
|
|
125
|
+
},
|
|
126
|
+
}),
|
|
127
|
+
[
|
|
128
|
+
props.scroll
|
|
129
|
+
? h(
|
|
130
|
+
'MavisScreenScroll',
|
|
131
|
+
{ iosOverflowSafeArea: false, accessibilityHidden: covered, ...scrollMotion },
|
|
132
|
+
[content],
|
|
133
|
+
)
|
|
134
|
+
: content,
|
|
135
|
+
slots.overlay?.().map((node) => placeOverlay(node, covered)),
|
|
136
|
+
...notices.map((layer) =>
|
|
137
|
+
h(layer.component, { ...layer.props, covered, key: layer.key }),
|
|
138
|
+
),
|
|
139
|
+
// Layers such as sheets render above the content. Their host ignores Core's safe-area
|
|
140
|
+
// adjustment and grows over the whole window, so the sheet geometry can trust its frame
|
|
141
|
+
// and the scrim covers the status bar and home indicator areas too.
|
|
142
|
+
covered
|
|
143
|
+
? h(
|
|
144
|
+
'GridLayout',
|
|
145
|
+
{
|
|
146
|
+
iosIgnoreSafeArea: true,
|
|
147
|
+
onLoaded: (event: EventData) => expandLayerHost(event.object as View),
|
|
148
|
+
onLayoutChanged: (event: EventData) => expandLayerHost(event.object as View),
|
|
149
|
+
},
|
|
150
|
+
modal.map((layer) => h(layer.component, { ...layer.props, key: layer.key })),
|
|
151
|
+
)
|
|
152
|
+
: null,
|
|
153
|
+
],
|
|
154
|
+
),
|
|
39
155
|
],
|
|
40
156
|
)
|
|
41
157
|
}
|