@getcortexlabs/mavis 0.1.0-alpha.1 → 0.1.0-alpha.10
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/ChoiceControl.d.ts +111 -0
- package/dist/vue/components/ChoiceControl.d.ts.map +1 -0
- package/dist/vue/components/ChoiceControl.js +211 -0
- package/dist/vue/components/ChoiceControl.js.map +1 -0
- package/dist/vue/components/DateCalendar.d.ts +94 -0
- package/dist/vue/components/DateCalendar.d.ts.map +1 -0
- package/dist/vue/components/DateCalendar.js +96 -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/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/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/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/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 +50 -9
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/index.js +89 -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/ChoiceControl.ts +258 -0
- package/src/vue/components/DateCalendar.ts +117 -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/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/MVirtualList.ts +120 -0
- package/src/vue/components/configurator.ts +27 -0
- package/src/vue/components/layout.ts +24 -9
- package/src/vue/components/navigation.ts +19 -0
- package/src/vue/components/workflows.ts +38 -0
- package/src/vue/index.ts +183 -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,123 @@
|
|
|
1
|
+
import { defineComponent, h, mergeProps, type SlotsType } from 'nativescript-vue'
|
|
2
|
+
import {
|
|
3
|
+
useButtonAction,
|
|
4
|
+
accordionProps,
|
|
5
|
+
accordionEmits,
|
|
6
|
+
useMavisTheme,
|
|
7
|
+
} from '@getcortexlabs/mavis-core/vue'
|
|
8
|
+
import {
|
|
9
|
+
choiceKey,
|
|
10
|
+
validateAccordion,
|
|
11
|
+
toggleAccordion,
|
|
12
|
+
type AccordionPanelProps,
|
|
13
|
+
} from '@getcortexlabs/mavis-core'
|
|
14
|
+
import { MColumn } from './layout.js'
|
|
15
|
+
import { MListItem } from './MListItem.js'
|
|
16
|
+
import { MIcon } from './MIcon.js'
|
|
17
|
+
import { MReveal } from './MReveal.js'
|
|
18
|
+
import { MSeparator } from './MSeparator.js'
|
|
19
|
+
|
|
20
|
+
export const MAccordion = defineComponent({
|
|
21
|
+
name: 'MAccordion',
|
|
22
|
+
inheritAttrs: false,
|
|
23
|
+
props: accordionProps,
|
|
24
|
+
emits: accordionEmits,
|
|
25
|
+
slots: Object as SlotsType<{ default: AccordionPanelProps }>,
|
|
26
|
+
setup(props, { attrs, emit, slots }) {
|
|
27
|
+
useButtonAction()
|
|
28
|
+
const { theme } = useMavisTheme()
|
|
29
|
+
return () => {
|
|
30
|
+
validateAccordion(
|
|
31
|
+
props.items,
|
|
32
|
+
props.modelValue,
|
|
33
|
+
props.multiple,
|
|
34
|
+
props.label,
|
|
35
|
+
props.expandedLabel,
|
|
36
|
+
props.collapsedLabel,
|
|
37
|
+
)
|
|
38
|
+
const { colors } = theme.value
|
|
39
|
+
return h(
|
|
40
|
+
MColumn,
|
|
41
|
+
mergeProps(attrs, {
|
|
42
|
+
id: props.id,
|
|
43
|
+
width: props.width,
|
|
44
|
+
grow: props.grow,
|
|
45
|
+
shrink: props.shrink,
|
|
46
|
+
accessibilityHidden: props.accessibilityHidden,
|
|
47
|
+
gap: 'sm',
|
|
48
|
+
}),
|
|
49
|
+
{
|
|
50
|
+
default: () =>
|
|
51
|
+
props.items.map((item) => {
|
|
52
|
+
const expanded = props.modelValue.includes(item.value)
|
|
53
|
+
return h(
|
|
54
|
+
MColumn,
|
|
55
|
+
{
|
|
56
|
+
key: choiceKey(item.value),
|
|
57
|
+
radius: 'md',
|
|
58
|
+
backgroundColor: colors.surface,
|
|
59
|
+
style: {
|
|
60
|
+
borderWidth: 1,
|
|
61
|
+
borderColor: expanded ? colors.primarySoft : colors.border,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
default: () => [
|
|
66
|
+
h(
|
|
67
|
+
MListItem,
|
|
68
|
+
{
|
|
69
|
+
title: item.title,
|
|
70
|
+
description: item.description,
|
|
71
|
+
interactive: true,
|
|
72
|
+
disabled: props.disabled || item.disabled,
|
|
73
|
+
accessibilityHidden: props.accessibilityHidden,
|
|
74
|
+
accessibilityHint: props.label,
|
|
75
|
+
accessibilityValue: expanded ? props.expandedLabel : props.collapsedLabel,
|
|
76
|
+
onClick() {
|
|
77
|
+
const next = toggleAccordion(
|
|
78
|
+
item,
|
|
79
|
+
props.modelValue,
|
|
80
|
+
props.multiple,
|
|
81
|
+
props.disabled,
|
|
82
|
+
)
|
|
83
|
+
if (next) emit('update:modelValue', next)
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
...(item.icon
|
|
88
|
+
? {
|
|
89
|
+
leading: () =>
|
|
90
|
+
h(MIcon, {
|
|
91
|
+
name: item.icon!,
|
|
92
|
+
tone: expanded ? 'primary' : 'muted',
|
|
93
|
+
}),
|
|
94
|
+
}
|
|
95
|
+
: {}),
|
|
96
|
+
trailing: () =>
|
|
97
|
+
h(MIcon, {
|
|
98
|
+
name: expanded ? 'chevron-up' : 'chevron-down',
|
|
99
|
+
size: 'sm',
|
|
100
|
+
tone: expanded ? 'primary' : 'muted',
|
|
101
|
+
}),
|
|
102
|
+
},
|
|
103
|
+
),
|
|
104
|
+
h(
|
|
105
|
+
MReveal,
|
|
106
|
+
{
|
|
107
|
+
show: expanded,
|
|
108
|
+
padding: 'md',
|
|
109
|
+
gap: 'md',
|
|
110
|
+
style: { paddingTop: 0 },
|
|
111
|
+
accessibilityHidden: props.accessibilityHidden,
|
|
112
|
+
},
|
|
113
|
+
{ default: () => [h(MSeparator), slots.default?.({ item })] },
|
|
114
|
+
),
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
)
|
|
118
|
+
}),
|
|
119
|
+
},
|
|
120
|
+
)
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
})
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { defineComponent, h, mergeProps, onBeforeUnmount, watch } from 'nativescript-vue'
|
|
2
|
+
import type { EventData, View } from '@nativescript/core'
|
|
3
|
+
import { alertProps, alertEmits, useMavisTheme } from '@getcortexlabs/mavis-core/vue'
|
|
4
|
+
import { alertAppearance, checkAlertLabels } from '@getcortexlabs/mavis-core'
|
|
5
|
+
import { announceToast as announceMessage } from '../../native/toast'
|
|
6
|
+
import { ActionChildren, useNativeViewAttrs } from '../accessibility.js'
|
|
7
|
+
import { MBox, MColumn, MRow } from './layout.js'
|
|
8
|
+
import { MText } from './MText.js'
|
|
9
|
+
import { MIcon } from './MIcon.js'
|
|
10
|
+
import { MButton } from './MButton.js'
|
|
11
|
+
|
|
12
|
+
export const MAlert = defineComponent({
|
|
13
|
+
name: 'MAlert',
|
|
14
|
+
inheritAttrs: false,
|
|
15
|
+
props: alertProps,
|
|
16
|
+
emits: alertEmits,
|
|
17
|
+
setup(props, { attrs, slots, emit }) {
|
|
18
|
+
const { theme } = useMavisTheme()
|
|
19
|
+
const nativeAttrs = useNativeViewAttrs(props)
|
|
20
|
+
let content: View | undefined
|
|
21
|
+
let pending: ReturnType<typeof setTimeout> | undefined
|
|
22
|
+
let announced = ''
|
|
23
|
+
const message = () => [props.title, props.description].filter(Boolean).join('\n')
|
|
24
|
+
function announce() {
|
|
25
|
+
clearTimeout(pending)
|
|
26
|
+
if (!props.announce) {
|
|
27
|
+
announced = ''
|
|
28
|
+
return
|
|
29
|
+
}
|
|
30
|
+
pending = setTimeout(() => {
|
|
31
|
+
pending = undefined
|
|
32
|
+
if (!content?.isLoaded || nativeAttrs().accessibilityHidden) return
|
|
33
|
+
const text = message()
|
|
34
|
+
if (text === announced) return
|
|
35
|
+
announceMessage(content, text)
|
|
36
|
+
announced = text
|
|
37
|
+
}, 0)
|
|
38
|
+
}
|
|
39
|
+
function release() {
|
|
40
|
+
clearTimeout(pending)
|
|
41
|
+
pending = undefined
|
|
42
|
+
content = undefined
|
|
43
|
+
}
|
|
44
|
+
watch(
|
|
45
|
+
() => [props.announce, props.title, props.description, nativeAttrs().accessibilityHidden],
|
|
46
|
+
announce,
|
|
47
|
+
{ flush: 'post' },
|
|
48
|
+
)
|
|
49
|
+
onBeforeUnmount(release)
|
|
50
|
+
return () => {
|
|
51
|
+
checkAlertLabels(props.title, props.dismissible, props.closeLabel)
|
|
52
|
+
const { colors } = theme.value
|
|
53
|
+
const appearance = alertAppearance[props.tone]
|
|
54
|
+
return h(
|
|
55
|
+
MColumn,
|
|
56
|
+
mergeProps(
|
|
57
|
+
{
|
|
58
|
+
width: props.width,
|
|
59
|
+
grow: props.grow,
|
|
60
|
+
shrink: props.shrink,
|
|
61
|
+
padding: 'md',
|
|
62
|
+
gap: 'md',
|
|
63
|
+
radius: 'md',
|
|
64
|
+
backgroundColor: colors.surface,
|
|
65
|
+
style: {
|
|
66
|
+
borderWidth: 1,
|
|
67
|
+
borderColor: colors[appearance.tone],
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
attrs,
|
|
71
|
+
nativeAttrs(),
|
|
72
|
+
{ accessible: false },
|
|
73
|
+
),
|
|
74
|
+
{
|
|
75
|
+
default: () => [
|
|
76
|
+
h(
|
|
77
|
+
MRow,
|
|
78
|
+
{ gap: 'sm', align: 'start' },
|
|
79
|
+
{
|
|
80
|
+
default: () => [
|
|
81
|
+
h(
|
|
82
|
+
MBox,
|
|
83
|
+
{
|
|
84
|
+
width: 32,
|
|
85
|
+
height: 32,
|
|
86
|
+
radius: 'sm',
|
|
87
|
+
shrink: 0,
|
|
88
|
+
backgroundColor: colors.elevated,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
default: () =>
|
|
92
|
+
h(MIcon, {
|
|
93
|
+
name: appearance.icon,
|
|
94
|
+
tone: appearance.tone,
|
|
95
|
+
size: 20,
|
|
96
|
+
horizontalAlignment: 'center',
|
|
97
|
+
verticalAlignment: 'middle',
|
|
98
|
+
}),
|
|
99
|
+
},
|
|
100
|
+
),
|
|
101
|
+
h(
|
|
102
|
+
MColumn,
|
|
103
|
+
{
|
|
104
|
+
width: 0,
|
|
105
|
+
grow: 1,
|
|
106
|
+
gap: 'xs',
|
|
107
|
+
accessible: true,
|
|
108
|
+
accessibilityRole: 'text',
|
|
109
|
+
accessibilityLabel: message(),
|
|
110
|
+
accessibilityHidden: nativeAttrs().accessibilityHidden,
|
|
111
|
+
onLoaded: (event: EventData) => {
|
|
112
|
+
content = event.object as View
|
|
113
|
+
announce()
|
|
114
|
+
},
|
|
115
|
+
onUnloaded: release,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
default: () =>
|
|
119
|
+
h(
|
|
120
|
+
ActionChildren,
|
|
121
|
+
{ hidden: true },
|
|
122
|
+
{
|
|
123
|
+
default: () => [
|
|
124
|
+
h(MText, { text: props.title, style: { fontWeight: '600' } }),
|
|
125
|
+
props.description
|
|
126
|
+
? h(MText, { text: props.description, tone: 'muted' })
|
|
127
|
+
: null,
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
),
|
|
131
|
+
},
|
|
132
|
+
),
|
|
133
|
+
props.dismissible
|
|
134
|
+
? h(MButton, {
|
|
135
|
+
icon: 'x',
|
|
136
|
+
variant: 'ghost',
|
|
137
|
+
size: 'sm',
|
|
138
|
+
accessibilityLabel: props.closeLabel,
|
|
139
|
+
width: 44,
|
|
140
|
+
shrink: 0,
|
|
141
|
+
style: { paddingLeft: 0, paddingRight: 0 },
|
|
142
|
+
onClick: () => emit('close'),
|
|
143
|
+
})
|
|
144
|
+
: null,
|
|
145
|
+
],
|
|
146
|
+
},
|
|
147
|
+
),
|
|
148
|
+
slots.actions
|
|
149
|
+
? h(MRow, { gap: 'sm', wrap: true, align: 'start' }, { default: slots.actions })
|
|
150
|
+
: null,
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
)
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
})
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defineComponent,
|
|
3
|
+
h,
|
|
4
|
+
mergeProps,
|
|
5
|
+
onBeforeUnmount,
|
|
6
|
+
shallowRef,
|
|
7
|
+
watch,
|
|
8
|
+
registerElement,
|
|
9
|
+
} from 'nativescript-vue'
|
|
10
|
+
import { avatarProps, useMavisTheme } from '@getcortexlabs/mavis-core/vue'
|
|
11
|
+
import { avatarSizes, avatarInitials, iconGlyph, iconFontFamily } from '@getcortexlabs/mavis-core'
|
|
12
|
+
import type { ImageSource } from '@nativescript/core'
|
|
13
|
+
import { loadAvatarImage } from '../../native/avatar-image'
|
|
14
|
+
import { useNativeViewAttrs } from '../accessibility.js'
|
|
15
|
+
import { MBox } from './layout.js'
|
|
16
|
+
import { MavisAvatarLabel } from '../../native/avatar-label'
|
|
17
|
+
|
|
18
|
+
registerElement('MavisAvatarLabel', () => MavisAvatarLabel)
|
|
19
|
+
|
|
20
|
+
export const MAvatar = defineComponent({
|
|
21
|
+
name: 'MAvatar',
|
|
22
|
+
inheritAttrs: false,
|
|
23
|
+
props: avatarProps,
|
|
24
|
+
setup(props, { attrs }) {
|
|
25
|
+
const { theme } = useMavisTheme()
|
|
26
|
+
const nativeAttrs = useNativeViewAttrs(props)
|
|
27
|
+
const image = shallowRef<ImageSource | null>(null)
|
|
28
|
+
let request = 0
|
|
29
|
+
watch(
|
|
30
|
+
() => props.src,
|
|
31
|
+
async (value) => {
|
|
32
|
+
const current = ++request
|
|
33
|
+
image.value = null
|
|
34
|
+
if (!value.trim()) return
|
|
35
|
+
try {
|
|
36
|
+
const result = await loadAvatarImage(value.trim())
|
|
37
|
+
if (current === request)
|
|
38
|
+
image.value = result && result.width > 0 && result.height > 0 ? result : null
|
|
39
|
+
} catch {
|
|
40
|
+
// Missing files, network failures and decode errors all keep the fallback.
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{ immediate: true },
|
|
44
|
+
)
|
|
45
|
+
onBeforeUnmount(() => {
|
|
46
|
+
request++
|
|
47
|
+
image.value = null
|
|
48
|
+
})
|
|
49
|
+
return () => {
|
|
50
|
+
const size = avatarSizes[props.size]
|
|
51
|
+
const radius = props.shape === 'circle' ? size / 2 : size / 4
|
|
52
|
+
const initials = avatarInitials(props.name)
|
|
53
|
+
const label = props.accessibilityLabel ?? props.name.trim()
|
|
54
|
+
return h(
|
|
55
|
+
MBox,
|
|
56
|
+
mergeProps(attrs, nativeAttrs(), {
|
|
57
|
+
width: size,
|
|
58
|
+
height: size,
|
|
59
|
+
radius,
|
|
60
|
+
shrink: 0,
|
|
61
|
+
backgroundColor: theme.value.colors.primarySoft,
|
|
62
|
+
accessible: Boolean(label),
|
|
63
|
+
accessibilityRole: 'image',
|
|
64
|
+
accessibilityLabel: label,
|
|
65
|
+
accessibilityHidden: nativeAttrs().accessibilityHidden || !label,
|
|
66
|
+
style: { alignSelf: 'flex-start' },
|
|
67
|
+
}),
|
|
68
|
+
{
|
|
69
|
+
default: () =>
|
|
70
|
+
image.value
|
|
71
|
+
? [
|
|
72
|
+
h('Image', {
|
|
73
|
+
imageSource: image.value,
|
|
74
|
+
stretch: 'aspectFill',
|
|
75
|
+
width: size,
|
|
76
|
+
height: size,
|
|
77
|
+
borderRadius: radius,
|
|
78
|
+
accessible: false,
|
|
79
|
+
accessibilityHidden: true,
|
|
80
|
+
}),
|
|
81
|
+
]
|
|
82
|
+
: [
|
|
83
|
+
h('MavisAvatarLabel', {
|
|
84
|
+
text: initials || iconGlyph('user-round'),
|
|
85
|
+
textWrap: false,
|
|
86
|
+
accessible: false,
|
|
87
|
+
accessibilityHidden: true,
|
|
88
|
+
iosAccessibilityAdjustsFontSize: false,
|
|
89
|
+
style: {
|
|
90
|
+
fontFamily: initials ? undefined : iconFontFamily,
|
|
91
|
+
fontSize: Math.round(size * (initials ? 0.34 : 0.46)),
|
|
92
|
+
fontWeight: '600',
|
|
93
|
+
color: theme.value.colors.primary,
|
|
94
|
+
textAlignment: 'center',
|
|
95
|
+
verticalAlignment: 'middle',
|
|
96
|
+
},
|
|
97
|
+
}),
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
})
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent, h, mergeProps } from 'nativescript-vue'
|
|
2
|
+
import { badgeProps, useMavisTheme } from '@getcortexlabs/mavis-core/vue'
|
|
3
|
+
import { badgeColors } from '@getcortexlabs/mavis-core'
|
|
4
|
+
import { MText } from './MText.js'
|
|
5
|
+
|
|
6
|
+
export const MBadge = defineComponent({
|
|
7
|
+
name: 'MBadge',
|
|
8
|
+
inheritAttrs: false,
|
|
9
|
+
props: badgeProps,
|
|
10
|
+
setup(props, { attrs }) {
|
|
11
|
+
const { theme } = useMavisTheme()
|
|
12
|
+
return () =>
|
|
13
|
+
h(
|
|
14
|
+
MText,
|
|
15
|
+
mergeProps(attrs, {
|
|
16
|
+
id: props.id,
|
|
17
|
+
text: String(props.text),
|
|
18
|
+
variant: 'caption',
|
|
19
|
+
accessibilityLabel: props.accessibilityLabel,
|
|
20
|
+
accessibilityHidden: props.accessibilityHidden,
|
|
21
|
+
style: {
|
|
22
|
+
...badgeColors(theme.value.colors, props.tone),
|
|
23
|
+
alignSelf: 'flex-start',
|
|
24
|
+
fontSize: props.size === 'sm' ? 11 : 13,
|
|
25
|
+
fontWeight: '600',
|
|
26
|
+
padding: props.size === 'sm' ? '3 8' : '5 10',
|
|
27
|
+
borderRadius: 999,
|
|
28
|
+
textAlignment: 'center',
|
|
29
|
+
minWidth: props.size === 'sm' ? 22 : 28,
|
|
30
|
+
},
|
|
31
|
+
}),
|
|
32
|
+
)
|
|
33
|
+
},
|
|
34
|
+
})
|