@onereach/ui-components 4.6.3 → 4.6.4-beta.2800.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/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 +28 -52
- 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 +3 -2
- package/dist/bundled/v2/components/OrDatePickerV3/index.js +2 -1
- package/dist/bundled/v2/components/OrDateTimePickerV3/OrDateTimePicker.js +4 -3
- package/dist/bundled/v2/components/OrDateTimePickerV3/index.js +2 -1
- 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 +21 -48
- 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 +220 -65
- 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 +2 -1
- package/dist/bundled/v2/components/OrPaginationV3/index.js +1 -0
- package/dist/bundled/v2/components/OrPopoverV3/OrPopover.js +31 -102
- package/dist/bundled/v2/components/OrPopoverV3/OrPopover.vue.d.ts +19 -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 +2 -1
- package/dist/bundled/v2/components/OrTimePickerV3/index.js +1 -0
- 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 +32 -39
- 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 +2 -1
- package/dist/bundled/v2/hooks/index.d.ts +1 -0
- package/dist/bundled/v2/hooks/index.js +1 -0
- package/dist/bundled/v2/hooks/useControlAttributes.d.ts +1 -2
- package/dist/bundled/v2/hooks/useElevation.js +3 -1
- package/dist/bundled/v2/hooks/usePopoverState.d.ts +11 -0
- package/dist/bundled/v2/hooks/usePopoverState.js +42 -0
- package/dist/bundled/v2/hooks/useValidationAttributes.d.ts +1 -2
- package/dist/bundled/v2/index.js +3 -2
- package/dist/bundled/v3/{OrBottomSheet.vue_vue_type_script_lang-a81b2abb.js → OrBottomSheet.vue_vue_type_script_lang-aebedcb2.js} +28 -45
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-f2d222a5.js → OrCardCollection.vue_vue_type_script_lang-d15329fd.js} +3 -3
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-b1b13331.js → OrConfirm.vue_vue_type_script_lang-84f80066.js} +28 -52
- package/dist/bundled/v3/{OrDatePicker.vue_vue_type_script_lang-31f5d798.js → OrDatePicker.vue_vue_type_script_lang-92222927.js} +3 -3
- package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-a0354296.js → OrDateTimePicker.vue_vue_type_script_lang-81f3cb69.js} +3 -3
- package/dist/bundled/v3/{OrDateTimePickerMonthSelect-98b935cb.js → OrDateTimePickerMonthSelect-354e1af8.js} +2 -2
- package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-5bba9f3f.js → OrIconButton.vue_vue_type_script_lang-fe97e57a.js} +1 -1
- package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-3c6b0958.js → OrInlineInput.vue_vue_type_script_lang-3131ae11.js} +1 -1
- package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-da59cd8e.js → OrInlineTextarea.vue_vue_type_script_lang-db28519e.js} +1 -1
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-d08b3796.js → OrInput.vue_vue_type_script_lang-5f74dd08.js} +1 -1
- package/dist/bundled/v3/OrMenu.vue_vue_type_script_lang-1f45bf44.js +66 -0
- package/dist/bundled/v3/OrModal.vue_vue_type_script_lang-31c15ba1.js +160 -0
- package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-463e1a82.js → OrNotification.vue_vue_type_script_lang-89bbc41f.js} +1 -1
- package/dist/bundled/v3/{OrPagination.vue_vue_type_script_lang-bdc8d9fb.js → OrPagination.vue_vue_type_script_lang-1835d432.js} +1 -1
- package/dist/bundled/v3/{OrPopover.vue_vue_type_script_lang-7b1b2488.js → OrPopover.vue_vue_type_script_lang-c75dbd63.js} +27 -98
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-940d8e1f.js → OrSearch.vue_vue_type_script_lang-142ab019.js} +1 -1
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-1c77663e.js → OrSelect.vue_vue_type_script_lang-0ab50e13.js} +3 -3
- package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-780eaa84.js → OrSidebar.vue_vue_type_script_lang-23c6a11f.js} +1 -1
- package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-9d4221f1.js → OrTabs.vue_vue_type_script_lang-255f33d2.js} +1 -1
- package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-09948d1f.js → OrTag.vue_vue_type_script_lang-f4321103.js} +1 -1
- package/dist/bundled/v3/{OrTags.vue_vue_type_script_lang-71fb4f1d.js → OrTags.vue_vue_type_script_lang-4684a9c5.js} +2 -2
- package/dist/bundled/v3/{OrTimePicker.vue_vue_type_script_lang-21be27c6.js → OrTimePicker.vue_vue_type_script_lang-e9684fe9.js} +2 -2
- package/dist/bundled/v3/OrTooltip.vue_vue_type_script_lang-f3ccffce.js +56 -0
- package/dist/bundled/v3/components/OrBottomSheetV3/OrBottomSheet.js +7 -6
- package/dist/bundled/v3/components/OrBottomSheetV3/OrBottomSheet.vue.d.ts +16 -10
- package/dist/bundled/v3/components/OrBottomSheetV3/index.js +3 -2
- package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.js +12 -11
- package/dist/bundled/v3/components/OrCardCollectionV3/index.js +11 -10
- package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.js +11 -10
- package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.vue.d.ts +18 -35
- package/dist/bundled/v3/components/OrConfirmV3/index.js +8 -7
- package/dist/bundled/v3/components/OrDatePickerV3/OrDatePicker.js +11 -10
- package/dist/bundled/v3/components/OrDatePickerV3/index.js +9 -8
- package/dist/bundled/v3/components/OrDateTimePickerV3/OrDateTimePicker.js +12 -11
- package/dist/bundled/v3/components/OrDateTimePickerV3/index.js +9 -8
- package/dist/bundled/v3/components/OrIconButtonV3/OrIconButton.js +8 -7
- package/dist/bundled/v3/components/OrIconButtonV3/index.js +7 -6
- package/dist/bundled/v3/components/OrInlineInputV3/OrInlineInput.js +9 -8
- package/dist/bundled/v3/components/OrInlineInputV3/index.js +8 -7
- package/dist/bundled/v3/components/OrInlineTextareaV3/OrInlineTextarea.js +9 -8
- package/dist/bundled/v3/components/OrInlineTextareaV3/index.js +8 -7
- package/dist/bundled/v3/components/OrInputV3/OrInput.js +9 -8
- package/dist/bundled/v3/components/OrInputV3/index.js +8 -7
- package/dist/bundled/v3/components/OrMenuV3/OrMenu.js +9 -8
- package/dist/bundled/v3/components/OrMenuV3/OrMenu.vue.d.ts +13 -5
- package/dist/bundled/v3/components/OrMenuV3/index.js +5 -4
- package/dist/bundled/v3/components/OrModalV3/OrModal.js +36 -33
- package/dist/bundled/v3/components/OrModalV3/OrModal.vue.d.ts +14 -16
- 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 +9 -8
- package/dist/bundled/v3/components/OrNotificationV3/index.js +8 -7
- package/dist/bundled/v3/components/OrOverlayV3/OrOverlay.js +2 -2
- package/dist/bundled/v3/components/OrOverlayV3/index.js +1 -1
- package/dist/bundled/v3/components/OrPaginationV3/OrPagination.js +8 -7
- package/dist/bundled/v3/components/OrPaginationV3/index.js +6 -5
- package/dist/bundled/v3/components/OrPopoverV3/OrPopover.js +8 -7
- package/dist/bundled/v3/components/OrPopoverV3/OrPopover.vue.d.ts +16 -11
- package/dist/bundled/v3/components/OrPopoverV3/index.js +4 -3
- package/dist/bundled/v3/components/OrSearchV3/OrSearch.js +9 -8
- package/dist/bundled/v3/components/OrSearchV3/index.js +8 -7
- package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +10 -9
- package/dist/bundled/v3/components/OrSelectV3/index.js +9 -8
- package/dist/bundled/v3/components/OrSidebarV3/OrSidebar.js +8 -7
- package/dist/bundled/v3/components/OrSidebarV3/index.js +7 -6
- package/dist/bundled/v3/components/OrTabsV3/OrTabs.js +7 -6
- package/dist/bundled/v3/components/OrTabsV3/index.js +6 -5
- package/dist/bundled/v3/components/OrTagV3/OrTag.js +9 -8
- package/dist/bundled/v3/components/OrTagV3/index.js +8 -7
- package/dist/bundled/v3/components/OrTagsV3/OrTags.js +9 -8
- package/dist/bundled/v3/components/OrTagsV3/index.js +8 -7
- package/dist/bundled/v3/components/OrTimePickerV3/OrTimePicker.js +9 -8
- package/dist/bundled/v3/components/OrTimePickerV3/index.js +7 -6
- package/dist/bundled/v3/components/OrToastContainerV3/OrToastContainer.js +8 -7
- package/dist/bundled/v3/components/OrToastContainerV3/index.js +7 -6
- package/dist/bundled/v3/components/OrToastV3/OrToast.js +7 -6
- package/dist/bundled/v3/components/OrToastV3/index.js +8 -7
- package/dist/bundled/v3/components/OrTooltipV3/OrTooltip.js +13 -10
- package/dist/bundled/v3/components/OrTooltipV3/OrTooltip.vue.d.ts +17 -6
- package/dist/bundled/v3/components/OrTooltipV3/index.js +6 -5
- package/dist/bundled/v3/components/index.js +26 -25
- package/dist/bundled/v3/hooks/index.d.ts +1 -0
- package/dist/bundled/v3/hooks/index.js +1 -0
- package/dist/bundled/v3/hooks/useControlAttributes.d.ts +1 -2
- package/dist/bundled/v3/hooks/useElevation.js +3 -1
- package/dist/bundled/v3/hooks/usePopoverState.d.ts +11 -0
- package/dist/bundled/v3/hooks/usePopoverState.js +42 -0
- package/dist/bundled/v3/hooks/useValidationAttributes.d.ts +1 -2
- package/dist/bundled/v3/index.js +27 -26
- package/dist/esm/v2/{OrBottomSheet-ffa029ca.js → OrBottomSheet-0592ccb2.js} +31 -48
- package/dist/esm/v2/{OrCardCollection-02970752.js → OrCardCollection-2b9bc050.js} +4 -4
- package/dist/esm/v2/{OrConfirm-308e93bc.js → OrConfirm-3f19c23b.js} +30 -54
- package/dist/esm/v2/{OrDatePicker-a79b777e.js → OrDatePicker-e991e7b2.js} +4 -4
- package/dist/esm/v2/{OrDateTimePicker-6fe4969d.js → OrDateTimePicker-7bbd81d1.js} +5 -5
- package/dist/esm/v2/{OrDateTimePickerMonthSelect-355ea67d.js → OrDateTimePickerMonthSelect-d75a849c.js} +3 -3
- package/dist/esm/v2/{OrIconButton-ee747c71.js → OrIconButton-75972865.js} +2 -2
- package/dist/esm/v2/{OrInlineInput-a131caf4.js → OrInlineInput-cf17dbb2.js} +1 -1
- package/dist/esm/v2/{OrInlineTextarea-7cc45396.js → OrInlineTextarea-2b0e2f39.js} +1 -1
- package/dist/esm/v2/{OrInput-3eeca714.js → OrInput-1a2b8ad9.js} +1 -1
- package/dist/esm/v2/{OrMenu-8b902c22.js → OrMenu-a35caf3b.js} +23 -49
- package/dist/esm/v2/OrModal-4aaae6bc.js +312 -0
- package/dist/esm/v2/{OrNotification-16e6d4ff.js → OrNotification-a773f1df.js} +1 -1
- package/dist/esm/v2/{OrOverlay-4c8c11e2.js → OrOverlay-f791976c.js} +1 -1
- package/dist/esm/v2/{OrPagination-36583054.js → OrPagination-3513165d.js} +3 -3
- package/dist/esm/v2/{OrPopover-80459663.js → OrPopover-a8950b85.js} +33 -104
- package/dist/esm/v2/{OrSearch-fa824e87.js → OrSearch-19c157b3.js} +1 -1
- package/dist/esm/v2/{OrSelect-d5fecc34.js → OrSelect-991b8be3.js} +3 -3
- package/dist/esm/v2/{OrSidebar-638b1d60.js → OrSidebar-bfbb8b0a.js} +1 -1
- package/dist/esm/v2/{OrSidebarCollapseButton-2c81d465.js → OrSidebarCollapseButton-a98037d6.js} +1 -1
- package/dist/esm/v2/{OrTabs-653258a2.js → OrTabs-abf290af.js} +2 -2
- package/dist/esm/v2/{OrTag-6256623c.js → OrTag-aa46cecd.js} +1 -1
- package/dist/esm/v2/{OrTags-db2608dc.js → OrTags-2a567e79.js} +2 -2
- package/dist/esm/v2/{OrTimePicker-5470d7a0.js → OrTimePicker-766637cb.js} +3 -3
- package/dist/esm/v2/{OrTooltip-5a6e0f64.js → OrTooltip-0dc63c1a.js} +33 -40
- 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 +4 -3
- package/dist/esm/v2/components/or-card-collection-v3/index.js +11 -10
- package/dist/esm/v2/components/or-confirm-v3/OrConfirm.vue.d.ts +18 -36
- package/dist/esm/v2/components/or-confirm-v3/index.js +9 -8
- package/dist/esm/v2/components/or-date-picker-v3/index.js +10 -9
- 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 +7 -6
- package/dist/esm/v2/components/or-inline-input-v3/index.js +8 -7
- package/dist/esm/v2/components/or-inline-textarea-v3/index.js +8 -7
- package/dist/esm/v2/components/or-input-v3/index.js +8 -7
- package/dist/esm/v2/components/or-menu-v3/OrMenu.vue.d.ts +13 -16
- package/dist/esm/v2/components/or-menu-v3/index.js +7 -6
- package/dist/esm/v2/components/or-modal-v3/OrModal.vue.d.ts +13 -19
- package/dist/esm/v2/components/or-modal-v3/index.js +12 -11
- 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 +8 -7
- package/dist/esm/v2/components/or-overlay-v3/index.js +2 -2
- package/dist/esm/v2/components/or-pagination-v3/index.js +7 -6
- package/dist/esm/v2/components/or-popover-v3/OrPopover.vue.d.ts +19 -12
- package/dist/esm/v2/components/or-popover-v3/index.js +5 -4
- package/dist/esm/v2/components/or-search-v3/index.js +9 -8
- package/dist/esm/v2/components/or-select-v3/index.js +10 -9
- package/dist/esm/v2/components/or-sidebar-v3/index.js +9 -8
- package/dist/esm/v2/components/or-sidebar-v3/partials/index.js +8 -7
- package/dist/esm/v2/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.js +8 -7
- package/dist/esm/v2/components/or-tabs-v3/index.js +7 -6
- package/dist/esm/v2/components/or-tag-v3/index.js +8 -7
- package/dist/esm/v2/components/or-tags-v3/index.js +9 -8
- package/dist/esm/v2/components/or-time-picker-v3/index.js +8 -7
- package/dist/esm/v2/components/or-toast-v3/index.js +8 -7
- package/dist/esm/v2/components/or-toast-v3/or-toast-container-v3/index.js +8 -7
- package/dist/esm/v2/components/or-tooltip-v3/OrTooltip.vue.d.ts +20 -17
- package/dist/esm/v2/components/or-tooltip-v3/index.js +7 -6
- package/dist/esm/v2/hooks/index.d.ts +1 -0
- package/dist/esm/v2/hooks/index.js +2 -1
- package/dist/esm/v2/hooks/useControlAttributes.d.ts +1 -2
- package/dist/esm/v2/hooks/usePopoverState.d.ts +11 -0
- package/dist/esm/v2/hooks/useValidationAttributes.d.ts +1 -2
- package/dist/esm/v2/index.js +28 -27
- package/dist/esm/v2/{types-4a7d24f3.js → types-f30860ee.js} +2 -2
- package/dist/esm/{v3/useElevation-b5a49746.js → v2/useElevation-a50ec347.js} +3 -1
- package/dist/esm/v2/usePopoverState-8a95a300.js +42 -0
- package/dist/esm/v3/{OrBottomSheet-5969a217.js → OrBottomSheet-a39fb331.js} +31 -48
- package/dist/esm/v3/{OrCardCollection-4401de57.js → OrCardCollection-3d652a34.js} +4 -4
- package/dist/esm/v3/{OrConfirm-671148e8.js → OrConfirm-cb0b2b78.js} +30 -54
- package/dist/esm/v3/{OrDatePicker-7cb1da75.js → OrDatePicker-6a44ad41.js} +4 -4
- package/dist/esm/v3/{OrDateTimePicker-3cf882f6.js → OrDateTimePicker-2cbcf8c7.js} +5 -5
- package/dist/esm/v3/{OrDateTimePickerMonthSelect-bd26a294.js → OrDateTimePickerMonthSelect-2f61d92f.js} +3 -3
- package/dist/esm/v3/{OrIconButton-b7217ea5.js → OrIconButton-e34a20eb.js} +2 -2
- package/dist/esm/v3/{OrInlineInput-dcb28ea2.js → OrInlineInput-ad0d4264.js} +1 -1
- package/dist/esm/v3/{OrInlineTextarea-88eac437.js → OrInlineTextarea-b5ec488d.js} +1 -1
- package/dist/esm/v3/{OrInput-238fd1c0.js → OrInput-a9aeef6e.js} +1 -1
- package/dist/esm/v3/{OrMenu-8a53ccf9.js → OrMenu-f590d761.js} +24 -50
- package/dist/esm/v3/OrModal-9dc09e95.js +226 -0
- package/dist/esm/v3/{OrNotification-09216b8b.js → OrNotification-69031471.js} +1 -1
- package/dist/esm/v3/{OrOverlay-bf72f582.js → OrOverlay-28952099.js} +1 -1
- package/dist/esm/v3/{OrPagination-c6046af4.js → OrPagination-f3be120f.js} +3 -3
- package/dist/esm/v3/{OrPopover-15c2968f.js → OrPopover-ebd57053.js} +31 -102
- package/dist/esm/v3/{OrSearch-cd0f6a88.js → OrSearch-5576cf14.js} +1 -1
- package/dist/esm/v3/{OrSelect-ce7f58cf.js → OrSelect-0b3ebce9.js} +3 -3
- package/dist/esm/v3/{OrSidebar-1579ad80.js → OrSidebar-303ef558.js} +1 -1
- package/dist/esm/v3/{OrSidebarCollapseButton-2668946c.js → OrSidebarCollapseButton-d7f004df.js} +1 -1
- package/dist/esm/v3/{OrTabs-a2d87627.js → OrTabs-b6c8077c.js} +2 -2
- package/dist/esm/v3/{OrTag-8605e9e6.js → OrTag-4ac45254.js} +1 -1
- package/dist/esm/v3/{OrTags-3724ff59.js → OrTags-de9f065e.js} +2 -2
- package/dist/esm/v3/{OrTimePicker-a5921c6f.js → OrTimePicker-0fe72767.js} +3 -3
- package/dist/esm/v3/{OrTooltip-3d5fcaf9.js → OrTooltip-edb28095.js} +28 -41
- package/dist/esm/v3/components/index.js +28 -27
- package/dist/esm/v3/components/or-bottom-sheet-v3/OrBottomSheet.vue.d.ts +16 -10
- package/dist/esm/v3/components/or-bottom-sheet-v3/index.js +4 -3
- package/dist/esm/v3/components/or-card-collection-v3/index.js +11 -10
- package/dist/esm/v3/components/or-confirm-v3/OrConfirm.vue.d.ts +18 -35
- package/dist/esm/v3/components/or-confirm-v3/index.js +9 -8
- package/dist/esm/v3/components/or-date-picker-v3/index.js +10 -9
- 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 +7 -6
- package/dist/esm/v3/components/or-inline-input-v3/index.js +8 -7
- package/dist/esm/v3/components/or-inline-textarea-v3/index.js +8 -7
- package/dist/esm/v3/components/or-input-v3/index.js +8 -7
- package/dist/esm/v3/components/or-menu-v3/OrMenu.vue.d.ts +13 -5
- package/dist/esm/v3/components/or-menu-v3/index.js +7 -6
- package/dist/esm/v3/components/or-modal-v3/OrModal.vue.d.ts +14 -16
- 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 +8 -7
- package/dist/esm/v3/components/or-overlay-v3/index.js +2 -2
- package/dist/esm/v3/components/or-pagination-v3/index.js +7 -6
- package/dist/esm/v3/components/or-popover-v3/OrPopover.vue.d.ts +16 -11
- package/dist/esm/v3/components/or-popover-v3/index.js +5 -4
- package/dist/esm/v3/components/or-search-v3/index.js +9 -8
- package/dist/esm/v3/components/or-select-v3/index.js +10 -9
- package/dist/esm/v3/components/or-sidebar-v3/index.js +9 -8
- package/dist/esm/v3/components/or-sidebar-v3/partials/index.js +8 -7
- package/dist/esm/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.js +8 -7
- package/dist/esm/v3/components/or-tabs-v3/index.js +7 -6
- package/dist/esm/v3/components/or-tag-v3/index.js +8 -7
- package/dist/esm/v3/components/or-tags-v3/index.js +9 -8
- package/dist/esm/v3/components/or-time-picker-v3/index.js +8 -7
- package/dist/esm/v3/components/or-toast-v3/index.js +8 -7
- package/dist/esm/v3/components/or-toast-v3/or-toast-container-v3/index.js +8 -7
- package/dist/esm/v3/components/or-tooltip-v3/OrTooltip.vue.d.ts +17 -6
- package/dist/esm/v3/components/or-tooltip-v3/index.js +7 -6
- package/dist/esm/v3/hooks/index.d.ts +1 -0
- package/dist/esm/v3/hooks/index.js +2 -1
- package/dist/esm/v3/hooks/useControlAttributes.d.ts +1 -2
- package/dist/esm/v3/hooks/usePopoverState.d.ts +11 -0
- package/dist/esm/v3/hooks/useValidationAttributes.d.ts +1 -2
- package/dist/esm/v3/index.js +28 -27
- package/dist/esm/v3/{types-9e1555eb.js → types-60f3dd35.js} +2 -2
- package/dist/esm/{v2/useElevation-b5a49746.js → v3/useElevation-a50ec347.js} +3 -1
- package/dist/esm/v3/usePopoverState-8a95a300.js +42 -0
- package/package.json +2 -3
- package/src/components/or-bottom-sheet-v3/OrBottomSheet.vue +29 -58
- package/src/components/or-confirm-v3/OrConfirm.vue +29 -50
- package/src/components/or-date-picker-v3/OrDatePicker.vue +1 -1
- package/src/components/or-date-time-picker-v3/OrDateTimePicker.vue +2 -2
- package/src/components/or-menu-v3/OrMenu.vue +18 -40
- package/src/components/or-modal-v3/OrModal.vue +32 -66
- 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 +10 -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-pagination-v3/OrPagination.vue +1 -1
- package/src/components/or-popover-v3/OrPopover.vue +28 -125
- package/src/components/or-time-picker-v3/OrTimePicker.vue +1 -1
- package/src/components/or-tooltip-v3/OrTooltip.vue +24 -40
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useControlAttributes.ts +1 -1
- package/src/hooks/useElevation.ts +3 -1
- package/src/hooks/usePopoverState.ts +66 -0
- package/src/hooks/useValidationAttributes.ts +1 -1
- 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/v2/{OrDateTimePickerMonthSelect-30f79990.js → OrDateTimePickerMonthSelect-9a8e332c.js} +0 -0
- /package/dist/bundled/v3/{OrOverlay.vue_vue_type_script_lang-86c7b93a.js → OrOverlay.vue_vue_type_script_lang-29ff6fd8.js} +0 -0
- /package/dist/bundled/v3/{OrToastContainer.vue_vue_type_script_lang-485ef171.js → OrToastContainer.vue_vue_type_script_lang-461fb6d1.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<OrTeleport>
|
|
3
3
|
<div
|
|
4
|
-
v-show="
|
|
4
|
+
v-show="state === 'open'"
|
|
5
5
|
:class="['contents']"
|
|
6
6
|
>
|
|
7
7
|
<template v-if="isDesktop && variant === 'auto' || variant === 'popover'">
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
<OrBottomSheet
|
|
27
27
|
ref="bottomSheet"
|
|
28
28
|
v-bind="bottomSheetProps"
|
|
29
|
+
:is-open="state === 'open'"
|
|
29
30
|
@update:state="state = $event"
|
|
30
|
-
@update:state:closed-automatically="$emit('update:state:closed-automatically')"
|
|
31
31
|
>
|
|
32
32
|
<slot />
|
|
33
33
|
</OrBottomSheet>
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
<script lang="ts">
|
|
40
40
|
import { autoUpdate, computePosition, flip, hide, shift } from '@floating-ui/dom';
|
|
41
41
|
import { onClickOutside } from '@vueuse/core';
|
|
42
|
-
import { PropType, computed, defineComponent,
|
|
43
|
-
import { useElevation, useResponsive } from '../../hooks';
|
|
42
|
+
import { PropType, computed, defineComponent, ref, toRef, unref, watchPostEffect } from 'vue-demi';
|
|
43
|
+
import { useElevation, usePopoverState, useResponsive } from '../../hooks';
|
|
44
44
|
import { OrBottomSheetV3 as OrBottomSheet } from '../or-bottom-sheet-v3';
|
|
45
45
|
import { OrTeleportV3 as OrTeleport } from '../or-teleport-v3';
|
|
46
46
|
import { PopoverPlacement, PopoverVariant } from './props';
|
|
@@ -57,6 +57,11 @@ export default defineComponent({
|
|
|
57
57
|
inheritAttrs: false,
|
|
58
58
|
|
|
59
59
|
props: {
|
|
60
|
+
isOpen: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: false,
|
|
63
|
+
},
|
|
64
|
+
|
|
60
65
|
variant: {
|
|
61
66
|
type: String as PropType<`${PopoverVariant}`>,
|
|
62
67
|
default: PopoverVariant.Auto,
|
|
@@ -95,21 +100,22 @@ export default defineComponent({
|
|
|
95
100
|
|
|
96
101
|
emits: [
|
|
97
102
|
'update:state',
|
|
98
|
-
|
|
99
|
-
'
|
|
100
|
-
'
|
|
101
|
-
'update:state:closed-automatically',
|
|
103
|
+
|
|
104
|
+
'open',
|
|
105
|
+
'close',
|
|
102
106
|
],
|
|
103
107
|
|
|
104
108
|
expose: [
|
|
105
109
|
'root',
|
|
110
|
+
|
|
106
111
|
'state',
|
|
107
|
-
|
|
108
|
-
'isFullscreen',
|
|
109
|
-
'isClosed',
|
|
112
|
+
|
|
110
113
|
'isFlipped',
|
|
114
|
+
'isHidden',
|
|
115
|
+
|
|
111
116
|
'open',
|
|
112
117
|
'close',
|
|
118
|
+
'toggle',
|
|
113
119
|
],
|
|
114
120
|
|
|
115
121
|
setup(props, context) {
|
|
@@ -134,112 +140,10 @@ export default defineComponent({
|
|
|
134
140
|
]);
|
|
135
141
|
|
|
136
142
|
// State
|
|
137
|
-
const state
|
|
138
|
-
|
|
139
|
-
const isOpen = computed(() => state.value === 'open');
|
|
140
|
-
const isFullscreen = computed(() => state.value === 'fullscreen');
|
|
141
|
-
const isClosed = computed(() => state.value === 'closed');
|
|
143
|
+
const { state, open, close, toggle } = usePopoverState(toRef(props, 'isOpen'), context);
|
|
142
144
|
|
|
143
145
|
const isFlipped = ref<boolean>(false);
|
|
144
|
-
|
|
145
|
-
// Events
|
|
146
|
-
watch(state, (value) => {
|
|
147
|
-
context.emit('update:state', value);
|
|
148
|
-
|
|
149
|
-
switch (value) {
|
|
150
|
-
case 'open':
|
|
151
|
-
context.emit('update:state:open');
|
|
152
|
-
break;
|
|
153
|
-
|
|
154
|
-
case 'fullscreen':
|
|
155
|
-
context.emit('update:state:fullscreen');
|
|
156
|
-
break;
|
|
157
|
-
|
|
158
|
-
case 'closed':
|
|
159
|
-
context.emit('update:state:closed');
|
|
160
|
-
break;
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
// Methods
|
|
165
|
-
function open(): void {
|
|
166
|
-
state.value = 'open';
|
|
167
|
-
|
|
168
|
-
switch (props.variant) {
|
|
169
|
-
case PopoverVariant.Auto:
|
|
170
|
-
if (isMobile.value) {
|
|
171
|
-
nextTick(() => {
|
|
172
|
-
const bottomSheetInstance = bottomSheet.value;
|
|
173
|
-
|
|
174
|
-
if (bottomSheetInstance) {
|
|
175
|
-
(bottomSheetInstance.open as () => void)();
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
break;
|
|
181
|
-
|
|
182
|
-
case PopoverVariant.Popover:
|
|
183
|
-
break;
|
|
184
|
-
|
|
185
|
-
case PopoverVariant.BottomSheet:
|
|
186
|
-
nextTick(() => {
|
|
187
|
-
const bottomSheetInstance = bottomSheet.value;
|
|
188
|
-
|
|
189
|
-
if (bottomSheetInstance) {
|
|
190
|
-
(bottomSheetInstance.open as () => void)();
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
break;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
function close(auto: boolean = false): void {
|
|
199
|
-
state.value = 'closed';
|
|
200
|
-
|
|
201
|
-
switch (props.variant) {
|
|
202
|
-
case PopoverVariant.Auto:
|
|
203
|
-
if (isMobile.value) {
|
|
204
|
-
nextTick(() => {
|
|
205
|
-
const bottomSheetInstance = bottomSheet.value;
|
|
206
|
-
|
|
207
|
-
if (bottomSheetInstance) {
|
|
208
|
-
(bottomSheetInstance.close as () => void)();
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
break;
|
|
214
|
-
|
|
215
|
-
case PopoverVariant.Popover:
|
|
216
|
-
break;
|
|
217
|
-
|
|
218
|
-
case PopoverVariant.BottomSheet:
|
|
219
|
-
nextTick(() => {
|
|
220
|
-
const bottomSheetInstance = bottomSheet.value;
|
|
221
|
-
|
|
222
|
-
if (bottomSheetInstance) {
|
|
223
|
-
(bottomSheetInstance.close as () => void)();
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
break;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
if (auto) {
|
|
231
|
-
context.emit('update:state:closed-automatically');
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
// Handlers
|
|
236
|
-
function handleBottomSheetState(bottomSheetState: string): void {
|
|
237
|
-
if (bottomSheetState === 'closed') {
|
|
238
|
-
state.value = 'closed';
|
|
239
|
-
} else {
|
|
240
|
-
state.value = 'open';
|
|
241
|
-
}
|
|
242
|
-
}
|
|
146
|
+
const isHidden = ref<boolean>(false);
|
|
243
147
|
|
|
244
148
|
// Effects
|
|
245
149
|
watchPostEffect(() => {
|
|
@@ -254,8 +158,8 @@ export default defineComponent({
|
|
|
254
158
|
placement,
|
|
255
159
|
|
|
256
160
|
middleware: [
|
|
257
|
-
flip(),
|
|
258
161
|
shift(),
|
|
162
|
+
flip(),
|
|
259
163
|
hide(),
|
|
260
164
|
],
|
|
261
165
|
});
|
|
@@ -268,11 +172,16 @@ export default defineComponent({
|
|
|
268
172
|
});
|
|
269
173
|
|
|
270
174
|
isFlipped.value = Boolean(middlewareData.flip?.index);
|
|
175
|
+
isHidden.value = Boolean(middlewareData.hide?.referenceHidden);
|
|
271
176
|
});
|
|
272
177
|
}
|
|
273
178
|
}
|
|
274
179
|
});
|
|
275
180
|
|
|
181
|
+
// #region Elevation
|
|
182
|
+
useElevation(root, state);
|
|
183
|
+
// #endregion
|
|
184
|
+
|
|
276
185
|
// #region Click Outside
|
|
277
186
|
const trigger = toRef(props, 'trigger');
|
|
278
187
|
|
|
@@ -280,33 +189,27 @@ export default defineComponent({
|
|
|
280
189
|
const path = event.composedPath() as Element[];
|
|
281
190
|
|
|
282
191
|
if (!path.some(({ classList }) => classList?.contains('or-popover-v3') || classList?.contains('or-bottom-sheet-v3'))) {
|
|
283
|
-
close(
|
|
192
|
+
close();
|
|
284
193
|
}
|
|
285
194
|
}, {
|
|
286
195
|
ignore: [trigger],
|
|
287
196
|
});
|
|
288
197
|
// #endregion
|
|
289
198
|
|
|
290
|
-
// #region Elevation
|
|
291
|
-
useElevation(root, state);
|
|
292
|
-
// #endregion
|
|
293
|
-
|
|
294
199
|
return {
|
|
295
200
|
isDesktop,
|
|
296
201
|
isMobile,
|
|
297
202
|
root,
|
|
298
203
|
bottomSheet,
|
|
299
204
|
bottomSheetRoot,
|
|
300
|
-
handleBottomSheetState,
|
|
301
205
|
rootStyles,
|
|
302
206
|
bodyStyles,
|
|
303
207
|
state,
|
|
304
|
-
isOpen,
|
|
305
|
-
isFullscreen,
|
|
306
|
-
isClosed,
|
|
307
208
|
isFlipped,
|
|
209
|
+
isHidden,
|
|
308
210
|
open,
|
|
309
211
|
close,
|
|
212
|
+
toggle,
|
|
310
213
|
};
|
|
311
214
|
},
|
|
312
215
|
});
|
|
@@ -2,18 +2,20 @@
|
|
|
2
2
|
<div
|
|
3
3
|
ref="root"
|
|
4
4
|
:class="rootStyles"
|
|
5
|
+
@mouseenter="open()"
|
|
6
|
+
@mouseleave="close()"
|
|
5
7
|
>
|
|
6
8
|
<slot />
|
|
7
9
|
|
|
8
10
|
<template v-if="text">
|
|
9
11
|
<OrPopover
|
|
10
|
-
|
|
12
|
+
:is-open="state === 'open'"
|
|
11
13
|
:variant="'popover'"
|
|
12
14
|
:trigger="root"
|
|
13
15
|
:placement="placement"
|
|
14
16
|
:full-width="false"
|
|
15
17
|
:disable-default-styles="true"
|
|
16
|
-
@update:state="
|
|
18
|
+
@update:state="state = $event"
|
|
17
19
|
>
|
|
18
20
|
<div :class="bodyStyles">
|
|
19
21
|
{{ text }}
|
|
@@ -24,8 +26,8 @@
|
|
|
24
26
|
</template>
|
|
25
27
|
|
|
26
28
|
<script lang="ts">
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
+
import { PropType, computed, defineComponent, ref, toRef } from 'vue-demi';
|
|
30
|
+
import { usePopoverState } from '../../hooks';
|
|
29
31
|
import { OrPopoverV3 as OrPopover } from '../or-popover-v3';
|
|
30
32
|
import { TooltipPlacement } from './props';
|
|
31
33
|
import { TooltipBody, TooltipBodyPlacements, TooltipRoot } from './styles';
|
|
@@ -38,34 +40,43 @@ export default defineComponent({
|
|
|
38
40
|
},
|
|
39
41
|
|
|
40
42
|
props: {
|
|
43
|
+
isOpen: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false,
|
|
46
|
+
},
|
|
47
|
+
|
|
41
48
|
text: {
|
|
42
49
|
type: String,
|
|
43
50
|
default: undefined,
|
|
44
51
|
},
|
|
45
52
|
|
|
46
53
|
placement: {
|
|
47
|
-
type: String as PropType
|
|
54
|
+
type: String as PropType<TooltipPlacement>,
|
|
48
55
|
default: TooltipPlacement.Bottom,
|
|
49
56
|
},
|
|
50
57
|
},
|
|
51
58
|
|
|
52
59
|
emits: [
|
|
53
60
|
'update:state',
|
|
61
|
+
|
|
62
|
+
'open',
|
|
63
|
+
'close',
|
|
54
64
|
],
|
|
55
65
|
|
|
56
66
|
expose: [
|
|
57
67
|
'root',
|
|
68
|
+
|
|
69
|
+
'state',
|
|
70
|
+
|
|
58
71
|
'open',
|
|
59
72
|
'close',
|
|
73
|
+
'toggle',
|
|
60
74
|
],
|
|
61
75
|
|
|
62
|
-
setup(props) {
|
|
76
|
+
setup(props, context) {
|
|
63
77
|
// Refs
|
|
64
78
|
const root = ref<HTMLElement>();
|
|
65
79
|
|
|
66
|
-
const popover = ref<InstanceType<typeof OrPopover>>();
|
|
67
|
-
const popoverRoot = computed(() => popover.value?.root);
|
|
68
|
-
|
|
69
80
|
// Styles
|
|
70
81
|
const rootStyles = computed(() => [
|
|
71
82
|
'or-tooltip-v3',
|
|
@@ -77,44 +88,17 @@ export default defineComponent({
|
|
|
77
88
|
...TooltipBodyPlacements[props.placement],
|
|
78
89
|
]);
|
|
79
90
|
|
|
80
|
-
//
|
|
81
|
-
const open =
|
|
82
|
-
if (hover.value) {
|
|
83
|
-
const popoverInstance = popover.value;
|
|
84
|
-
|
|
85
|
-
if (popoverInstance) {
|
|
86
|
-
(popoverInstance.open as () => void)();
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}, 250);
|
|
90
|
-
|
|
91
|
-
const close = useDebounceFn(() => {
|
|
92
|
-
if (!hover.value) {
|
|
93
|
-
const popoverInstance = popover.value;
|
|
94
|
-
|
|
95
|
-
if (popoverInstance) {
|
|
96
|
-
(popoverInstance.close as () => void)();
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}, 250);
|
|
100
|
-
|
|
101
|
-
// Effects
|
|
102
|
-
// #region Hover
|
|
103
|
-
const hover = useElementHover(root);
|
|
104
|
-
|
|
105
|
-
watch(hover, (value) => {
|
|
106
|
-
value ? open() : close();
|
|
107
|
-
});
|
|
108
|
-
// #endregion
|
|
91
|
+
// State
|
|
92
|
+
const { state, open, close, toggle } = usePopoverState(toRef(props, 'isOpen'), context, { debounce: 250 });
|
|
109
93
|
|
|
110
94
|
return {
|
|
111
95
|
root,
|
|
112
|
-
popover,
|
|
113
|
-
popoverRoot,
|
|
114
96
|
rootStyles,
|
|
115
97
|
bodyStyles,
|
|
98
|
+
state,
|
|
116
99
|
open,
|
|
117
100
|
close,
|
|
101
|
+
toggle,
|
|
118
102
|
};
|
|
119
103
|
},
|
|
120
104
|
});
|
package/src/hooks/index.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { useControlAttributes } from './useControlAttributes';
|
|
|
2
2
|
export { useElevation } from './useElevation';
|
|
3
3
|
export { useIdAttribute } from './useIdAttribute';
|
|
4
4
|
export { useOverflow } from './useOverflow';
|
|
5
|
+
export { usePopoverState } from './usePopoverState';
|
|
5
6
|
export { useResponsive } from './useResponsive';
|
|
6
7
|
export { default as useToggle } from './useToggle';
|
|
7
8
|
export { useValidationAttributes } from './useValidationAttributes';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { debouncedRef } from '@vueuse/core';
|
|
2
|
+
import { Ref, SetupContext, UnwrapRef, ref, watch } from 'vue-demi';
|
|
3
|
+
|
|
4
|
+
export interface PopoverState {
|
|
5
|
+
state: Ref<'open' | 'closed'>;
|
|
6
|
+
|
|
7
|
+
open: () => void;
|
|
8
|
+
close: () => void;
|
|
9
|
+
toggle: () => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface PopoverStateOptions {
|
|
13
|
+
debounce?: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// TODO: Remove type `any` (https://github.com/microsoft/TypeScript/issues/27808)
|
|
17
|
+
// TODO: Use `defineEmits` after migration to Vue 3
|
|
18
|
+
export function usePopoverState(
|
|
19
|
+
isOpen: Ref<boolean>,
|
|
20
|
+
context: SetupContext<('update:state' | 'open' | 'close' | any)[]>,
|
|
21
|
+
options?: PopoverStateOptions
|
|
22
|
+
): PopoverState {
|
|
23
|
+
// State
|
|
24
|
+
const state = ref<UnwrapRef<PopoverState['state']>>(isOpen.value ? 'open' : 'closed');
|
|
25
|
+
|
|
26
|
+
watch(isOpen, (value) => {
|
|
27
|
+
state.value = value ? 'open' : 'closed';
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const debouncedState = options?.debounce ? debouncedRef(state, options.debounce) : state;
|
|
31
|
+
|
|
32
|
+
watch(debouncedState, (value) => {
|
|
33
|
+
context.emit('update:state', value);
|
|
34
|
+
|
|
35
|
+
switch (value) {
|
|
36
|
+
case 'open':
|
|
37
|
+
context.emit('open');
|
|
38
|
+
break;
|
|
39
|
+
|
|
40
|
+
case 'closed':
|
|
41
|
+
context.emit('close');
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// Methods
|
|
47
|
+
function open(): void {
|
|
48
|
+
state.value = 'open';
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function close(): void {
|
|
52
|
+
state.value = 'closed';
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function toggle(): void {
|
|
56
|
+
state.value = state.value === 'open' ? 'closed' : 'open';
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
state: debouncedState,
|
|
61
|
+
|
|
62
|
+
open,
|
|
63
|
+
close,
|
|
64
|
+
toggle,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, ComputedRef, useAttrs } from 'vue-demi';
|
|
2
2
|
|
|
3
|
-
interface ValidationAttributes {
|
|
3
|
+
export interface ValidationAttributes {
|
|
4
4
|
required: ComputedRef<boolean | undefined>;
|
|
5
5
|
minlength: ComputedRef<number | undefined>;
|
|
6
6
|
maxlength: ComputedRef<number | undefined>;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, computed } from 'vue-demi';
|
|
2
|
-
import { MenuRoot } from './components/OrMenuV3/styles.js';
|
|
3
|
-
import './components/OrPopoverV3/OrPopover.js';
|
|
4
|
-
import { s as script$1 } from './OrPopover.vue_vue_type_script_lang-7b1b2488.js';
|
|
5
|
-
import { PopoverPlacement } from './components/OrPopoverV3/props.js';
|
|
6
|
-
|
|
7
|
-
var script = defineComponent({
|
|
8
|
-
name: 'OrMenu',
|
|
9
|
-
components: {
|
|
10
|
-
OrPopover: script$1
|
|
11
|
-
},
|
|
12
|
-
inheritAttrs: false,
|
|
13
|
-
props: {
|
|
14
|
-
trigger: {
|
|
15
|
-
type: HTMLElement,
|
|
16
|
-
default: undefined
|
|
17
|
-
},
|
|
18
|
-
placement: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: PopoverPlacement.Bottom
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
emits: ['update:state'],
|
|
24
|
-
expose: ['root', 'state', 'isOpen', 'open', 'close', 'toggle'],
|
|
25
|
-
setup() {
|
|
26
|
-
// Refs
|
|
27
|
-
const root = ref();
|
|
28
|
-
const popover = ref();
|
|
29
|
-
const popoverRoot = computed(() => {
|
|
30
|
-
var _a;
|
|
31
|
-
return (_a = popover.value) === null || _a === void 0 ? void 0 : _a.root;
|
|
32
|
-
});
|
|
33
|
-
const popoverState = computed(() => {
|
|
34
|
-
var _a;
|
|
35
|
-
return (_a = popover.value) === null || _a === void 0 ? void 0 : _a.state;
|
|
36
|
-
});
|
|
37
|
-
// Styles
|
|
38
|
-
const rootStyles = computed(() => ['or-menu-v3', ...MenuRoot]);
|
|
39
|
-
// State
|
|
40
|
-
const isOpen = computed(() => {
|
|
41
|
-
var _a;
|
|
42
|
-
return (_a = popover.value) === null || _a === void 0 ? void 0 : _a.isOpen;
|
|
43
|
-
});
|
|
44
|
-
// Methods
|
|
45
|
-
function open() {
|
|
46
|
-
const popoverInstance = popover.value;
|
|
47
|
-
if (popoverInstance) {
|
|
48
|
-
popoverInstance.open();
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
function close() {
|
|
52
|
-
const popoverInstance = popover.value;
|
|
53
|
-
if (popoverInstance) {
|
|
54
|
-
popoverInstance.close();
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
function toggle() {
|
|
58
|
-
isOpen.value ? close() : open();
|
|
59
|
-
}
|
|
60
|
-
// Handlers
|
|
61
|
-
function onClick(event) {
|
|
62
|
-
const path = event.composedPath();
|
|
63
|
-
const classLists = path.filter(_ref => {
|
|
64
|
-
let {
|
|
65
|
-
classList
|
|
66
|
-
} = _ref;
|
|
67
|
-
return !!classList;
|
|
68
|
-
}).map(_ref2 => {
|
|
69
|
-
let {
|
|
70
|
-
classList
|
|
71
|
-
} = _ref2;
|
|
72
|
-
return classList;
|
|
73
|
-
});
|
|
74
|
-
if (classLists.some(classList => classList.contains('or-menu-item-v3'))) {
|
|
75
|
-
close();
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return {
|
|
79
|
-
root,
|
|
80
|
-
popover,
|
|
81
|
-
popoverRoot,
|
|
82
|
-
state: popoverState,
|
|
83
|
-
rootStyles,
|
|
84
|
-
isOpen,
|
|
85
|
-
open,
|
|
86
|
-
close,
|
|
87
|
-
toggle,
|
|
88
|
-
onClick
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
export { script as s };
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, watch } from 'vue-demi';
|
|
2
|
-
import { ModalSize } from './components/OrModalV3/props.js';
|
|
3
|
-
import { ModalRoot, ModalRootSizes, ModalHeader, ModalContent, ModalFooter } from './components/OrModalV3/styles.js';
|
|
4
|
-
import './components/OrOverlayV3/OrOverlay.js';
|
|
5
|
-
import './components/OrIconButtonV3/OrIconButton.js';
|
|
6
|
-
import { s as script$1 } from './OrOverlay.vue_vue_type_script_lang-86c7b93a.js';
|
|
7
|
-
import { s as script$2 } from './OrIconButton.vue_vue_type_script_lang-5bba9f3f.js';
|
|
8
|
-
|
|
9
|
-
var script = defineComponent({
|
|
10
|
-
name: 'OrModal',
|
|
11
|
-
components: {
|
|
12
|
-
OrOverlay: script$1,
|
|
13
|
-
OrIconButton: script$2
|
|
14
|
-
},
|
|
15
|
-
inheritAttrs: false,
|
|
16
|
-
props: {
|
|
17
|
-
size: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: ModalSize.M
|
|
20
|
-
},
|
|
21
|
-
isOpen: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: false
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
emits: ['open', 'close'],
|
|
27
|
-
expose: ['root', 'isActive', 'open', 'close'],
|
|
28
|
-
setup(props, context) {
|
|
29
|
-
// Refs
|
|
30
|
-
const root = ref();
|
|
31
|
-
// Styles
|
|
32
|
-
const rootStyles = computed(() => ['or-modal-v3', ...ModalRoot, ...ModalRootSizes[props.size]]);
|
|
33
|
-
const headerStyles = computed(() => [...ModalHeader]);
|
|
34
|
-
const contentStyles = computed(() => [...ModalContent]);
|
|
35
|
-
const footerStyles = computed(() => [...ModalFooter]);
|
|
36
|
-
// State
|
|
37
|
-
const isActive = ref(false);
|
|
38
|
-
// Events
|
|
39
|
-
watch(isActive, value => {
|
|
40
|
-
context.emit(value ? 'open' : 'close');
|
|
41
|
-
});
|
|
42
|
-
watch(() => props.isOpen, newIsOpen => {
|
|
43
|
-
if (newIsOpen) {
|
|
44
|
-
open();
|
|
45
|
-
} else {
|
|
46
|
-
close();
|
|
47
|
-
}
|
|
48
|
-
}, {
|
|
49
|
-
immediate: true
|
|
50
|
-
});
|
|
51
|
-
// Methods
|
|
52
|
-
function open() {
|
|
53
|
-
isActive.value = true;
|
|
54
|
-
}
|
|
55
|
-
function close() {
|
|
56
|
-
isActive.value = false;
|
|
57
|
-
}
|
|
58
|
-
return {
|
|
59
|
-
root,
|
|
60
|
-
rootStyles,
|
|
61
|
-
headerStyles,
|
|
62
|
-
contentStyles,
|
|
63
|
-
footerStyles,
|
|
64
|
-
isActive,
|
|
65
|
-
open,
|
|
66
|
-
close
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
export { script as s };
|