@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
|
@@ -1,54 +1,276 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { nativeDestination, navigateNative } from '../navigation.js'
|
|
2
|
+
import { MRow } from './layout.js'
|
|
3
|
+
import { MText } from './MText.js'
|
|
4
|
+
import { MIcon } from './MIcon.js'
|
|
5
|
+
import { ActionChildren } from '../accessibility.js'
|
|
6
|
+
import { observeComposedButton } from '../../native/composed-button'
|
|
2
7
|
import {
|
|
8
|
+
defineComponent,
|
|
9
|
+
h,
|
|
10
|
+
mergeProps,
|
|
11
|
+
registerElement,
|
|
12
|
+
onBeforeUnmount,
|
|
13
|
+
ref,
|
|
14
|
+
type VNode,
|
|
15
|
+
type SlotsType,
|
|
16
|
+
} from 'nativescript-vue'
|
|
17
|
+
import {
|
|
18
|
+
useButtonAction,
|
|
3
19
|
buttonProps,
|
|
20
|
+
buttonContent,
|
|
21
|
+
ButtonAdornment,
|
|
4
22
|
useMavisTheme,
|
|
23
|
+
useNavigationOptions,
|
|
5
24
|
actionEmits,
|
|
6
25
|
textContent,
|
|
7
|
-
|
|
26
|
+
useLayoutShrink,
|
|
8
27
|
} from '@getcortexlabs/mavis-core/vue'
|
|
9
|
-
import {
|
|
10
|
-
|
|
28
|
+
import {
|
|
29
|
+
fontFamily,
|
|
30
|
+
resolveRadius,
|
|
31
|
+
shadowStyle,
|
|
32
|
+
nonNegative,
|
|
33
|
+
iconGlyph,
|
|
34
|
+
iconFontFamily,
|
|
35
|
+
iconSizes,
|
|
36
|
+
checkIconOnly,
|
|
37
|
+
} from '@getcortexlabs/mavis-core'
|
|
38
|
+
import { isAndroid, type EventData, type View } from '@nativescript/core'
|
|
39
|
+
import { useMotionSurface } from '../use-motion-surface.js'
|
|
11
40
|
import { usePressFeedback } from '../use-press.js'
|
|
12
|
-
import { MavisButton } from '../../native/button
|
|
41
|
+
import { MavisButton } from '../../native/button'
|
|
13
42
|
import { useNativeViewAttrs } from '../accessibility.js'
|
|
43
|
+
import { LoadingDecoration } from './LoadingDecoration.js'
|
|
44
|
+
import { ReorderHandle } from '@rafaelaugusto/jolt/reorder'
|
|
14
45
|
|
|
15
46
|
registerElement('MavisButton', () => MavisButton)
|
|
47
|
+
registerElement('MavisReorderHandle', () => ReorderHandle)
|
|
16
48
|
|
|
17
49
|
export const MButton = defineComponent({
|
|
18
50
|
name: 'MButton',
|
|
19
51
|
inheritAttrs: false,
|
|
20
52
|
props: buttonProps,
|
|
21
53
|
emits: actionEmits,
|
|
54
|
+
slots: Object as SlotsType<{
|
|
55
|
+
default?: () => VNode[]
|
|
56
|
+
leading?: () => VNode[]
|
|
57
|
+
trailing?: () => VNode[]
|
|
58
|
+
}>,
|
|
22
59
|
setup(props, { attrs, slots, emit }) {
|
|
60
|
+
useButtonAction()
|
|
23
61
|
const { theme } = useMavisTheme()
|
|
62
|
+
const navigation = useNavigationOptions(props)
|
|
24
63
|
const nativeAttrs = useNativeViewAttrs(props)
|
|
25
|
-
const shrink =
|
|
64
|
+
const shrink = useLayoutShrink()
|
|
26
65
|
const enabled = () => !props.disabled && !props.loading
|
|
27
|
-
const
|
|
66
|
+
const keyboardPressed = ref(false)
|
|
67
|
+
const lifecycle = usePressFeedback(enabled, theme, keyboardPressed)
|
|
68
|
+
const { allowsActivation, ...surface } = useMotionSurface(() => props.motionSurface, enabled)
|
|
69
|
+
const focused = ref(false)
|
|
70
|
+
let releaseFocus: (() => void) | undefined
|
|
71
|
+
const clearFocus = () => {
|
|
72
|
+
releaseFocus?.()
|
|
73
|
+
releaseFocus = undefined
|
|
74
|
+
focused.value = false
|
|
75
|
+
}
|
|
76
|
+
onBeforeUnmount(clearFocus)
|
|
77
|
+
const activate = () => {
|
|
78
|
+
if (!enabled() || !allowsActivation()) return
|
|
79
|
+
emit('click')
|
|
80
|
+
if (props.href !== undefined)
|
|
81
|
+
void navigateNative(navigation()).catch((error) => emit('error', error))
|
|
82
|
+
}
|
|
28
83
|
return () => {
|
|
84
|
+
if (
|
|
85
|
+
props.reorderHandle &&
|
|
86
|
+
(slots.leading ||
|
|
87
|
+
slots.trailing ||
|
|
88
|
+
props.icon ||
|
|
89
|
+
props.trailingIcon ||
|
|
90
|
+
props.href ||
|
|
91
|
+
props.loadingIndicator !== 'none')
|
|
92
|
+
)
|
|
93
|
+
throw new TypeError(
|
|
94
|
+
'A reorder handle requires a plain-text MButton without navigation or adornments.',
|
|
95
|
+
)
|
|
96
|
+
if (props.href !== undefined) nativeDestination(navigation())
|
|
29
97
|
const { colors, control, radius } = theme.value
|
|
98
|
+
const tokens = theme.value.components.button
|
|
99
|
+
const family = fontFamily(
|
|
100
|
+
tokens.fontFamily ?? theme.value.typography.body.fontFamily,
|
|
101
|
+
isAndroid ? 'android' : 'ios',
|
|
102
|
+
)
|
|
30
103
|
const size = control[props.size]
|
|
31
104
|
const primary = props.variant === 'primary'
|
|
32
105
|
const text = props.loading
|
|
33
106
|
? props.loadingText
|
|
34
107
|
: (props.text ?? textContent(slots.default?.()))
|
|
108
|
+
const leading = buttonContent(slots.leading?.())
|
|
109
|
+
const trailing = buttonContent(slots.trailing?.())
|
|
110
|
+
const indicator = props.loading && props.loadingIndicator !== 'none' && !isAndroid
|
|
111
|
+
const composed = Boolean(
|
|
112
|
+
slots.leading ||
|
|
113
|
+
slots.trailing ||
|
|
114
|
+
indicator ||
|
|
115
|
+
(isAndroid && (props.icon || props.trailingIcon)),
|
|
116
|
+
)
|
|
117
|
+
const hasIcon = Boolean(composed || props.icon || props.trailingIcon)
|
|
118
|
+
checkIconOnly(text, hasIcon, props.accessibilityLabel)
|
|
119
|
+
const iconSize = iconSizes[props.size]
|
|
120
|
+
const minHeight = Math.max(size.height, isAndroid ? 48 : 44)
|
|
121
|
+
const paddingX = hasIcon && !text ? Math.round((minHeight - iconSize) / 2) : size.padding
|
|
122
|
+
const span = (name: typeof props.icon) =>
|
|
123
|
+
name
|
|
124
|
+
? h('Span', { text: iconGlyph(name), fontFamily: iconFontFamily, fontSize: iconSize })
|
|
125
|
+
: null
|
|
126
|
+
if (composed) {
|
|
127
|
+
const tone = primary ? 'onPrimary' : 'text'
|
|
128
|
+
const adornment = (children: ReturnType<typeof buttonContent>) =>
|
|
129
|
+
h(
|
|
130
|
+
MRow,
|
|
131
|
+
{
|
|
132
|
+
shrink: 0,
|
|
133
|
+
align: 'center',
|
|
134
|
+
accessibilityHidden: true,
|
|
135
|
+
isUserInteractionEnabled: false,
|
|
136
|
+
},
|
|
137
|
+
{ default: () => h(ButtonAdornment, {}, { default: () => children }) },
|
|
138
|
+
)
|
|
139
|
+
return h(
|
|
140
|
+
MRow,
|
|
141
|
+
mergeProps(
|
|
142
|
+
{
|
|
143
|
+
justify: 'center',
|
|
144
|
+
align: 'center',
|
|
145
|
+
wrap: true,
|
|
146
|
+
gap: 8,
|
|
147
|
+
style: {
|
|
148
|
+
minWidth: minHeight,
|
|
149
|
+
minHeight,
|
|
150
|
+
margin: 0,
|
|
151
|
+
paddingLeft: paddingX,
|
|
152
|
+
paddingRight: paddingX,
|
|
153
|
+
paddingTop: tokens.paddingY,
|
|
154
|
+
paddingBottom: tokens.paddingY,
|
|
155
|
+
backgroundColor: primary
|
|
156
|
+
? colors.primary
|
|
157
|
+
: props.variant === 'secondary'
|
|
158
|
+
? colors.elevated
|
|
159
|
+
: 'transparent',
|
|
160
|
+
borderRadius: resolveRadius(theme.value, tokens.radius),
|
|
161
|
+
borderWidth: focused.value ? 2 : 0,
|
|
162
|
+
borderColor: colors.primary,
|
|
163
|
+
boxShadow:
|
|
164
|
+
tokens.elevation === 'none'
|
|
165
|
+
? undefined
|
|
166
|
+
: shadowStyle(theme.value.elevation[tokens.elevation], 'native'),
|
|
167
|
+
opacity: props.disabled ? 0.45 : 1,
|
|
168
|
+
flexGrow: nonNegative(props.grow, 'grow'),
|
|
169
|
+
flexShrink: nonNegative(props.shrink ?? shrink.value, 'shrink'),
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
nativeAttrs(),
|
|
173
|
+
attrs,
|
|
174
|
+
lifecycle,
|
|
175
|
+
surface,
|
|
176
|
+
{
|
|
177
|
+
isEnabled: enabled(),
|
|
178
|
+
accessible: true,
|
|
179
|
+
accessibilityRole: props.href === undefined ? 'button' : 'link',
|
|
180
|
+
accessibilityState: enabled() ? '' : 'disabled',
|
|
181
|
+
accessibilityLabel: props.accessibilityLabel ?? text,
|
|
182
|
+
accessibilityValue: props.accessibilityLabel ? text : undefined,
|
|
183
|
+
onTap: () => {
|
|
184
|
+
activate()
|
|
185
|
+
},
|
|
186
|
+
onLoaded: (event: EventData) => {
|
|
187
|
+
clearFocus()
|
|
188
|
+
releaseFocus = observeComposedButton(
|
|
189
|
+
event.object as View,
|
|
190
|
+
(value) => {
|
|
191
|
+
focused.value = value
|
|
192
|
+
},
|
|
193
|
+
() => {
|
|
194
|
+
activate()
|
|
195
|
+
},
|
|
196
|
+
(value) => {
|
|
197
|
+
keyboardPressed.value = value
|
|
198
|
+
},
|
|
199
|
+
)
|
|
200
|
+
},
|
|
201
|
+
onUnloaded: clearFocus,
|
|
202
|
+
},
|
|
203
|
+
),
|
|
204
|
+
{
|
|
205
|
+
default: () =>
|
|
206
|
+
h(
|
|
207
|
+
ActionChildren,
|
|
208
|
+
{ hidden: true },
|
|
209
|
+
{
|
|
210
|
+
default: () => [
|
|
211
|
+
...(indicator
|
|
212
|
+
? [
|
|
213
|
+
h(LoadingDecoration, {
|
|
214
|
+
kind: props.loadingIndicator as 'dots' | 'bars' | 'ring',
|
|
215
|
+
width: iconSize,
|
|
216
|
+
height: iconSize,
|
|
217
|
+
size: iconSize,
|
|
218
|
+
color: primary ? colors.onPrimary : colors.text,
|
|
219
|
+
radius: 'none',
|
|
220
|
+
}),
|
|
221
|
+
]
|
|
222
|
+
: []),
|
|
223
|
+
slots.leading
|
|
224
|
+
? adornment(leading)
|
|
225
|
+
: props.icon
|
|
226
|
+
? h(MIcon, { name: props.icon, size: props.size, tone })
|
|
227
|
+
: null,
|
|
228
|
+
text
|
|
229
|
+
? h(MText, {
|
|
230
|
+
text,
|
|
231
|
+
shrink: 0,
|
|
232
|
+
tone,
|
|
233
|
+
align: 'center',
|
|
234
|
+
style: {
|
|
235
|
+
fontSize: size.fontSize,
|
|
236
|
+
fontWeight: tokens.fontWeight,
|
|
237
|
+
fontFamily: family,
|
|
238
|
+
lineHeight: size.fontSize * (tokens.lineHeight - 1),
|
|
239
|
+
},
|
|
240
|
+
})
|
|
241
|
+
: null,
|
|
242
|
+
slots.trailing
|
|
243
|
+
? adornment(trailing)
|
|
244
|
+
: props.trailingIcon
|
|
245
|
+
? h(MIcon, { name: props.trailingIcon, size: props.size, tone })
|
|
246
|
+
: null,
|
|
247
|
+
],
|
|
248
|
+
},
|
|
249
|
+
),
|
|
250
|
+
},
|
|
251
|
+
)
|
|
252
|
+
}
|
|
35
253
|
return h(
|
|
36
|
-
'MavisButton',
|
|
254
|
+
props.reorderHandle ? 'MavisReorderHandle' : 'MavisButton',
|
|
37
255
|
mergeProps(
|
|
38
256
|
{
|
|
39
257
|
// Android builds the accessible description from the current text.
|
|
40
258
|
// Apply it before updating the label/value during the same render.
|
|
259
|
+
// Core ignores text while spans render, so the plain text keeps the description short.
|
|
41
260
|
text,
|
|
261
|
+
...(hasIcon ? {} : { formattedText: null }),
|
|
42
262
|
textWrap: true,
|
|
43
263
|
iosAccessibilityAdjustsFontSize: true,
|
|
44
264
|
style: {
|
|
45
|
-
minHeight
|
|
46
|
-
paddingLeft:
|
|
47
|
-
paddingRight:
|
|
48
|
-
paddingTop:
|
|
49
|
-
paddingBottom:
|
|
265
|
+
minHeight,
|
|
266
|
+
paddingLeft: paddingX,
|
|
267
|
+
paddingRight: paddingX,
|
|
268
|
+
paddingTop: tokens.paddingY,
|
|
269
|
+
paddingBottom: tokens.paddingY,
|
|
50
270
|
fontSize: size.fontSize,
|
|
51
|
-
fontWeight:
|
|
271
|
+
fontWeight: tokens.fontWeight,
|
|
272
|
+
fontFamily: family,
|
|
273
|
+
lineHeight: size.fontSize * (tokens.lineHeight - 1),
|
|
52
274
|
textTransform: 'none',
|
|
53
275
|
backgroundColor: primary
|
|
54
276
|
? colors.primary
|
|
@@ -56,33 +278,48 @@ export const MButton = defineComponent({
|
|
|
56
278
|
? colors.elevated
|
|
57
279
|
: 'transparent',
|
|
58
280
|
color: primary ? colors.onPrimary : colors.text,
|
|
59
|
-
borderRadius:
|
|
281
|
+
borderRadius: resolveRadius(theme.value, tokens.radius),
|
|
282
|
+
boxShadow:
|
|
283
|
+
tokens.elevation === 'none'
|
|
284
|
+
? undefined
|
|
285
|
+
: shadowStyle(theme.value.elevation[tokens.elevation], 'native'),
|
|
60
286
|
borderWidth: 0,
|
|
61
287
|
androidElevation: 0,
|
|
62
288
|
androidDynamicElevationOffset: 0,
|
|
63
289
|
margin: 0,
|
|
64
290
|
opacity: props.disabled ? 0.45 : 1,
|
|
65
291
|
flexGrow: nonNegative(props.grow, 'grow'),
|
|
66
|
-
flexShrink: nonNegative(props.shrink ?? shrink, 'shrink'),
|
|
292
|
+
flexShrink: nonNegative(props.shrink ?? shrink.value, 'shrink'),
|
|
67
293
|
minWidth: isAndroid ? 48 : 44,
|
|
68
294
|
},
|
|
69
295
|
},
|
|
70
296
|
nativeAttrs(),
|
|
71
297
|
attrs,
|
|
72
298
|
lifecycle,
|
|
299
|
+
surface,
|
|
73
300
|
{
|
|
74
301
|
isEnabled: enabled(),
|
|
75
302
|
accessible: true,
|
|
76
|
-
accessibilityRole: 'button',
|
|
303
|
+
accessibilityRole: props.href === undefined ? 'button' : 'link',
|
|
77
304
|
accessibilityState: enabled() ? '' : 'disabled',
|
|
78
305
|
accessibilityLabel: props.accessibilityLabel ?? text,
|
|
79
306
|
accessibilityValue:
|
|
80
307
|
attrs.accessibilityValue ?? (props.accessibilityLabel ? text : undefined),
|
|
81
308
|
onTap: () => {
|
|
82
|
-
|
|
309
|
+
activate()
|
|
83
310
|
},
|
|
84
311
|
},
|
|
85
312
|
),
|
|
313
|
+
hasIcon
|
|
314
|
+
? [
|
|
315
|
+
h('FormattedString', {}, [
|
|
316
|
+
span(props.icon),
|
|
317
|
+
text ? h('Span', { text: props.icon ? ` ${text}` : text }) : null,
|
|
318
|
+
props.trailingIcon && text ? h('Span', { text: ' ' }) : null,
|
|
319
|
+
span(props.trailingIcon),
|
|
320
|
+
]),
|
|
321
|
+
]
|
|
322
|
+
: undefined,
|
|
86
323
|
)
|
|
87
324
|
}
|
|
88
325
|
},
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
import { nativeDestination, navigateNative } from '../navigation.js'
|
|
2
|
+
import { resolveSpace, resolveRadius, shadowStyle } from '@getcortexlabs/mavis-core'
|
|
1
3
|
import { ActionChildren } from '../accessibility.js'
|
|
2
4
|
import { defineComponent, h, mergeProps } from 'nativescript-vue'
|
|
3
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
useButtonAction,
|
|
7
|
+
cardProps,
|
|
8
|
+
useMavisTheme,
|
|
9
|
+
useNavigationOptions,
|
|
10
|
+
actionEmits,
|
|
11
|
+
} from '@getcortexlabs/mavis-core/vue'
|
|
4
12
|
import { MColumn } from './layout.js'
|
|
5
13
|
import { usePressFeedback } from '../use-press.js'
|
|
14
|
+
import { useMotionSurface } from '../use-motion-surface.js'
|
|
6
15
|
|
|
7
16
|
export const MCard = defineComponent({
|
|
8
17
|
name: 'MCard',
|
|
@@ -10,17 +19,42 @@ export const MCard = defineComponent({
|
|
|
10
19
|
props: cardProps,
|
|
11
20
|
emits: actionEmits,
|
|
12
21
|
setup(props, { attrs, slots, emit }) {
|
|
22
|
+
useButtonAction(() => props.interactive || props.href !== undefined)
|
|
13
23
|
const { theme } = useMavisTheme()
|
|
14
|
-
const
|
|
24
|
+
const navigation = useNavigationOptions(props)
|
|
25
|
+
const enabled = () => (props.interactive || props.href !== undefined) && !props.disabled
|
|
15
26
|
const lifecycle = usePressFeedback(enabled, theme)
|
|
27
|
+
const { allowsActivation, ...surface } = useMotionSurface(
|
|
28
|
+
() => props.motionSurface,
|
|
29
|
+
() => !props.disabled,
|
|
30
|
+
)
|
|
16
31
|
return () => {
|
|
17
|
-
const {
|
|
32
|
+
const {
|
|
33
|
+
interactive: action,
|
|
34
|
+
disabled,
|
|
35
|
+
elevation,
|
|
36
|
+
motionSurface,
|
|
37
|
+
href,
|
|
38
|
+
navigate,
|
|
39
|
+
target,
|
|
40
|
+
rel,
|
|
41
|
+
...layout
|
|
42
|
+
} = props
|
|
43
|
+
const interactive = action || href !== undefined
|
|
44
|
+
if (href !== undefined) nativeDestination(navigation())
|
|
45
|
+
const tokens = theme.value.components.card
|
|
46
|
+
layout.padding ??= tokens.padding
|
|
47
|
+
layout.radius ??= tokens.radius
|
|
18
48
|
return h(
|
|
19
49
|
MColumn,
|
|
20
50
|
mergeProps(
|
|
21
51
|
layout,
|
|
22
52
|
{
|
|
23
53
|
style: {
|
|
54
|
+
boxShadow:
|
|
55
|
+
(elevation ?? tokens.elevation) === 'none'
|
|
56
|
+
? undefined
|
|
57
|
+
: shadowStyle(theme.value.elevation[elevation ?? tokens.elevation], 'native'),
|
|
24
58
|
backgroundColor: props.backgroundColor ?? theme.value.colors.surface,
|
|
25
59
|
borderColor: theme.value.colors.border,
|
|
26
60
|
borderWidth: 1,
|
|
@@ -29,13 +63,18 @@ export const MCard = defineComponent({
|
|
|
29
63
|
},
|
|
30
64
|
attrs,
|
|
31
65
|
lifecycle,
|
|
66
|
+
surface,
|
|
32
67
|
{
|
|
33
68
|
accessible: interactive,
|
|
34
|
-
accessibilityRole: interactive ? 'button' : '',
|
|
69
|
+
accessibilityRole: href !== undefined ? 'link' : interactive ? 'button' : '',
|
|
35
70
|
accessibilityState: interactive && disabled ? 'disabled' : '',
|
|
36
71
|
onTap: interactive
|
|
37
72
|
? () => {
|
|
38
|
-
if (enabled()
|
|
73
|
+
if (enabled() && allowsActivation()) {
|
|
74
|
+
emit('click')
|
|
75
|
+
if (href !== undefined)
|
|
76
|
+
void navigateNative(navigation()).catch((error) => emit('error', error))
|
|
77
|
+
}
|
|
39
78
|
}
|
|
40
79
|
: undefined,
|
|
41
80
|
},
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineComponent, h } from 'nativescript-vue'
|
|
2
|
+
import { useButtonAction, checkboxProps, checkboxEmits } from '@getcortexlabs/mavis-core/vue'
|
|
3
|
+
import { ChoiceControl } from './ChoiceControl.js'
|
|
4
|
+
|
|
5
|
+
export const MCheckbox = defineComponent({
|
|
6
|
+
name: 'MCheckbox',
|
|
7
|
+
inheritAttrs: false,
|
|
8
|
+
props: checkboxProps,
|
|
9
|
+
emits: checkboxEmits,
|
|
10
|
+
setup(props, { attrs, emit }) {
|
|
11
|
+
useButtonAction()
|
|
12
|
+
return () =>
|
|
13
|
+
h(ChoiceControl, {
|
|
14
|
+
...attrs,
|
|
15
|
+
...props,
|
|
16
|
+
radio: false,
|
|
17
|
+
onActivate() {
|
|
18
|
+
if (props.disabled) return
|
|
19
|
+
const next = props.indeterminate || !props.modelValue
|
|
20
|
+
if (props.indeterminate) emit('update:indeterminate', false)
|
|
21
|
+
emit('update:modelValue', next)
|
|
22
|
+
},
|
|
23
|
+
})
|
|
24
|
+
},
|
|
25
|
+
})
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { defineComponent, h, mergeProps } from 'nativescript-vue'
|
|
2
|
+
import { checkChipLabels, chipColors } from '@getcortexlabs/mavis-core'
|
|
3
|
+
import { useButtonAction, chipProps, chipEmits, useMavisTheme } from '@getcortexlabs/mavis-core/vue'
|
|
4
|
+
import { usePressFeedback } from '../use-press.js'
|
|
5
|
+
import { ActionChildren, useNativeViewAttrs } from '../accessibility.js'
|
|
6
|
+
import { MRow } from './layout.js'
|
|
7
|
+
import { MText } from './MText.js'
|
|
8
|
+
import { MIcon } from './MIcon.js'
|
|
9
|
+
import { MButton } from './MButton.js'
|
|
10
|
+
|
|
11
|
+
export const MChip = defineComponent({
|
|
12
|
+
name: 'MChip',
|
|
13
|
+
inheritAttrs: false,
|
|
14
|
+
props: chipProps,
|
|
15
|
+
emits: chipEmits,
|
|
16
|
+
setup(props, { attrs, emit }) {
|
|
17
|
+
useButtonAction()
|
|
18
|
+
const { theme } = useMavisTheme()
|
|
19
|
+
const nativeAttrs = useNativeViewAttrs(props)
|
|
20
|
+
const lifecycle = usePressFeedback(() => props.selectable && !props.disabled, theme)
|
|
21
|
+
return () => {
|
|
22
|
+
checkChipLabels(props.label, props.removable, props.removeLabel)
|
|
23
|
+
const selected = props.selectable && props.modelValue
|
|
24
|
+
const colors = chipColors(theme.value.colors, props.tone, selected)
|
|
25
|
+
const icon = selected ? 'check' : props.icon
|
|
26
|
+
return h(
|
|
27
|
+
MRow,
|
|
28
|
+
mergeProps(attrs, {
|
|
29
|
+
id: props.id,
|
|
30
|
+
width: props.width,
|
|
31
|
+
grow: props.grow,
|
|
32
|
+
shrink: props.shrink,
|
|
33
|
+
accessibilityHidden: props.accessibilityHidden,
|
|
34
|
+
align: 'stretch',
|
|
35
|
+
radius: 'full',
|
|
36
|
+
style: {
|
|
37
|
+
...colors,
|
|
38
|
+
borderWidth: 1,
|
|
39
|
+
opacity: props.disabled ? 0.45 : 1,
|
|
40
|
+
alignSelf: 'flex-start',
|
|
41
|
+
},
|
|
42
|
+
}),
|
|
43
|
+
{
|
|
44
|
+
default: () => [
|
|
45
|
+
h(
|
|
46
|
+
MRow,
|
|
47
|
+
mergeProps(
|
|
48
|
+
{
|
|
49
|
+
gap: 'xs',
|
|
50
|
+
paddingX: 14,
|
|
51
|
+
paddingY: 15,
|
|
52
|
+
grow: 1,
|
|
53
|
+
shrink: 1,
|
|
54
|
+
radius: 'full',
|
|
55
|
+
accessible: true,
|
|
56
|
+
accessibilityRole: props.selectable ? 'button' : 'text',
|
|
57
|
+
accessibilityLabel: props.label,
|
|
58
|
+
// Core accepts one state token; unavailable takes precedence over selected.
|
|
59
|
+
accessibilityState: props.selectable
|
|
60
|
+
? props.disabled
|
|
61
|
+
? 'disabled'
|
|
62
|
+
: selected
|
|
63
|
+
? 'selected'
|
|
64
|
+
: ''
|
|
65
|
+
: '',
|
|
66
|
+
accessibilityHidden: nativeAttrs().accessibilityHidden,
|
|
67
|
+
isEnabled: !props.disabled,
|
|
68
|
+
style: { minHeight: 46 },
|
|
69
|
+
onTap: props.selectable
|
|
70
|
+
? () => {
|
|
71
|
+
if (!props.disabled) emit('update:modelValue', !props.modelValue)
|
|
72
|
+
}
|
|
73
|
+
: undefined,
|
|
74
|
+
},
|
|
75
|
+
lifecycle,
|
|
76
|
+
),
|
|
77
|
+
{
|
|
78
|
+
default: () =>
|
|
79
|
+
h(
|
|
80
|
+
ActionChildren,
|
|
81
|
+
{ hidden: true },
|
|
82
|
+
{
|
|
83
|
+
default: () => [
|
|
84
|
+
icon || props.selectable
|
|
85
|
+
? h(MIcon, {
|
|
86
|
+
name: icon ?? 'check',
|
|
87
|
+
size: 'sm',
|
|
88
|
+
tone: selected ? props.tone : 'muted',
|
|
89
|
+
style: { opacity: icon ? 1 : 0 },
|
|
90
|
+
})
|
|
91
|
+
: null,
|
|
92
|
+
h(MText, {
|
|
93
|
+
text: props.label,
|
|
94
|
+
variant: 'caption',
|
|
95
|
+
tone: selected ? props.tone : 'text',
|
|
96
|
+
shrink: 1,
|
|
97
|
+
style: { fontWeight: '600' },
|
|
98
|
+
}),
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
),
|
|
102
|
+
},
|
|
103
|
+
),
|
|
104
|
+
props.removable
|
|
105
|
+
? h(MButton, {
|
|
106
|
+
icon: 'x',
|
|
107
|
+
size: 'sm',
|
|
108
|
+
variant: 'ghost',
|
|
109
|
+
disabled: props.disabled,
|
|
110
|
+
accessibilityHidden: props.accessibilityHidden,
|
|
111
|
+
accessibilityLabel: props.removeLabel,
|
|
112
|
+
width: 46,
|
|
113
|
+
shrink: 0,
|
|
114
|
+
style: {
|
|
115
|
+
minHeight: 46,
|
|
116
|
+
borderRadius: 999,
|
|
117
|
+
paddingLeft: 0,
|
|
118
|
+
paddingRight: 0,
|
|
119
|
+
paddingTop: 0,
|
|
120
|
+
paddingBottom: 0,
|
|
121
|
+
color: colors.color,
|
|
122
|
+
opacity: 1,
|
|
123
|
+
},
|
|
124
|
+
onClick: () => {
|
|
125
|
+
if (!props.disabled) emit('remove')
|
|
126
|
+
},
|
|
127
|
+
})
|
|
128
|
+
: null,
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
)
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
})
|