@onereach/ui-components 4.6.0 → 4.6.1-beta.2760.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundled/v2/{OrDateTimePickerMonthSelect-75089f80.js → OrDateTimePickerMonthSelect-0072ef90.js} +0 -7
- package/dist/bundled/v2/{OrDateTimePickerPopoverHeader-7c87f38a.js → OrDateTimePickerPopoverHeader-aab75fad.js} +0 -2
- package/dist/bundled/v2/{OrDateTimePickerTimeSelect-3d0ef650.js → OrDateTimePickerTimeSelect-7ce94b9a.js} +0 -2
- package/dist/bundled/v2/components/OrBottomSheetV3/OrBottomSheet.js +30 -47
- package/dist/bundled/v2/components/OrBottomSheetV3/OrBottomSheet.vue.d.ts +19 -10
- package/dist/bundled/v2/components/OrBottomSheetV3/index.js +1 -0
- package/dist/bundled/v2/components/OrCardCollectionV3/OrCardCollection.js +2 -1
- package/dist/bundled/v2/components/OrCardCollectionV3/index.js +2 -1
- package/dist/bundled/v2/components/OrConfirmV3/OrConfirm.js +27 -51
- package/dist/bundled/v2/components/OrConfirmV3/OrConfirm.vue.d.ts +18 -36
- package/dist/bundled/v2/components/OrConfirmV3/index.js +1 -0
- package/dist/bundled/v2/components/OrDatePickerV3/OrDatePicker.js +4 -4
- package/dist/bundled/v2/components/OrDatePickerV3/index.js +3 -2
- package/dist/bundled/v2/components/OrDateTimePickerV3/OrDateTimePicker.js +6 -6
- package/dist/bundled/v2/components/OrDateTimePickerV3/index.js +4 -3
- package/dist/bundled/v2/components/OrIconButtonV3/OrIconButton.js +2 -1
- package/dist/bundled/v2/components/OrIconButtonV3/index.js +2 -1
- package/dist/bundled/v2/components/OrInlineInputV3/OrInlineInput.js +2 -1
- package/dist/bundled/v2/components/OrInlineInputV3/index.js +2 -1
- package/dist/bundled/v2/components/OrInlineTextareaV3/OrInlineTextarea.js +2 -1
- package/dist/bundled/v2/components/OrInlineTextareaV3/index.js +2 -1
- package/dist/bundled/v2/components/OrInputV3/OrInput.js +2 -1
- package/dist/bundled/v2/components/OrInputV3/index.js +2 -1
- package/dist/bundled/v2/components/OrMenuV3/OrMenu.js +26 -53
- package/dist/bundled/v2/components/OrMenuV3/OrMenu.vue.d.ts +13 -16
- package/dist/bundled/v2/components/OrMenuV3/index.js +1 -0
- package/dist/bundled/v2/components/OrModalV3/OrModal.js +216 -64
- package/dist/bundled/v2/components/OrModalV3/OrModal.vue.d.ts +13 -19
- package/dist/bundled/v2/components/OrModalV3/index.js +9 -8
- package/dist/bundled/v2/components/OrModalV3/styles.d.ts +0 -3
- package/dist/bundled/v2/components/OrModalV3/styles.js +1 -16
- package/dist/bundled/v2/components/OrNotificationV3/OrNotification.js +2 -1
- package/dist/bundled/v2/components/OrNotificationV3/index.js +2 -1
- package/dist/bundled/v2/components/OrPaginationV3/OrPagination.js +1 -0
- package/dist/bundled/v2/components/OrPaginationV3/index.js +1 -0
- package/dist/bundled/v2/components/OrPopoverV3/OrPopover.js +29 -95
- package/dist/bundled/v2/components/OrPopoverV3/OrPopover.vue.d.ts +17 -12
- package/dist/bundled/v2/components/OrPopoverV3/index.js +1 -0
- package/dist/bundled/v2/components/OrSearchV3/OrSearch.js +1 -0
- package/dist/bundled/v2/components/OrSearchV3/index.js +1 -0
- package/dist/bundled/v2/components/OrSelectV3/OrSelect.js +1 -0
- package/dist/bundled/v2/components/OrSelectV3/index.js +1 -0
- package/dist/bundled/v2/components/OrSidebarV3/OrSidebar.js +1 -0
- package/dist/bundled/v2/components/OrSidebarV3/index.js +1 -0
- package/dist/bundled/v2/components/OrTabsV3/OrTabs.js +1 -0
- package/dist/bundled/v2/components/OrTabsV3/index.js +1 -0
- package/dist/bundled/v2/components/OrTagV3/OrTag.js +2 -1
- package/dist/bundled/v2/components/OrTagV3/index.js +2 -1
- package/dist/bundled/v2/components/OrTagsV3/OrTags.js +1 -0
- package/dist/bundled/v2/components/OrTagsV3/index.js +1 -0
- package/dist/bundled/v2/components/OrTimePickerV3/OrTimePicker.js +4 -4
- package/dist/bundled/v2/components/OrTimePickerV3/index.js +3 -2
- package/dist/bundled/v2/components/OrToastContainerV3/OrToastContainer.js +1 -0
- package/dist/bundled/v2/components/OrToastContainerV3/index.js +1 -0
- package/dist/bundled/v2/components/OrToastV3/OrToast.js +2 -1
- package/dist/bundled/v2/components/OrToastV3/index.js +2 -1
- package/dist/bundled/v2/components/OrTooltipV3/OrTooltip.js +35 -41
- package/dist/bundled/v2/components/OrTooltipV3/OrTooltip.vue.d.ts +20 -17
- package/dist/bundled/v2/components/OrTooltipV3/index.js +2 -1
- package/dist/bundled/v2/components/index.js +4 -3
- package/dist/bundled/v2/hooks/index.d.ts +1 -0
- package/dist/bundled/v2/hooks/index.js +1 -0
- package/dist/bundled/v2/hooks/usePopoverState.d.ts +8 -0
- package/dist/bundled/v2/hooks/usePopoverState.js +37 -0
- package/dist/bundled/v2/index.js +5 -4
- package/dist/bundled/v3/{OrBottomSheet.vue_vue_type_script_lang-a81b2abb.js → OrBottomSheet.vue_vue_type_script_lang-c3a0e7b5.js} +27 -44
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-34390dfe.js → OrCardCollection.vue_vue_type_script_lang-1a19b8ba.js} +3 -3
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-e1390930.js → OrConfirm.vue_vue_type_script_lang-a379bae2.js} +26 -50
- package/dist/bundled/v3/{OrDatePicker.vue_vue_type_script_lang-d071d109.js → OrDatePicker.vue_vue_type_script_lang-ff4f4060.js} +4 -4
- package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-8aa80833.js → OrDateTimePicker.vue_vue_type_script_lang-610e4408.js} +5 -5
- package/dist/bundled/v3/{OrDateTimePickerMonthSelect-387c2096.js → OrDateTimePickerMonthSelect-1cc50ebb.js} +14 -14
- package/dist/bundled/v3/{OrDateTimePickerPopoverHeader-f81b902f.js → OrDateTimePickerPopoverHeader-1e3c0ace.js} +3 -3
- package/dist/bundled/v3/{OrDateTimePickerTimeSelect-8bdb97b7.js → OrDateTimePickerTimeSelect-f43e1818.js} +3 -3
- package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-5bba9f3f.js → OrIconButton.vue_vue_type_script_lang-17f98298.js} +1 -1
- package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-3c6b0958.js → OrInlineInput.vue_vue_type_script_lang-9317d5a9.js} +1 -1
- package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-da59cd8e.js → OrInlineTextarea.vue_vue_type_script_lang-e89beaab.js} +1 -1
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-6242286b.js → OrInput.vue_vue_type_script_lang-655989d4.js} +1 -1
- package/dist/bundled/v3/OrMenu.vue_vue_type_script_lang-a8e1eb6d.js +66 -0
- package/dist/bundled/v3/OrModal.vue_vue_type_script_lang-fe580c66.js +158 -0
- package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-463e1a82.js → OrNotification.vue_vue_type_script_lang-664a7d4d.js} +1 -1
- package/dist/bundled/v3/{OrPagination.vue_vue_type_script_lang-bdc8d9fb.js → OrPagination.vue_vue_type_script_lang-85cdf374.js} +1 -1
- package/dist/bundled/v3/{OrPopover.vue_vue_type_script_lang-7b1b2488.js → OrPopover.vue_vue_type_script_lang-3592b581.js} +21 -90
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-0bcc597c.js → OrSearch.vue_vue_type_script_lang-b402fffd.js} +1 -1
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-819822b5.js → OrSelect.vue_vue_type_script_lang-3ef33dde.js} +3 -3
- package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-f8fc78e3.js → OrSidebar.vue_vue_type_script_lang-9c48413e.js} +1 -1
- package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-9d4221f1.js → OrTabs.vue_vue_type_script_lang-597d9726.js} +1 -1
- package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-09948d1f.js → OrTag.vue_vue_type_script_lang-3a636796.js} +1 -1
- package/dist/bundled/v3/{OrTags.vue_vue_type_script_lang-71fb4f1d.js → OrTags.vue_vue_type_script_lang-325c7158.js} +2 -2
- package/dist/bundled/v3/{OrTimePicker.vue_vue_type_script_lang-c52a2a0b.js → OrTimePicker.vue_vue_type_script_lang-d4387a74.js} +4 -4
- package/dist/bundled/v3/OrTooltip.vue_vue_type_script_lang-de8c7ff1.js +55 -0
- package/dist/bundled/v3/components/OrBottomSheetV3/OrBottomSheet.js +6 -5
- package/dist/bundled/v3/components/OrBottomSheetV3/OrBottomSheet.vue.d.ts +16 -11
- package/dist/bundled/v3/components/OrBottomSheetV3/index.js +2 -1
- package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.js +11 -10
- package/dist/bundled/v3/components/OrCardCollectionV3/index.js +10 -9
- package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.js +10 -9
- package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.vue.d.ts +16 -34
- package/dist/bundled/v3/components/OrConfirmV3/index.js +7 -6
- package/dist/bundled/v3/components/OrDatePickerV3/OrDatePicker.js +13 -12
- package/dist/bundled/v3/components/OrDatePickerV3/index.js +9 -8
- package/dist/bundled/v3/components/OrDateTimePickerV3/OrDateTimePicker.js +15 -14
- package/dist/bundled/v3/components/OrDateTimePickerV3/index.js +10 -9
- package/dist/bundled/v3/components/OrIconButtonV3/OrIconButton.js +7 -6
- package/dist/bundled/v3/components/OrIconButtonV3/index.js +6 -5
- package/dist/bundled/v3/components/OrInlineInputV3/OrInlineInput.js +8 -7
- package/dist/bundled/v3/components/OrInlineInputV3/index.js +7 -6
- package/dist/bundled/v3/components/OrInlineTextareaV3/OrInlineTextarea.js +8 -7
- package/dist/bundled/v3/components/OrInlineTextareaV3/index.js +7 -6
- package/dist/bundled/v3/components/OrInputV3/OrInput.js +8 -7
- package/dist/bundled/v3/components/OrInputV3/index.js +7 -6
- package/dist/bundled/v3/components/OrMenuV3/OrMenu.js +12 -10
- package/dist/bundled/v3/components/OrMenuV3/OrMenu.vue.d.ts +13 -6
- package/dist/bundled/v3/components/OrMenuV3/index.js +4 -3
- package/dist/bundled/v3/components/OrModalV3/OrModal.js +36 -33
- package/dist/bundled/v3/components/OrModalV3/OrModal.vue.d.ts +12 -15
- package/dist/bundled/v3/components/OrModalV3/index.js +15 -14
- package/dist/bundled/v3/components/OrModalV3/styles.d.ts +0 -3
- package/dist/bundled/v3/components/OrModalV3/styles.js +1 -16
- package/dist/bundled/v3/components/OrNotificationV3/OrNotification.js +8 -7
- package/dist/bundled/v3/components/OrNotificationV3/index.js +7 -6
- package/dist/bundled/v3/components/OrPaginationV3/OrPagination.js +6 -5
- package/dist/bundled/v3/components/OrPaginationV3/index.js +5 -4
- package/dist/bundled/v3/components/OrPopoverV3/OrPopover.js +8 -6
- package/dist/bundled/v3/components/OrPopoverV3/OrPopover.vue.d.ts +15 -12
- package/dist/bundled/v3/components/OrPopoverV3/index.js +3 -2
- package/dist/bundled/v3/components/OrSearchV3/OrSearch.js +8 -7
- package/dist/bundled/v3/components/OrSearchV3/index.js +7 -6
- package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +9 -8
- package/dist/bundled/v3/components/OrSelectV3/index.js +8 -7
- package/dist/bundled/v3/components/OrSidebarV3/OrSidebar.js +7 -6
- package/dist/bundled/v3/components/OrSidebarV3/index.js +6 -5
- package/dist/bundled/v3/components/OrTabsV3/OrTabs.js +6 -5
- package/dist/bundled/v3/components/OrTabsV3/index.js +5 -4
- package/dist/bundled/v3/components/OrTagV3/OrTag.js +8 -7
- package/dist/bundled/v3/components/OrTagV3/index.js +7 -6
- package/dist/bundled/v3/components/OrTagsV3/OrTags.js +8 -7
- package/dist/bundled/v3/components/OrTagsV3/index.js +7 -6
- package/dist/bundled/v3/components/OrTimePickerV3/OrTimePicker.js +12 -11
- package/dist/bundled/v3/components/OrTimePickerV3/index.js +8 -7
- package/dist/bundled/v3/components/OrToastContainerV3/OrToastContainer.js +7 -6
- package/dist/bundled/v3/components/OrToastContainerV3/index.js +6 -5
- package/dist/bundled/v3/components/OrToastV3/OrToast.js +6 -5
- package/dist/bundled/v3/components/OrToastV3/index.js +7 -6
- package/dist/bundled/v3/components/OrTooltipV3/OrTooltip.js +13 -9
- package/dist/bundled/v3/components/OrTooltipV3/OrTooltip.vue.d.ts +17 -7
- package/dist/bundled/v3/components/OrTooltipV3/index.js +5 -4
- package/dist/bundled/v3/components/index.js +27 -26
- package/dist/bundled/v3/hooks/index.d.ts +1 -0
- package/dist/bundled/v3/hooks/index.js +1 -0
- package/dist/bundled/v3/hooks/usePopoverState.d.ts +8 -0
- package/dist/bundled/v3/hooks/usePopoverState.js +37 -0
- package/dist/bundled/v3/index.js +28 -27
- package/dist/esm/v2/{OrBottomSheet-ffa029ca.js → OrBottomSheet-d766008a.js} +30 -47
- package/dist/esm/v2/{OrCardCollection-e23d4238.js → OrCardCollection-92ae053a.js} +4 -4
- package/dist/esm/v2/{OrConfirm-8ec55f84.js → OrConfirm-be3a54ef.js} +28 -52
- package/dist/esm/v2/{OrDatePicker-b6ebf44a.js → OrDatePicker-da08968e.js} +5 -6
- package/dist/esm/v2/{OrDateTimePicker-85c08b90.js → OrDateTimePicker-3797a712.js} +7 -8
- package/dist/esm/v2/{OrDateTimePickerMonthSelect-e35404a7.js → OrDateTimePickerMonthSelect-3a7cd5e8.js} +3 -10
- package/dist/esm/v2/{OrDateTimePickerPopoverHeader-9e49aba0.js → OrDateTimePickerPopoverHeader-b6f8193b.js} +0 -2
- package/dist/esm/v2/{OrDateTimePickerTimeSelect-aed7d33d.js → OrDateTimePickerTimeSelect-e1b6fcf6.js} +0 -2
- package/dist/esm/v2/{OrIconButton-ee747c71.js → OrIconButton-4fdb749c.js} +2 -2
- package/dist/esm/v2/{OrInlineInput-a131caf4.js → OrInlineInput-d5c5d651.js} +1 -1
- package/dist/esm/v2/{OrInlineTextarea-7cc45396.js → OrInlineTextarea-bbbb2b82.js} +1 -1
- package/dist/esm/v2/{OrInput-8c7b3cce.js → OrInput-166bf64a.js} +1 -1
- package/dist/esm/v2/{OrMenu-8b902c22.js → OrMenu-9bd9f2fd.js} +28 -54
- package/dist/esm/v2/OrModal-79424061.js +309 -0
- package/dist/esm/v2/{OrNotification-16e6d4ff.js → OrNotification-1cc97f8e.js} +1 -1
- package/dist/esm/v2/{OrPagination-36583054.js → OrPagination-43b3bf99.js} +2 -2
- package/dist/esm/v2/{OrPopover-80459663.js → OrPopover-238620ae.js} +30 -96
- package/dist/esm/v2/{OrSearch-5aa8154f.js → OrSearch-4a2cfe75.js} +1 -1
- package/dist/esm/v2/{OrSelect-31d265b9.js → OrSelect-301d2a6b.js} +3 -3
- package/dist/esm/v2/{OrSidebar-14c20b74.js → OrSidebar-83f6add2.js} +1 -1
- package/dist/esm/v2/{OrSidebarCollapseButton-2efb05f9.js → OrSidebarCollapseButton-357732ba.js} +1 -1
- package/dist/esm/v2/{OrTabs-653258a2.js → OrTabs-419ebf1c.js} +2 -2
- package/dist/esm/v2/{OrTag-6256623c.js → OrTag-a9ca8c34.js} +1 -1
- package/dist/esm/v2/{OrTags-db2608dc.js → OrTags-d2548f30.js} +2 -2
- package/dist/esm/v2/{OrTimePicker-696e29ed.js → OrTimePicker-3fe70b04.js} +5 -6
- package/dist/esm/v2/{OrTooltip-5a6e0f64.js → OrTooltip-e9e967e3.js} +36 -42
- package/dist/esm/v2/components/index.js +28 -27
- package/dist/esm/v2/components/or-bottom-sheet-v3/OrBottomSheet.vue.d.ts +19 -10
- package/dist/esm/v2/components/or-bottom-sheet-v3/index.js +2 -1
- package/dist/esm/v2/components/or-card-collection-v3/index.js +9 -8
- package/dist/esm/v2/components/or-confirm-v3/OrConfirm.vue.d.ts +18 -36
- package/dist/esm/v2/components/or-confirm-v3/index.js +7 -6
- package/dist/esm/v2/components/or-date-picker-v3/index.js +9 -8
- package/dist/esm/v2/components/or-date-time-picker-v3/index.js +10 -9
- package/dist/esm/v2/components/or-icon-button-v3/index.js +5 -4
- package/dist/esm/v2/components/or-inline-input-v3/index.js +6 -5
- package/dist/esm/v2/components/or-inline-textarea-v3/index.js +6 -5
- package/dist/esm/v2/components/or-input-v3/index.js +6 -5
- package/dist/esm/v2/components/or-menu-v3/OrMenu.vue.d.ts +13 -16
- package/dist/esm/v2/components/or-menu-v3/index.js +5 -4
- package/dist/esm/v2/components/or-modal-v3/OrModal.vue.d.ts +13 -19
- package/dist/esm/v2/components/or-modal-v3/index.js +11 -10
- package/dist/esm/v2/components/or-modal-v3/partials/or-modal-content/OrModalContent.vue.d.ts +8 -0
- package/dist/esm/v2/components/or-modal-v3/partials/or-modal-content/styles.d.ts +1 -0
- package/dist/esm/v2/components/or-modal-v3/partials/or-modal-footer/OrModalFooter.vue.d.ts +8 -0
- package/dist/esm/v2/components/or-modal-v3/partials/or-modal-footer/styles.d.ts +1 -0
- package/dist/esm/v2/components/or-modal-v3/partials/or-modal-header/OrModalHeader.vue.d.ts +12 -0
- package/dist/esm/v2/components/or-modal-v3/partials/or-modal-header/styles.d.ts +1 -0
- package/dist/esm/v2/components/or-modal-v3/styles.d.ts +0 -3
- package/dist/esm/v2/components/or-notification-v3/index.js +6 -5
- package/dist/esm/v2/components/or-pagination-v3/index.js +5 -4
- package/dist/esm/v2/components/or-popover-v3/OrPopover.vue.d.ts +17 -12
- package/dist/esm/v2/components/or-popover-v3/index.js +3 -2
- package/dist/esm/v2/components/or-search-v3/index.js +7 -6
- package/dist/esm/v2/components/or-select-v3/index.js +8 -7
- package/dist/esm/v2/components/or-sidebar-v3/index.js +7 -6
- package/dist/esm/v2/components/or-sidebar-v3/partials/index.js +6 -5
- package/dist/esm/v2/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.js +6 -5
- package/dist/esm/v2/components/or-tabs-v3/index.js +5 -4
- package/dist/esm/v2/components/or-tag-v3/index.js +6 -5
- package/dist/esm/v2/components/or-tags-v3/index.js +7 -6
- package/dist/esm/v2/components/or-time-picker-v3/index.js +8 -7
- package/dist/esm/v2/components/or-toast-v3/index.js +6 -5
- package/dist/esm/v2/components/or-toast-v3/or-toast-container-v3/index.js +6 -5
- package/dist/esm/v2/components/or-tooltip-v3/OrTooltip.vue.d.ts +20 -17
- package/dist/esm/v2/components/or-tooltip-v3/index.js +5 -4
- package/dist/esm/v2/hooks/index.d.ts +1 -0
- package/dist/esm/v2/hooks/index.js +1 -0
- package/dist/esm/v2/hooks/usePopoverState.d.ts +8 -0
- package/dist/esm/v2/index.js +28 -27
- package/dist/esm/v2/{types-4a7d24f3.js → types-3d410a76.js} +1 -1
- package/dist/esm/v2/usePopoverState-4cb59ae5.js +37 -0
- package/dist/esm/v3/{OrBottomSheet-5969a217.js → OrBottomSheet-946c14d3.js} +30 -47
- package/dist/esm/v3/{OrCardCollection-d5390215.js → OrCardCollection-7418c761.js} +4 -4
- package/dist/esm/v3/{OrConfirm-fe8617ac.js → OrConfirm-bbc33f51.js} +28 -52
- package/dist/esm/v3/{OrDatePicker-f144d074.js → OrDatePicker-81566ff0.js} +7 -7
- package/dist/esm/v3/{OrDateTimePicker-2214cd85.js → OrDateTimePicker-26155597.js} +9 -9
- package/dist/esm/v3/{OrDateTimePickerMonthSelect-5a7b7b5c.js → OrDateTimePickerMonthSelect-6d328f9c.js} +15 -15
- package/dist/esm/v3/{OrDateTimePickerPopoverHeader-042566f4.js → OrDateTimePickerPopoverHeader-6af64e73.js} +3 -3
- package/dist/esm/v3/{OrDateTimePickerTimeSelect-e404e826.js → OrDateTimePickerTimeSelect-68b76476.js} +3 -3
- package/dist/esm/v3/{OrIconButton-b7217ea5.js → OrIconButton-ce1b5542.js} +2 -2
- package/dist/esm/v3/{OrInlineInput-dcb28ea2.js → OrInlineInput-f6d3ce66.js} +1 -1
- package/dist/esm/v3/{OrInlineTextarea-88eac437.js → OrInlineTextarea-c3158522.js} +1 -1
- package/dist/esm/v3/{OrInput-af5bb98a.js → OrInput-02821bda.js} +1 -1
- package/dist/esm/v3/{OrMenu-8a53ccf9.js → OrMenu-79312946.js} +28 -53
- package/dist/esm/v3/OrModal-76a06af8.js +224 -0
- package/dist/esm/v3/{OrNotification-09216b8b.js → OrNotification-a699caa8.js} +1 -1
- package/dist/esm/v3/{OrPagination-c6046af4.js → OrPagination-5853e79e.js} +2 -2
- package/dist/esm/v3/{OrPopover-15c2968f.js → OrPopover-bec73a66.js} +25 -93
- package/dist/esm/v3/{OrSearch-ecad7638.js → OrSearch-1333d290.js} +1 -1
- package/dist/esm/v3/{OrSelect-5abcb941.js → OrSelect-53acc3c2.js} +3 -3
- package/dist/esm/v3/{OrSidebar-b7766ba9.js → OrSidebar-a0a0b0c4.js} +1 -1
- package/dist/esm/v3/{OrSidebarCollapseButton-06681153.js → OrSidebarCollapseButton-c961c428.js} +1 -1
- package/dist/esm/v3/{OrTabs-a2d87627.js → OrTabs-a0da28b8.js} +2 -2
- package/dist/esm/v3/{OrTag-8605e9e6.js → OrTag-8521661a.js} +1 -1
- package/dist/esm/v3/{OrTags-3724ff59.js → OrTags-b677a73b.js} +2 -2
- package/dist/esm/v3/{OrTimePicker-68de86d9.js → OrTimePicker-6825fc88.js} +7 -7
- package/dist/esm/v3/{OrTooltip-3d5fcaf9.js → OrTooltip-54c18e36.js} +28 -42
- package/dist/esm/v3/components/index.js +28 -27
- package/dist/esm/v3/components/or-bottom-sheet-v3/OrBottomSheet.vue.d.ts +16 -11
- package/dist/esm/v3/components/or-bottom-sheet-v3/index.js +2 -1
- package/dist/esm/v3/components/or-card-collection-v3/index.js +9 -8
- package/dist/esm/v3/components/or-confirm-v3/OrConfirm.vue.d.ts +16 -34
- package/dist/esm/v3/components/or-confirm-v3/index.js +7 -6
- package/dist/esm/v3/components/or-date-picker-v3/index.js +9 -8
- package/dist/esm/v3/components/or-date-time-picker-v3/index.js +10 -9
- package/dist/esm/v3/components/or-icon-button-v3/index.js +5 -4
- package/dist/esm/v3/components/or-inline-input-v3/index.js +6 -5
- package/dist/esm/v3/components/or-inline-textarea-v3/index.js +6 -5
- package/dist/esm/v3/components/or-input-v3/index.js +6 -5
- package/dist/esm/v3/components/or-menu-v3/OrMenu.vue.d.ts +13 -6
- package/dist/esm/v3/components/or-menu-v3/index.js +5 -4
- package/dist/esm/v3/components/or-modal-v3/OrModal.vue.d.ts +12 -15
- package/dist/esm/v3/components/or-modal-v3/index.js +11 -10
- package/dist/esm/v3/components/or-modal-v3/partials/or-modal-content/OrModalContent.vue.d.ts +5 -0
- package/dist/esm/v3/components/or-modal-v3/partials/or-modal-content/styles.d.ts +1 -0
- package/dist/esm/v3/components/or-modal-v3/partials/or-modal-footer/OrModalFooter.vue.d.ts +5 -0
- package/dist/esm/v3/components/or-modal-v3/partials/or-modal-footer/styles.d.ts +1 -0
- package/dist/esm/v3/components/or-modal-v3/partials/or-modal-header/OrModalHeader.vue.d.ts +7 -0
- package/dist/esm/v3/components/or-modal-v3/partials/or-modal-header/styles.d.ts +1 -0
- package/dist/esm/v3/components/or-modal-v3/styles.d.ts +0 -3
- package/dist/esm/v3/components/or-notification-v3/index.js +6 -5
- package/dist/esm/v3/components/or-pagination-v3/index.js +5 -4
- package/dist/esm/v3/components/or-popover-v3/OrPopover.vue.d.ts +15 -12
- package/dist/esm/v3/components/or-popover-v3/index.js +3 -2
- package/dist/esm/v3/components/or-search-v3/index.js +7 -6
- package/dist/esm/v3/components/or-select-v3/index.js +8 -7
- package/dist/esm/v3/components/or-sidebar-v3/index.js +7 -6
- package/dist/esm/v3/components/or-sidebar-v3/partials/index.js +6 -5
- package/dist/esm/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.js +6 -5
- package/dist/esm/v3/components/or-tabs-v3/index.js +5 -4
- package/dist/esm/v3/components/or-tag-v3/index.js +6 -5
- package/dist/esm/v3/components/or-tags-v3/index.js +7 -6
- package/dist/esm/v3/components/or-time-picker-v3/index.js +8 -7
- package/dist/esm/v3/components/or-toast-v3/index.js +6 -5
- package/dist/esm/v3/components/or-toast-v3/or-toast-container-v3/index.js +6 -5
- package/dist/esm/v3/components/or-tooltip-v3/OrTooltip.vue.d.ts +17 -7
- package/dist/esm/v3/components/or-tooltip-v3/index.js +5 -4
- package/dist/esm/v3/hooks/index.d.ts +1 -0
- package/dist/esm/v3/hooks/index.js +1 -0
- package/dist/esm/v3/hooks/usePopoverState.d.ts +8 -0
- package/dist/esm/v3/index.js +28 -27
- package/dist/esm/v3/{types-9e1555eb.js → types-c61726e4.js} +1 -1
- package/dist/esm/v3/usePopoverState-4cb59ae5.js +37 -0
- package/package.json +2 -3
- package/src/components/or-bottom-sheet-v3/OrBottomSheet.vue +27 -60
- package/src/components/or-confirm-v3/OrConfirm.vue +25 -50
- package/src/components/or-date-picker-v3/OrDatePicker.vue +2 -2
- package/src/components/or-date-time-picker-v3/OrDateTimePicker.vue +3 -3
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue +1 -1
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue +6 -6
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-footer/OrDateTimePickerPopoverFooter.vue +2 -2
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue +2 -2
- package/src/components/or-menu-v3/OrMenu.vue +18 -43
- package/src/components/or-modal-v3/OrModal.vue +27 -65
- package/src/components/or-modal-v3/partials/or-modal-content/OrModalContent.vue +37 -0
- package/src/components/or-modal-v3/partials/or-modal-content/styles.ts +7 -0
- package/src/components/or-modal-v3/partials/or-modal-footer/OrModalFooter.vue +37 -0
- package/src/components/or-modal-v3/partials/or-modal-footer/styles.ts +4 -0
- package/src/components/or-modal-v3/partials/or-modal-header/OrModalHeader.vue +54 -0
- package/src/components/or-modal-v3/partials/or-modal-header/styles.ts +10 -0
- package/src/components/or-modal-v3/styles.ts +0 -25
- package/src/components/or-popover-v3/OrPopover.vue +22 -123
- package/src/components/or-time-picker-v3/OrTimePicker.vue +2 -2
- package/src/components/or-tooltip-v3/OrTooltip.vue +23 -41
- package/src/hooks/index.ts +1 -0
- package/src/hooks/usePopoverState.ts +51 -0
- package/dist/bundled/v3/OrMenu.vue_vue_type_script_lang-115f2c60.js +0 -93
- package/dist/bundled/v3/OrModal.vue_vue_type_script_lang-202c4e2f.js +0 -71
- package/dist/bundled/v3/OrTooltip.vue_vue_type_script_lang-bb3db5bf.js +0 -72
- package/dist/esm/v2/OrModal-1f80d87f.js +0 -174
- package/dist/esm/v3/OrModal-1366926a.js +0 -150
- /package/dist/bundled/v3/{OrToastContainer.vue_vue_type_script_lang-485ef171.js → OrToastContainer.vue_vue_type_script_lang-7caa56c5.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<OrOverlay
|
|
3
|
-
v-if="
|
|
4
|
-
fullscreen
|
|
3
|
+
v-if="state === 'open'"
|
|
4
|
+
:fullscreen="true"
|
|
5
5
|
>
|
|
6
6
|
<div
|
|
7
7
|
ref="root"
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
<div :class="['grow', 'overflow-y-auto', 'overflow-x-hidden']">
|
|
19
19
|
<slot />
|
|
20
|
+
|
|
20
21
|
<div
|
|
21
22
|
v-if="confirmationText"
|
|
22
23
|
:class="inputBoxStyles"
|
|
@@ -67,7 +68,8 @@
|
|
|
67
68
|
<script lang="ts">
|
|
68
69
|
import { onClickOutside, useMagicKeys, whenever } from '@vueuse/core';
|
|
69
70
|
import { logicAnd } from '@vueuse/math';
|
|
70
|
-
import { computed, defineComponent,
|
|
71
|
+
import { PropType, computed, defineComponent, ref, toRef, watch } from 'vue-demi';
|
|
72
|
+
import { usePopoverState } from '../../hooks';
|
|
71
73
|
import { ButtonColor, OrButtonV3 as OrButton } from '../or-button-v3';
|
|
72
74
|
import { OrInputV3 as OrInput } from '../or-input-v3';
|
|
73
75
|
import { OrOverlayV3 as OrOverlay } from '../or-overlay-v3';
|
|
@@ -86,6 +88,11 @@ export default defineComponent({
|
|
|
86
88
|
inheritAttrs: false,
|
|
87
89
|
|
|
88
90
|
props: {
|
|
91
|
+
isOpen: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: false,
|
|
94
|
+
},
|
|
95
|
+
|
|
89
96
|
titleText: {
|
|
90
97
|
type: String,
|
|
91
98
|
required: false,
|
|
@@ -94,25 +101,21 @@ export default defineComponent({
|
|
|
94
101
|
|
|
95
102
|
confirmButtonText: {
|
|
96
103
|
type: String,
|
|
97
|
-
required: false,
|
|
98
104
|
default: 'Confirm',
|
|
99
105
|
},
|
|
100
106
|
|
|
101
107
|
cancelButtonText: {
|
|
102
108
|
type: String,
|
|
103
|
-
required: false,
|
|
104
109
|
default: 'Cancel',
|
|
105
110
|
},
|
|
106
111
|
|
|
107
112
|
confirmType: {
|
|
108
113
|
type: String as PropType<ConfirmType>,
|
|
109
|
-
required: false,
|
|
110
114
|
default: ConfirmType.C,
|
|
111
115
|
},
|
|
112
116
|
|
|
113
117
|
loading: {
|
|
114
118
|
type: Boolean,
|
|
115
|
-
required: false,
|
|
116
119
|
default: false,
|
|
117
120
|
},
|
|
118
121
|
|
|
@@ -124,31 +127,21 @@ export default defineComponent({
|
|
|
124
127
|
|
|
125
128
|
confirmationText: {
|
|
126
129
|
type: String,
|
|
127
|
-
|
|
128
|
-
default: null,
|
|
130
|
+
default: undefined,
|
|
129
131
|
},
|
|
130
132
|
|
|
131
133
|
textConfirmationLabel: {
|
|
132
134
|
type: String,
|
|
133
|
-
|
|
134
|
-
default: null,
|
|
135
|
+
default: undefined,
|
|
135
136
|
},
|
|
136
137
|
|
|
137
138
|
textConfirmationPlaceholder: {
|
|
138
139
|
type: String,
|
|
139
|
-
|
|
140
|
-
default: null,
|
|
140
|
+
default: undefined,
|
|
141
141
|
},
|
|
142
142
|
|
|
143
143
|
textConfirmationError: {
|
|
144
144
|
type: String,
|
|
145
|
-
required: false,
|
|
146
|
-
default: null,
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
isOpen: {
|
|
150
|
-
type: Boolean,
|
|
151
|
-
required: false,
|
|
152
145
|
default: undefined,
|
|
153
146
|
},
|
|
154
147
|
},
|
|
@@ -161,12 +154,12 @@ export default defineComponent({
|
|
|
161
154
|
|
|
162
155
|
expose: [
|
|
163
156
|
'root',
|
|
164
|
-
|
|
157
|
+
|
|
165
158
|
'open',
|
|
166
159
|
'close',
|
|
167
160
|
],
|
|
168
161
|
|
|
169
|
-
setup(props,
|
|
162
|
+
setup(props, context) {
|
|
170
163
|
// Refs
|
|
171
164
|
const root = ref<HTMLElement>();
|
|
172
165
|
const confirmationInput = ref<InstanceType<typeof OrInput>>();
|
|
@@ -174,7 +167,7 @@ export default defineComponent({
|
|
|
174
167
|
|
|
175
168
|
// State
|
|
176
169
|
const touched = ref(false);
|
|
177
|
-
const
|
|
170
|
+
const { state, open, close } = usePopoverState(toRef(props, 'isOpen'), context);
|
|
178
171
|
const isInputActive = ref(false);
|
|
179
172
|
const confirmationValue = ref<string>('');
|
|
180
173
|
|
|
@@ -191,23 +184,10 @@ export default defineComponent({
|
|
|
191
184
|
);
|
|
192
185
|
|
|
193
186
|
// Methods
|
|
194
|
-
function open(): void {
|
|
195
|
-
isActive.value = true;
|
|
196
|
-
emit('open');
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
function close(): void {
|
|
200
|
-
// In case if component opened by isOpen - only event can be emited, app will catch it and flip reference
|
|
201
|
-
if (props.isOpen === true) {
|
|
202
|
-
emit('close');
|
|
203
|
-
} else {
|
|
204
|
-
isActive.value = false;
|
|
205
|
-
emit('close');
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
187
|
function confirm(): void {
|
|
210
|
-
if (!props.disabled && !isInvalid.value)
|
|
188
|
+
if (!props.disabled && !isInvalid.value) {
|
|
189
|
+
context.emit('confirm');
|
|
190
|
+
}
|
|
211
191
|
}
|
|
212
192
|
|
|
213
193
|
function onInputFocus(): void {
|
|
@@ -220,20 +200,15 @@ export default defineComponent({
|
|
|
220
200
|
}
|
|
221
201
|
|
|
222
202
|
// Events
|
|
223
|
-
watch(() => props.isOpen, (value) => {
|
|
224
|
-
// In case if component opened by isOpen - no need to emmit events, we need just sync local state
|
|
225
|
-
if (value != undefined) {
|
|
226
|
-
isActive.value = value;
|
|
227
|
-
}
|
|
228
|
-
}, { immediate: true });
|
|
229
|
-
|
|
230
203
|
watch(escape, (val) => {
|
|
231
204
|
if (val) close();
|
|
232
205
|
});
|
|
233
206
|
|
|
234
|
-
watch(
|
|
235
|
-
|
|
236
|
-
|
|
207
|
+
watch(state, (value) => {
|
|
208
|
+
if (value === 'closed') {
|
|
209
|
+
confirmationValue.value = '';
|
|
210
|
+
touched.value = false;
|
|
211
|
+
}
|
|
237
212
|
});
|
|
238
213
|
|
|
239
214
|
// types here are used for fixing TS2349
|
|
@@ -286,7 +261,7 @@ export default defineComponent({
|
|
|
286
261
|
isInvalid,
|
|
287
262
|
isConfirmationButtonDisabled,
|
|
288
263
|
touched,
|
|
289
|
-
|
|
264
|
+
state,
|
|
290
265
|
isInputActive,
|
|
291
266
|
escape,
|
|
292
267
|
rootStyles,
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
:bottom-sheet-props="{ variant: 'basic' }"
|
|
44
44
|
:trigger="inputBoxRoot"
|
|
45
45
|
:placement="'bottom-start'"
|
|
46
|
-
@
|
|
46
|
+
@close="reset()"
|
|
47
47
|
>
|
|
48
48
|
<OrDateTimePickerPopoverHeader>
|
|
49
49
|
<OrDateTimePickerMobileControl label="Date">
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
:icon="'close'"
|
|
79
79
|
:color="'inherit'"
|
|
80
80
|
:disabled="readonly || disabled"
|
|
81
|
-
@click
|
|
81
|
+
@click="$emit('update:modelValue', undefined)"
|
|
82
82
|
/>
|
|
83
83
|
</template>
|
|
84
84
|
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
:bottom-sheet-props="{ variant: 'basic' }"
|
|
53
53
|
:trigger="inputBoxRoot"
|
|
54
54
|
:placement="'bottom-start'"
|
|
55
|
-
@
|
|
55
|
+
@close="reset()"
|
|
56
56
|
>
|
|
57
57
|
<OrDateTimePickerPopoverHeader>
|
|
58
58
|
<OrDateTimePickerMobileControl label="Date">
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
:bottom-sheet-props="{ variant: 'basic' }"
|
|
91
91
|
:trigger="inputBoxRoot"
|
|
92
92
|
:placement="'bottom-start'"
|
|
93
|
-
@
|
|
93
|
+
@close="reset()"
|
|
94
94
|
>
|
|
95
95
|
<OrDateTimePickerPopoverHeader>
|
|
96
96
|
<OrDateTimePickerMobileControl label="Date">
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
:icon="'close'"
|
|
124
124
|
:color="'inherit'"
|
|
125
125
|
:disabled="readonly || disabled"
|
|
126
|
-
@click
|
|
126
|
+
@click="$emit('update:modelValue', undefined)"
|
|
127
127
|
/>
|
|
128
128
|
</template>
|
|
129
129
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
:variant="Number(value) === Number(proxyModelValue) ? 'contained' : 'text'"
|
|
24
24
|
:color="Number(value) === Number(proxyModelValue) ? 'primary' : 'inherit'"
|
|
25
25
|
:disabled="dateFilter && !dateFilter(value)"
|
|
26
|
-
@click
|
|
26
|
+
@click="proxyModelValue = value"
|
|
27
27
|
>
|
|
28
28
|
{{ formatDay(value) }}
|
|
29
29
|
</OrButton>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
>
|
|
6
6
|
<OrIconButton
|
|
7
7
|
:icon="'chevron_left'"
|
|
8
|
-
@click
|
|
8
|
+
@click="goToPreviousMonth()"
|
|
9
9
|
/>
|
|
10
10
|
|
|
11
11
|
<div :class="['layout-row-reverse', 'gap-md']">
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
ref="yearButton"
|
|
14
14
|
:variant="'link'"
|
|
15
15
|
:color="'inherit'"
|
|
16
|
-
@click
|
|
16
|
+
@click="monthMenu.close(); yearMenu.open()"
|
|
17
17
|
>
|
|
18
18
|
{{ formatYear(proxyModelValue) }} <OrIcon :icon="yearMenuState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'" />
|
|
19
19
|
</OrButton>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
ref="monthButton"
|
|
23
23
|
:variant="'link'"
|
|
24
24
|
:color="'inherit'"
|
|
25
|
-
@click
|
|
25
|
+
@click="yearMenu.close(); monthMenu.open()"
|
|
26
26
|
>
|
|
27
27
|
{{ formatMonth(proxyModelValue) }} <OrIcon :icon="monthMenuState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'" />
|
|
28
28
|
</OrButton>
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
:key="Number(value)"
|
|
37
37
|
:selected="Number(value) === Number(proxyModelValue)"
|
|
38
38
|
:disabled="yearFilter && !yearFilter(value)"
|
|
39
|
-
@click
|
|
39
|
+
@click="proxyModelValue = value; yearMenu.close()"
|
|
40
40
|
>
|
|
41
41
|
{{ formatYear(value) }}
|
|
42
42
|
</OrMenuItem>
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
:key="Number(value)"
|
|
52
52
|
:selected="Number(value) === Number(proxyModelValue)"
|
|
53
53
|
:disabled="monthFilter && !monthFilter(value)"
|
|
54
|
-
@click
|
|
54
|
+
@click="proxyModelValue = value; monthMenu.close()"
|
|
55
55
|
>
|
|
56
56
|
{{ formatMonth(value) }}
|
|
57
57
|
</OrMenuItem>
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
|
|
61
61
|
<OrIconButton
|
|
62
62
|
:icon="'chevron_right'"
|
|
63
|
-
@click
|
|
63
|
+
@click="goToNextMonth()"
|
|
64
64
|
/>
|
|
65
65
|
</div>
|
|
66
66
|
</template>
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
>
|
|
6
6
|
<OrButton
|
|
7
7
|
:variant="'outlined'"
|
|
8
|
-
@click
|
|
8
|
+
@click="$emit('apply')"
|
|
9
9
|
>
|
|
10
10
|
Done
|
|
11
11
|
</OrButton>
|
|
12
12
|
|
|
13
13
|
<OrButton
|
|
14
14
|
:variant="'text'"
|
|
15
|
-
@click
|
|
15
|
+
@click="$emit('reset')"
|
|
16
16
|
>
|
|
17
17
|
Cancel
|
|
18
18
|
</OrButton>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
:variant="Number(value) === Number(proxyModelValue) ? 'contained' : 'text'"
|
|
12
12
|
:color="Number(value) === Number(proxyModelValue) ? 'primary' : 'inherit'"
|
|
13
13
|
:disabled="hoursFilter && !hoursFilter(value)"
|
|
14
|
-
@click
|
|
14
|
+
@click="proxyModelValue = value"
|
|
15
15
|
>
|
|
16
16
|
{{ formatHours(value) }}
|
|
17
17
|
</OrButton>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
:variant="Number(value) === Number(proxyModelValue) ? 'contained' : 'text'"
|
|
28
28
|
:color="Number(value) === Number(proxyModelValue) ? 'primary' : 'inherit'"
|
|
29
29
|
:disabled="minutesFilter && !minutesFilter(value)"
|
|
30
|
-
@click
|
|
30
|
+
@click="proxyModelValue = value"
|
|
31
31
|
>
|
|
32
32
|
{{ formatMinutes(value) }}
|
|
33
33
|
</OrButton>
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<OrPopover
|
|
3
|
-
|
|
3
|
+
:is-open="state === 'open'"
|
|
4
4
|
:variant="'auto'"
|
|
5
5
|
:trigger="trigger"
|
|
6
6
|
:placement="placement"
|
|
7
7
|
:full-width="false"
|
|
8
8
|
:disable-default-styles="false"
|
|
9
|
-
@
|
|
9
|
+
@open="open()"
|
|
10
|
+
@close="close()"
|
|
10
11
|
>
|
|
11
12
|
<div
|
|
12
13
|
ref="root"
|
|
13
14
|
v-bind="$attrs"
|
|
14
15
|
:class="rootStyles"
|
|
15
|
-
@click
|
|
16
|
+
@click="onClick"
|
|
16
17
|
>
|
|
17
18
|
<slot />
|
|
18
19
|
</div>
|
|
@@ -20,7 +21,8 @@
|
|
|
20
21
|
</template>
|
|
21
22
|
|
|
22
23
|
<script lang="ts">
|
|
23
|
-
import { computed, defineComponent, PropType, ref } from 'vue-demi';
|
|
24
|
+
import { computed, defineComponent, PropType, ref, toRef } from 'vue-demi';
|
|
25
|
+
import { usePopoverState } from '../../hooks';
|
|
24
26
|
import { OrPopoverV3 as OrPopover } from '../or-popover-v3';
|
|
25
27
|
import { MenuPlacement } from './props';
|
|
26
28
|
import { MenuRoot } from './styles';
|
|
@@ -35,6 +37,11 @@ export default defineComponent({
|
|
|
35
37
|
inheritAttrs: false,
|
|
36
38
|
|
|
37
39
|
props: {
|
|
40
|
+
isOpen: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: false,
|
|
43
|
+
},
|
|
44
|
+
|
|
38
45
|
trigger: {
|
|
39
46
|
type: HTMLElement,
|
|
40
47
|
default: undefined,
|
|
@@ -47,26 +54,22 @@ export default defineComponent({
|
|
|
47
54
|
},
|
|
48
55
|
|
|
49
56
|
emits: [
|
|
50
|
-
'
|
|
57
|
+
'open',
|
|
58
|
+
'close',
|
|
51
59
|
],
|
|
52
60
|
|
|
53
61
|
expose: [
|
|
54
62
|
'root',
|
|
55
|
-
|
|
56
|
-
'isOpen',
|
|
63
|
+
|
|
57
64
|
'open',
|
|
58
65
|
'close',
|
|
59
66
|
'toggle',
|
|
60
67
|
],
|
|
61
68
|
|
|
62
|
-
setup() {
|
|
69
|
+
setup(props, context) {
|
|
63
70
|
// Refs
|
|
64
71
|
const root = ref<HTMLElement>();
|
|
65
72
|
|
|
66
|
-
const popover = ref<InstanceType<typeof OrPopover>>();
|
|
67
|
-
const popoverRoot = computed(() => popover.value?.root);
|
|
68
|
-
const popoverState = computed(() => popover.value?.state);
|
|
69
|
-
|
|
70
73
|
// Styles
|
|
71
74
|
const rootStyles = computed(() => [
|
|
72
75
|
'or-menu-v3',
|
|
@@ -74,49 +77,21 @@ export default defineComponent({
|
|
|
74
77
|
]);
|
|
75
78
|
|
|
76
79
|
// State
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
// Methods
|
|
80
|
-
function open(): void {
|
|
81
|
-
const popoverInstance = popover.value;
|
|
82
|
-
|
|
83
|
-
if (popoverInstance) {
|
|
84
|
-
(popoverInstance.open as () => void)();
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function close(): void {
|
|
89
|
-
const popoverInstance = popover.value;
|
|
90
|
-
|
|
91
|
-
if (popoverInstance) {
|
|
92
|
-
(popoverInstance.close as () => void)();
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function toggle(): void {
|
|
97
|
-
isOpen.value ? close() : open();
|
|
98
|
-
}
|
|
80
|
+
const { state, open, close, toggle } = usePopoverState(toRef(props, 'isOpen'), context);
|
|
99
81
|
|
|
100
82
|
// Handlers
|
|
101
83
|
function onClick(event: Event): void {
|
|
102
84
|
const path = event.composedPath() as HTMLElement[];
|
|
103
85
|
|
|
104
|
-
|
|
105
|
-
.filter(({ classList }) => !!classList)
|
|
106
|
-
.map(({ classList }) => classList);
|
|
107
|
-
|
|
108
|
-
if (classLists.some((classList) => classList.contains('or-menu-item-v3'))) {
|
|
86
|
+
if (path.some(({ classList }) => classList?.contains('or-menu-item-v3'))) {
|
|
109
87
|
close();
|
|
110
88
|
}
|
|
111
89
|
}
|
|
112
90
|
|
|
113
91
|
return {
|
|
114
92
|
root,
|
|
115
|
-
popover,
|
|
116
|
-
popoverRoot,
|
|
117
|
-
state: popoverState,
|
|
118
93
|
rootStyles,
|
|
119
|
-
|
|
94
|
+
state,
|
|
120
95
|
open,
|
|
121
96
|
close,
|
|
122
97
|
toggle,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<OrOverlay
|
|
3
|
-
v-if="
|
|
3
|
+
v-if="state === 'open'"
|
|
4
4
|
:fullscreen="true"
|
|
5
5
|
>
|
|
6
6
|
<div
|
|
@@ -8,54 +8,53 @@
|
|
|
8
8
|
v-bind="$attrs"
|
|
9
9
|
:class="rootStyles"
|
|
10
10
|
>
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
</div>
|
|
11
|
+
<OrModalHeader @close="close()">
|
|
12
|
+
<slot name="header" />
|
|
13
|
+
</OrModalHeader>
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
:icon="'close'"
|
|
18
|
-
:size="'l'"
|
|
19
|
-
@click.stop="close"
|
|
20
|
-
/>
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-
<div :class="contentStyles">
|
|
15
|
+
<OrModalContent>
|
|
24
16
|
<slot />
|
|
25
|
-
</
|
|
26
|
-
|
|
17
|
+
</OrModalContent>
|
|
18
|
+
|
|
19
|
+
<OrModalFooter v-if="$slots.footer">
|
|
27
20
|
<slot name="footer" />
|
|
28
|
-
</
|
|
21
|
+
</OrModalFooter>
|
|
29
22
|
</div>
|
|
30
23
|
</OrOverlay>
|
|
31
24
|
</template>
|
|
32
25
|
|
|
33
26
|
<script lang="ts">
|
|
34
|
-
import { computed, defineComponent, PropType, ref,
|
|
35
|
-
import {
|
|
27
|
+
import { computed, defineComponent, PropType, ref, toRef } from 'vue-demi';
|
|
28
|
+
import { usePopoverState } from '../../hooks';
|
|
36
29
|
import { OrOverlayV3 as OrOverlay } from '../or-overlay-v3';
|
|
30
|
+
import OrModalContent from './partials/or-modal-content/OrModalContent.vue';
|
|
31
|
+
import OrModalFooter from './partials/or-modal-footer/OrModalFooter.vue';
|
|
32
|
+
import OrModalHeader from './partials/or-modal-header/OrModalHeader.vue';
|
|
37
33
|
import { ModalSize } from './props';
|
|
38
|
-
import {
|
|
34
|
+
import { ModalRoot, ModalRootSizes } from './styles';
|
|
39
35
|
|
|
40
36
|
export default defineComponent({
|
|
41
37
|
name: 'OrModal',
|
|
42
38
|
|
|
43
39
|
components: {
|
|
40
|
+
OrModalContent,
|
|
41
|
+
OrModalFooter,
|
|
42
|
+
OrModalHeader,
|
|
44
43
|
OrOverlay,
|
|
45
|
-
OrIconButton,
|
|
46
44
|
},
|
|
47
45
|
|
|
48
46
|
inheritAttrs: false,
|
|
49
47
|
|
|
50
48
|
props: {
|
|
51
|
-
size: {
|
|
52
|
-
type: String as PropType<ModalSize>,
|
|
53
|
-
default: ModalSize.M,
|
|
54
|
-
},
|
|
55
49
|
isOpen: {
|
|
56
|
-
type: Boolean
|
|
50
|
+
type: Boolean,
|
|
57
51
|
default: false,
|
|
58
52
|
},
|
|
53
|
+
|
|
54
|
+
size: {
|
|
55
|
+
type: String as PropType<`${ModalSize}`>,
|
|
56
|
+
default: ModalSize.M,
|
|
57
|
+
},
|
|
59
58
|
},
|
|
60
59
|
|
|
61
60
|
emits: [
|
|
@@ -65,7 +64,7 @@ export default defineComponent({
|
|
|
65
64
|
|
|
66
65
|
expose: [
|
|
67
66
|
'root',
|
|
68
|
-
|
|
67
|
+
|
|
69
68
|
'open',
|
|
70
69
|
'close',
|
|
71
70
|
],
|
|
@@ -81,50 +80,13 @@ export default defineComponent({
|
|
|
81
80
|
...ModalRootSizes[props.size],
|
|
82
81
|
]);
|
|
83
82
|
|
|
84
|
-
const headerStyles = computed(() => [
|
|
85
|
-
...ModalHeader,
|
|
86
|
-
]);
|
|
87
|
-
|
|
88
|
-
const contentStyles = computed(() => [
|
|
89
|
-
...ModalContent,
|
|
90
|
-
]);
|
|
91
|
-
|
|
92
|
-
const footerStyles = computed(() => [
|
|
93
|
-
...ModalFooter,
|
|
94
|
-
]);
|
|
95
|
-
|
|
96
83
|
// State
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
// Events
|
|
100
|
-
watch(isActive, (value) => {
|
|
101
|
-
context.emit(value ? 'open' : 'close');
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
watch(() => props.isOpen, (newIsOpen) => {
|
|
105
|
-
if (newIsOpen) {
|
|
106
|
-
open();
|
|
107
|
-
} else {
|
|
108
|
-
close();
|
|
109
|
-
}
|
|
110
|
-
}, { immediate: true });
|
|
111
|
-
|
|
112
|
-
// Methods
|
|
113
|
-
function open(): void {
|
|
114
|
-
isActive.value = true;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function close(): void {
|
|
118
|
-
isActive.value = false;
|
|
119
|
-
}
|
|
84
|
+
const { state, open, close } = usePopoverState(toRef(props, 'isOpen'), context);
|
|
120
85
|
|
|
121
86
|
return {
|
|
122
87
|
root,
|
|
123
88
|
rootStyles,
|
|
124
|
-
|
|
125
|
-
contentStyles,
|
|
126
|
-
footerStyles,
|
|
127
|
-
isActive,
|
|
89
|
+
state,
|
|
128
90
|
open,
|
|
129
91
|
close,
|
|
130
92
|
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
ref="root"
|
|
4
|
+
:class="rootStyles"
|
|
5
|
+
>
|
|
6
|
+
<slot />
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script lang="ts">
|
|
11
|
+
import { computed, defineComponent, ref } from 'vue-demi';
|
|
12
|
+
import { ModalContent } from './styles';
|
|
13
|
+
|
|
14
|
+
export default defineComponent({
|
|
15
|
+
name: 'OrModalContent',
|
|
16
|
+
|
|
17
|
+
expose: [
|
|
18
|
+
'root',
|
|
19
|
+
],
|
|
20
|
+
|
|
21
|
+
setup() {
|
|
22
|
+
// Refs
|
|
23
|
+
const root = ref<HTMLElement>();
|
|
24
|
+
|
|
25
|
+
// Styles
|
|
26
|
+
const rootStyles = computed(() => [
|
|
27
|
+
'or-modal-content',
|
|
28
|
+
...ModalContent,
|
|
29
|
+
]);
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
root,
|
|
33
|
+
rootStyles,
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
</script>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
ref="root"
|
|
4
|
+
:class="rootStyles"
|
|
5
|
+
>
|
|
6
|
+
<slot />
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script lang="ts">
|
|
11
|
+
import { computed, defineComponent, ref } from 'vue-demi';
|
|
12
|
+
import { ModalFooter } from './styles';
|
|
13
|
+
|
|
14
|
+
export default defineComponent({
|
|
15
|
+
name: 'OrModalFooter',
|
|
16
|
+
|
|
17
|
+
expose: [
|
|
18
|
+
'root',
|
|
19
|
+
],
|
|
20
|
+
|
|
21
|
+
setup() {
|
|
22
|
+
// Refs
|
|
23
|
+
const root = ref<HTMLElement>();
|
|
24
|
+
|
|
25
|
+
// Styles
|
|
26
|
+
const rootStyles = computed(() => [
|
|
27
|
+
'or-modal-footer',
|
|
28
|
+
...ModalFooter,
|
|
29
|
+
]);
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
root,
|
|
33
|
+
rootStyles,
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
</script>
|