@onereach/ui-components 7.0.0 → 7.0.1-beta.3529.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 +1 -1
- package/dist/bundled/v2/components/OrBottomSheetV3/hooks/useBottomSheetSwipeState.js +1 -1
- package/dist/bundled/v2/components/OrCode/OrCode.js +1 -1
- package/dist/bundled/v2/components/OrColorPicker/OrColorPicker.js +1 -1
- package/dist/bundled/v2/components/OrConfirm/OrConfirm.js +1 -1
- package/dist/bundled/v2/components/OrConfirmV3/OrConfirm.js +1 -1
- package/dist/bundled/v2/components/OrDatePickerV3/OrDatePicker.js +2 -2
- package/dist/bundled/v2/components/OrDateTimePicker/OrDateTimePicker.js +1 -1
- package/dist/bundled/v2/components/OrDateTimePickerV3/OrDateTimePicker.js +3 -3
- package/dist/bundled/v2/components/OrDateTimePickerV3/index.js +3 -3
- package/dist/bundled/v2/components/OrInlineTextEdit/OrInlineTextEdit.js +1 -1
- package/dist/bundled/v2/components/OrLoaderV3/OrLoader.js +1 -1
- package/dist/bundled/v2/components/OrModal/OrModal.js +2 -2
- package/dist/bundled/v2/components/OrOverflowMenu/OrOverflowMenu.js +1 -1
- package/dist/bundled/v2/components/OrOverlayV3/OrOverlay.js +1 -1
- package/dist/bundled/v2/components/OrPassword/OrPassword.js +1 -1
- package/dist/bundled/v2/components/OrPopoverV3/OrPopover.js +1 -1
- package/dist/bundled/v2/components/OrProgressV3/OrProgress.js +1 -1
- package/dist/bundled/v2/components/OrResizeablePanelV3/OrResizeablePanel.js +1 -1
- package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.js +2 -2
- package/dist/bundled/v2/components/OrSelect/OrSelect.js +1 -1
- package/dist/bundled/v2/components/OrSelectV3/OrSelect.js +621 -137
- package/dist/bundled/v2/components/OrSelectV3/OrSelect.vue.d.ts +48 -29
- package/dist/bundled/v2/components/OrSelectV3/styles.js +1 -1
- package/dist/bundled/v2/components/OrSelectV3/types.d.ts +3 -1
- package/dist/bundled/v2/components/OrSidebar/OrSidebar.js +1 -1
- package/dist/bundled/v2/components/OrSlider/OrSlider.js +1 -1
- package/dist/bundled/v2/components/OrTabsV3/OrTabs.js +1 -1
- package/dist/bundled/v2/components/OrTagInputV3/OrTagInput.js +138 -67
- package/dist/bundled/v2/components/OrTagInputV3/OrTagInput.vue.d.ts +59 -14
- package/dist/bundled/v2/components/OrTagInputV3/styles.js +1 -1
- package/dist/bundled/v2/components/OrTagsV3/OrTags.js +56 -19
- package/dist/bundled/v2/components/OrTagsV3/OrTags.vue.d.ts +32 -12
- package/dist/bundled/v2/components/OrTagsV3/props.d.ts +3 -1
- package/dist/bundled/v2/components/OrTagsV3/props.js +4 -0
- package/dist/bundled/v2/components/OrTagsV3/styles.js +15 -5
- package/dist/bundled/v2/components/OrTagsV3/types.d.ts +6 -0
- package/dist/bundled/v2/components/OrTagsV3/types.js +1 -0
- package/dist/bundled/v2/components/OrTagsV3/utils/castToTag.d.ts +2 -0
- package/dist/bundled/v2/components/OrTagsV3/utils/castToTag.js +12 -0
- package/dist/bundled/v2/components/OrTimePickerV3/OrTimePicker.js +2 -2
- package/dist/bundled/v2/components/OrToast/composable/useToastEventBus.js +1 -1
- package/dist/bundled/v2/components/OrToastV3/composable/useToastEventBus.js +1 -1
- package/dist/bundled/v2/components/index.js +3 -3
- package/dist/bundled/v2/hooks/useOverflow.d.ts +4 -1
- package/dist/bundled/v2/hooks/useOverflow.js +10 -3
- package/dist/bundled/v2/hooks/useResponsive/useResponsive.js +1 -1
- package/dist/bundled/v2/{index-a488b35e.js → index-a77d7adf.js} +23 -1
- package/dist/bundled/v2/index.js +4 -4
- package/dist/bundled/v2/{useFocusTrap-44eded81.js → useFocusTrap-dad25115.js} +1 -1
- package/dist/bundled/v3/{OrBottomSheet.vue_vue_type_script_lang-37e2fc0e.js → OrBottomSheet.vue_vue_type_script_lang-5c209d34.js} +2 -2
- package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-bc25bb37.js → OrButton.vue_vue_type_script_lang-0f7bda53.js} +1 -1
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-77bcd3a8.js → OrCardCollection.vue_vue_type_script_lang-4bbd52e3.js} +1 -1
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-81901ad7.js → OrCardCollection.vue_vue_type_script_lang-832a6115.js} +3 -3
- package/dist/bundled/v3/{OrCheckboxGroup.vue_vue_type_script_lang-ada59489.js → OrCheckboxGroup.vue_vue_type_script_lang-850a6eba.js} +1 -1
- package/dist/bundled/v3/{OrCheckboxTree.vue_vue_type_script_lang-aea94f67.js → OrCheckboxTree.vue_vue_type_script_lang-daa18318.js} +2 -2
- package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-12e5e92d.js → OrCode.vue_vue_type_script_lang-3a6280cf.js} +2 -2
- package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-9008d0ff.js → OrCode.vue_vue_type_script_lang-e7e395eb.js} +2 -2
- package/dist/bundled/v3/{OrColorPicker.vue_vue_type_script_lang-5c6fd662.js → OrColorPicker.vue_vue_type_script_lang-ae778af6.js} +2 -2
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-22a73313.js → OrConfirm.vue_vue_type_script_lang-1c3c49c8.js} +6 -6
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-5dd6c37e.js → OrConfirm.vue_vue_type_script_lang-9ed9ba84.js} +4 -4
- package/dist/bundled/v3/{OrContextMenu.vue_vue_type_script_lang-4d5e445b.js → OrContextMenu.vue_vue_type_script_lang-6caa81c0.js} +1 -1
- package/dist/bundled/v3/{OrDatePicker.vue_vue_type_script_lang-eeb33130.js → OrDatePicker.vue_vue_type_script_lang-b2bdcc61.js} +4 -4
- package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-a75fb98f.js → OrDateTimePicker.vue_vue_type_script_lang-a4f4d0dd.js} +1 -1
- package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-3b26d48d.js → OrDateTimePicker.vue_vue_type_script_lang-fcacd5d0.js} +5 -5
- package/dist/bundled/v3/{OrDateTimePickerPopoverHeader-0c4c9bbc.js → OrDateTimePickerPopoverHeader-0ebbb959.js} +4 -4
- package/dist/bundled/v3/{OrDateTimePickerPopoverHeader.vue_vue_type_script_lang-f2f452de.js → OrDateTimePickerPopoverHeader.vue_vue_type_script_lang-c9eb540e.js} +1 -1
- package/dist/bundled/v3/{OrDateTimePickerTimeSelect-ca150449.js → OrDateTimePickerTimeSelect-934093b2.js} +1 -1
- package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-a35c30ce.js → OrIconButton.vue_vue_type_script_lang-6a53a819.js} +1 -1
- package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-df7eb768.js → OrInlineInput.vue_vue_type_script_lang-c5b3b8f5.js} +1 -1
- package/dist/bundled/v3/{OrInlineTextEdit.vue_vue_type_script_lang-70b79aec.js → OrInlineTextEdit.vue_vue_type_script_lang-3efb497c.js} +1 -1
- package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-4f7dfa64.js → OrInlineTextarea.vue_vue_type_script_lang-b36f6ddd.js} +1 -1
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-bea5b267.js → OrInput.vue_vue_type_script_lang-f558bdbb.js} +2 -2
- package/dist/bundled/v3/{OrLoader.vue_vue_type_script_lang-aefd49c2.js → OrLoader.vue_vue_type_script_lang-e4fbf869.js} +1 -1
- package/dist/bundled/v3/{OrMenu.vue_vue_type_script_lang-c4b4ca1b.js → OrMenu.vue_vue_type_script_lang-2ef9ec71.js} +1 -1
- package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-712e0986.js → OrModal.vue_vue_type_script_lang-a7ac4ac5.js} +2 -2
- package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-09c00129.js → OrModal.vue_vue_type_script_lang-c4d31fae.js} +2 -2
- package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-b53d29af.js → OrNotification.vue_vue_type_script_lang-eaf4f467.js} +1 -1
- package/dist/bundled/v3/{OrOverflowMenu.vue_vue_type_script_lang-bba61b94.js → OrOverflowMenu.vue_vue_type_script_lang-fa75e033.js} +2 -2
- package/dist/bundled/v3/{OrOverlay.vue_vue_type_script_lang-a2afd31a.js → OrOverlay.vue_vue_type_script_lang-5b1f4a36.js} +1 -1
- package/dist/bundled/v3/{OrPagination.vue_vue_type_script_lang-5b33bd96.js → OrPagination.vue_vue_type_script_lang-8a01d103.js} +2 -2
- package/dist/bundled/v3/{OrPassword.vue_vue_type_script_lang-b36b869a.js → OrPassword.vue_vue_type_script_lang-5cacdf5e.js} +1 -1
- package/dist/bundled/v3/{OrPopover.vue_vue_type_script_lang-2462c31d.js → OrPopover.vue_vue_type_script_lang-d7c493af.js} +2 -2
- package/dist/bundled/v3/{OrProgress.vue_vue_type_script_lang-f2da8e58.js → OrProgress.vue_vue_type_script_lang-9f7dcc82.js} +1 -1
- package/dist/bundled/v3/{OrResizeablePanel.vue_vue_type_script_lang-6ff56926.js → OrResizeablePanel.vue_vue_type_script_lang-b521771e.js} +2 -2
- package/dist/bundled/v3/{OrRichTextEditor.vue_vue_type_script_lang-3e868b85.js → OrRichTextEditor.vue_vue_type_script_lang-88d8212b.js} +8 -8
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-44935ef1.js → OrSearch.vue_vue_type_script_lang-89527d71.js} +1 -1
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-12b1c76f.js → OrSearch.vue_vue_type_script_lang-e756d8a8.js} +2 -2
- package/dist/bundled/v3/OrSelect.vue_vue_type_script_lang-3c895f3a.js +746 -0
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-0ae0fd63.js → OrSelect.vue_vue_type_script_lang-a4d17559.js} +1 -1
- package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-509fb105.js → OrSidebar.vue_vue_type_script_lang-314721d5.js} +1 -1
- package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-696f6851.js → OrSidebar.vue_vue_type_script_lang-f69f92ca.js} +1 -1
- package/dist/bundled/v3/{OrSlider.vue_vue_type_script_lang-e0c33892.js → OrSlider.vue_vue_type_script_lang-207c0596.js} +1 -1
- package/dist/bundled/v3/{OrSorting.vue_vue_type_script_lang-9c054059.js → OrSorting.vue_vue_type_script_lang-257e1c8b.js} +2 -2
- package/dist/bundled/v3/{OrSwitch.vue_vue_type_script_lang-188b038b.js → OrSwitch.vue_vue_type_script_lang-032fd11a.js} +1 -1
- package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-c06d9565.js → OrTabs.vue_vue_type_script_lang-ddac6c54.js} +2 -2
- package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-e4811b42.js → OrTag.vue_vue_type_script_lang-6c0094be.js} +1 -1
- package/dist/bundled/v3/{OrTagInput.vue_vue_type_script_lang-c074503e.js → OrTagInput.vue_vue_type_script_lang-cef895f1.js} +71 -14
- package/dist/bundled/v3/{OrTags.vue_vue_type_script_lang-ffa6d728.js → OrTags.vue_vue_type_script_lang-ab2ccd23.js} +45 -10
- package/dist/bundled/v3/{OrTimePicker.vue_vue_type_script_lang-9f7d944b.js → OrTimePicker.vue_vue_type_script_lang-5c3cd13d.js} +4 -4
- package/dist/bundled/v3/{OrToastContainer.vue_vue_type_script_lang-2ae21641.js → OrToastContainer.vue_vue_type_script_lang-2905654d.js} +1 -1
- package/dist/bundled/v3/{OrToastContainer.vue_vue_type_script_lang-671d567d.js → OrToastContainer.vue_vue_type_script_lang-ccc99bf4.js} +1 -1
- package/dist/bundled/v3/{OrTooltip.vue_vue_type_script_lang-28b89a3e.js → OrTooltip.vue_vue_type_script_lang-dd0c252d.js} +1 -1
- package/dist/bundled/v3/{OrTree.vue_vue_type_script_lang-5f86b587.js → OrTree.vue_vue_type_script_lang-cd793811.js} +2 -2
- package/dist/bundled/v3/components/OrBottomSheetV3/OrBottomSheet.js +2 -2
- package/dist/bundled/v3/components/OrBottomSheetV3/hooks/useBottomSheetSwipeState.js +1 -1
- package/dist/bundled/v3/components/OrBottomSheetV3/index.js +1 -1
- package/dist/bundled/v3/components/OrButtonV3/OrButton.js +2 -2
- package/dist/bundled/v3/components/OrButtonV3/index.js +1 -1
- package/dist/bundled/v3/components/OrCardCollection/OrCardCollection.js +2 -2
- package/dist/bundled/v3/components/OrCardCollection/index.js +1 -1
- package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.js +2 -2
- package/dist/bundled/v3/components/OrCardCollectionV3/index.js +1 -1
- package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.js +2 -2
- package/dist/bundled/v3/components/OrCheckboxGroupV3/index.js +1 -1
- package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.js +2 -2
- package/dist/bundled/v3/components/OrCheckboxTreeV3/index.js +1 -1
- package/dist/bundled/v3/components/OrCode/OrCode.js +2 -2
- package/dist/bundled/v3/components/OrCode/index.js +1 -1
- package/dist/bundled/v3/components/OrCodeV3/OrCode.js +2 -2
- package/dist/bundled/v3/components/OrCodeV3/index.js +1 -1
- package/dist/bundled/v3/components/OrColorPicker/OrColorPicker.js +2 -2
- package/dist/bundled/v3/components/OrColorPicker/index.js +1 -1
- package/dist/bundled/v3/components/OrConfirm/OrConfirm.js +2 -2
- package/dist/bundled/v3/components/OrConfirm/index.js +1 -1
- package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.js +2 -2
- package/dist/bundled/v3/components/OrConfirmV3/index.js +1 -1
- package/dist/bundled/v3/components/OrContextMenuV3/OrContextMenu.js +2 -2
- package/dist/bundled/v3/components/OrContextMenuV3/index.js +1 -1
- package/dist/bundled/v3/components/OrDatePickerV3/OrDatePicker.js +2 -2
- package/dist/bundled/v3/components/OrDatePickerV3/index.js +1 -1
- package/dist/bundled/v3/components/OrDateTimePicker/OrDateTimePicker.js +2 -2
- package/dist/bundled/v3/components/OrDateTimePicker/index.js +1 -1
- package/dist/bundled/v3/components/OrDateTimePickerV3/OrDateTimePicker.js +2 -2
- package/dist/bundled/v3/components/OrDateTimePickerV3/index.js +4 -4
- package/dist/bundled/v3/components/OrExpansionPanelV3/OrExpansionPanel.js +2 -2
- package/dist/bundled/v3/components/OrExpansionPanelV3/index.js +1 -1
- package/dist/bundled/v3/components/OrIconButtonV3/OrIconButton.js +2 -2
- package/dist/bundled/v3/components/OrIconButtonV3/index.js +1 -1
- package/dist/bundled/v3/components/OrInlineInputV3/OrInlineInput.js +2 -2
- package/dist/bundled/v3/components/OrInlineInputV3/index.js +1 -1
- package/dist/bundled/v3/components/OrInlineTextEdit/OrInlineTextEdit.js +2 -2
- package/dist/bundled/v3/components/OrInlineTextEdit/index.js +1 -1
- package/dist/bundled/v3/components/OrInlineTextareaV3/OrInlineTextarea.js +2 -2
- package/dist/bundled/v3/components/OrInlineTextareaV3/index.js +1 -1
- package/dist/bundled/v3/components/OrInputV3/OrInput.js +2 -2
- package/dist/bundled/v3/components/OrInputV3/index.js +1 -1
- package/dist/bundled/v3/components/OrLoaderV3/OrLoader.js +2 -2
- package/dist/bundled/v3/components/OrLoaderV3/index.js +1 -1
- package/dist/bundled/v3/components/OrMenuV3/OrMenu.js +2 -2
- package/dist/bundled/v3/components/OrMenuV3/index.js +1 -1
- package/dist/bundled/v3/components/OrModal/OrModal.js +2 -2
- package/dist/bundled/v3/components/OrModal/index.js +1 -1
- package/dist/bundled/v3/components/OrModalV3/OrModal.js +2 -2
- package/dist/bundled/v3/components/OrModalV3/index.js +1 -1
- package/dist/bundled/v3/components/OrNotificationV3/OrNotification.js +2 -2
- package/dist/bundled/v3/components/OrNotificationV3/index.js +1 -1
- package/dist/bundled/v3/components/OrOverflowMenu/OrOverflowMenu.js +2 -2
- package/dist/bundled/v3/components/OrOverflowMenu/index.js +1 -1
- 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 +2 -2
- package/dist/bundled/v3/components/OrPaginationV3/index.js +1 -1
- package/dist/bundled/v3/components/OrPassword/OrPassword.js +2 -2
- package/dist/bundled/v3/components/OrPassword/index.js +1 -1
- package/dist/bundled/v3/components/OrPopoverV3/OrPopover.js +2 -2
- package/dist/bundled/v3/components/OrPopoverV3/index.js +1 -1
- package/dist/bundled/v3/components/OrProgressV3/OrProgress.js +2 -2
- package/dist/bundled/v3/components/OrProgressV3/index.js +1 -1
- package/dist/bundled/v3/components/OrResizeablePanelV3/OrResizeablePanel.js +2 -2
- package/dist/bundled/v3/components/OrResizeablePanelV3/index.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.js +2 -2
- package/dist/bundled/v3/components/OrRichTextEditorV3/index.js +1 -1
- package/dist/bundled/v3/components/OrSearch/OrSearch.js +2 -2
- package/dist/bundled/v3/components/OrSearch/index.js +1 -1
- package/dist/bundled/v3/components/OrSearchV3/OrSearch.js +2 -2
- package/dist/bundled/v3/components/OrSearchV3/index.js +1 -1
- package/dist/bundled/v3/components/OrSelect/OrSelect.js +2 -2
- package/dist/bundled/v3/components/OrSelect/index.js +1 -1
- package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +52 -84
- package/dist/bundled/v3/components/OrSelectV3/OrSelect.vue.d.ts +21 -19
- package/dist/bundled/v3/components/OrSelectV3/index.js +1 -1
- package/dist/bundled/v3/components/OrSelectV3/styles.js +1 -1
- package/dist/bundled/v3/components/OrSelectV3/types.d.ts +3 -1
- package/dist/bundled/v3/components/OrSidebar/OrSidebar.js +2 -2
- package/dist/bundled/v3/components/OrSidebar/index.js +1 -1
- package/dist/bundled/v3/components/OrSidebarV3/OrSidebar.js +2 -2
- package/dist/bundled/v3/components/OrSidebarV3/index.js +1 -1
- package/dist/bundled/v3/components/OrSlider/OrSlider.js +2 -2
- package/dist/bundled/v3/components/OrSlider/index.js +1 -1
- package/dist/bundled/v3/components/OrSortingV3/OrSorting.js +2 -2
- package/dist/bundled/v3/components/OrSortingV3/index.js +1 -1
- package/dist/bundled/v3/components/OrSwitchV3/OrSwitch.js +2 -2
- package/dist/bundled/v3/components/OrSwitchV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTabsV3/OrTabs.js +2 -2
- package/dist/bundled/v3/components/OrTabsV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTagInputV3/OrTagInput.js +60 -39
- package/dist/bundled/v3/components/OrTagInputV3/OrTagInput.vue.d.ts +31 -12
- package/dist/bundled/v3/components/OrTagInputV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTagInputV3/styles.js +1 -1
- package/dist/bundled/v3/components/OrTagV3/OrTag.js +2 -2
- package/dist/bundled/v3/components/OrTagV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTagsV3/OrTags.js +22 -15
- package/dist/bundled/v3/components/OrTagsV3/OrTags.vue.d.ts +21 -7
- package/dist/bundled/v3/components/OrTagsV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTagsV3/props.d.ts +3 -1
- package/dist/bundled/v3/components/OrTagsV3/props.js +4 -0
- package/dist/bundled/v3/components/OrTagsV3/styles.js +15 -5
- package/dist/bundled/v3/components/OrTagsV3/types.d.ts +6 -0
- package/dist/bundled/v3/components/OrTagsV3/types.js +1 -0
- package/dist/bundled/v3/components/OrTagsV3/utils/castToTag.d.ts +2 -0
- package/dist/bundled/v3/components/OrTagsV3/utils/castToTag.js +12 -0
- package/dist/bundled/v3/components/OrTimePickerV3/OrTimePicker.js +2 -2
- package/dist/bundled/v3/components/OrTimePickerV3/index.js +1 -1
- package/dist/bundled/v3/components/OrToast/Timer.js +1 -1
- package/dist/bundled/v3/components/OrToast/composable/useToastEventBus.js +2 -2
- package/dist/bundled/v3/components/OrToast/index.js +1 -1
- package/dist/bundled/v3/components/OrToastContainer/OrToastContainer.js +2 -2
- package/dist/bundled/v3/components/OrToastContainer/index.js +1 -1
- package/dist/bundled/v3/components/OrToastContainerV3/OrToastContainer.js +2 -2
- package/dist/bundled/v3/components/OrToastContainerV3/index.js +1 -1
- package/dist/bundled/v3/components/OrToastV3/OrToast.js +2 -2
- package/dist/bundled/v3/components/OrToastV3/Timer.js +1 -1
- package/dist/bundled/v3/components/OrToastV3/composable/useToastEventBus.js +2 -2
- package/dist/bundled/v3/components/OrToastV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTooltipV3/OrTooltip.js +2 -2
- package/dist/bundled/v3/components/OrTooltipV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTreeV3/OrTree.js +2 -2
- package/dist/bundled/v3/components/OrTreeV3/index.js +1 -1
- package/dist/bundled/v3/components/index.js +55 -55
- package/dist/bundled/v3/hooks/useOverflow.d.ts +4 -1
- package/dist/bundled/v3/hooks/useOverflow.js +10 -3
- package/dist/bundled/v3/hooks/usePopoverState.js +1 -1
- package/dist/bundled/v3/hooks/useResponsive/useResponsive.js +1 -1
- package/dist/bundled/v3/{index-6c0c514a.js → index-0f230746.js} +1 -1
- package/dist/bundled/v3/{index-544e4b4e.js → index-6cbf1493.js} +1 -1
- package/dist/bundled/v3/{index-5baaa991.js → index-c5cda763.js} +24 -2
- package/dist/bundled/v3/index.js +56 -56
- package/dist/bundled/v3/{useFocusTrap-7acc7be5.js → useFocusTrap-aa5b17f6.js} +2 -2
- package/dist/esm/v2/{OrSelect-57af5b9a.js → OrSelect-578bcee2.js} +147 -197
- package/dist/esm/v2/OrSelectControlInput-28c226f8.js +140 -0
- package/dist/esm/v2/OrSelectMultipleControl-961d8d6a.js +209 -0
- package/dist/esm/v2/OrSelectPlaceholder-f36f4e40.js +69 -0
- package/dist/esm/v2/OrSelectSingleControl-76b29e0b.js +153 -0
- package/dist/esm/v2/{OrTagInput-51521313.js → OrTagInput-7f917d41.js} +140 -70
- package/dist/esm/v2/{OrTags-98807166.js → OrTags-ed4ddf4d.js} +86 -25
- package/dist/esm/v2/components/index.js +8 -4
- package/dist/esm/v2/components/or-select-v3/OrSelect.vue.d.ts +48 -29
- package/dist/esm/v2/components/or-select-v3/index.js +9 -3
- package/dist/esm/v2/components/or-select-v3/partials/index.d.ts +3 -0
- package/dist/esm/v2/components/or-select-v3/partials/index.js +32 -0
- package/dist/esm/v2/components/or-select-v3/partials/or-select-control-input/OrSelectControlInput.vue.d.ts +73 -0
- package/dist/esm/v2/components/or-select-v3/partials/or-select-control-input/index.d.ts +1 -0
- package/dist/esm/v2/components/or-select-v3/partials/or-select-control-input/index.js +10 -0
- package/dist/esm/v2/components/or-select-v3/partials/or-select-control-input/styles.d.ts +1 -0
- package/dist/esm/v2/components/or-select-v3/partials/or-select-multiple-control/OrSelectMultipleControl.vue.d.ts +140 -0
- package/dist/esm/v2/components/or-select-v3/partials/or-select-multiple-control/index.d.ts +1 -0
- package/dist/esm/v2/components/or-select-v3/partials/or-select-multiple-control/index.js +31 -0
- package/dist/esm/v2/components/or-select-v3/partials/or-select-multiple-control/styles.d.ts +1 -0
- package/dist/esm/v2/components/or-select-v3/partials/or-select-multiple-control/utils/castToMultipleModel.d.ts +2 -0
- package/dist/esm/v2/components/or-select-v3/partials/or-select-placeholder/index.d.ts +1 -0
- package/dist/esm/v2/components/or-select-v3/partials/or-select-placeholder/index.js +3 -0
- package/dist/esm/v2/components/or-select-v3/partials/or-select-single-control/OrSelectSingleControl.vue.d.ts +107 -0
- package/dist/esm/v2/components/or-select-v3/partials/or-select-single-control/index.d.ts +1 -0
- package/dist/esm/v2/components/or-select-v3/partials/or-select-single-control/index.js +13 -0
- package/dist/esm/v2/components/or-select-v3/partials/or-select-single-control/styles.d.ts +1 -0
- package/dist/esm/v2/components/or-select-v3/types.d.ts +3 -1
- package/dist/esm/v2/components/or-tag-input-v3/OrTagInput.vue.d.ts +59 -14
- package/dist/esm/v2/components/or-tag-input-v3/index.js +4 -4
- package/dist/esm/v2/components/or-tags-v3/OrTags.vue.d.ts +32 -12
- package/dist/esm/v2/components/or-tags-v3/index.js +2 -2
- package/dist/esm/v2/components/or-tags-v3/props.d.ts +3 -1
- package/dist/esm/v2/components/or-tags-v3/types.d.ts +6 -0
- package/dist/esm/v2/components/or-tags-v3/utils/castToTag.d.ts +2 -0
- package/dist/esm/v2/hooks/index.js +1 -1
- package/dist/esm/v2/hooks/useOverflow.d.ts +4 -1
- package/dist/esm/v2/index.js +8 -4
- package/dist/esm/v2/{useOverflow-ff9ae748.js → useOverflow-b482f3c9.js} +9 -2
- package/dist/esm/v3/{OrSelect-74c2c521.js → OrSelect-b359beb6.js} +134 -179
- package/dist/esm/v3/OrSelectControlInput-3297e30d.js +99 -0
- package/dist/esm/v3/OrSelectMultipleControl-3620b234.js +172 -0
- package/dist/esm/v3/OrSelectPlaceholder-10e3bf5e.js +44 -0
- package/dist/esm/v3/OrSelectSingleControl-f969c913.js +132 -0
- package/dist/esm/v3/{OrTagInput-851b05c8.js → OrTagInput-56ee7d0b.js} +129 -52
- package/dist/esm/v3/{OrTags-55b8c446.js → OrTags-52da64cd.js} +92 -26
- package/dist/esm/v3/components/index.js +8 -4
- package/dist/esm/v3/components/or-select-v3/OrSelect.vue.d.ts +21 -19
- package/dist/esm/v3/components/or-select-v3/index.js +9 -3
- package/dist/esm/v3/components/or-select-v3/partials/index.d.ts +3 -0
- package/dist/esm/v3/components/or-select-v3/partials/index.js +31 -0
- package/dist/esm/v3/components/or-select-v3/partials/or-select-control-input/OrSelectControlInput.vue.d.ts +52 -0
- package/dist/esm/v3/components/or-select-v3/partials/or-select-control-input/index.d.ts +1 -0
- package/dist/esm/v3/components/or-select-v3/partials/or-select-control-input/index.js +10 -0
- package/dist/esm/v3/components/or-select-v3/partials/or-select-control-input/styles.d.ts +1 -0
- package/dist/esm/v3/components/or-select-v3/partials/or-select-multiple-control/OrSelectMultipleControl.vue.d.ts +94 -0
- package/dist/esm/v3/components/or-select-v3/partials/or-select-multiple-control/index.d.ts +1 -0
- package/dist/esm/v3/components/or-select-v3/partials/or-select-multiple-control/index.js +30 -0
- package/dist/esm/v3/components/or-select-v3/partials/or-select-multiple-control/styles.d.ts +1 -0
- package/dist/esm/v3/components/or-select-v3/partials/or-select-multiple-control/utils/castToMultipleModel.d.ts +2 -0
- package/dist/esm/v3/components/or-select-v3/partials/or-select-placeholder/index.d.ts +1 -0
- package/dist/esm/v3/components/or-select-v3/partials/or-select-placeholder/index.js +3 -0
- package/dist/esm/v3/components/or-select-v3/partials/or-select-single-control/OrSelectSingleControl.vue.d.ts +73 -0
- package/dist/esm/v3/components/or-select-v3/partials/or-select-single-control/index.d.ts +1 -0
- package/dist/esm/v3/components/or-select-v3/partials/or-select-single-control/index.js +13 -0
- package/dist/esm/v3/components/or-select-v3/partials/or-select-single-control/styles.d.ts +1 -0
- package/dist/esm/v3/components/or-select-v3/types.d.ts +3 -1
- package/dist/esm/v3/components/or-tag-input-v3/OrTagInput.vue.d.ts +31 -12
- package/dist/esm/v3/components/or-tag-input-v3/index.js +4 -4
- package/dist/esm/v3/components/or-tags-v3/OrTags.vue.d.ts +21 -7
- package/dist/esm/v3/components/or-tags-v3/index.js +2 -2
- package/dist/esm/v3/components/or-tags-v3/props.d.ts +3 -1
- package/dist/esm/v3/components/or-tags-v3/types.d.ts +6 -0
- package/dist/esm/v3/components/or-tags-v3/utils/castToTag.d.ts +2 -0
- package/dist/esm/v3/hooks/index.js +1 -1
- package/dist/esm/v3/hooks/useOverflow.d.ts +4 -1
- package/dist/esm/v3/index.js +8 -4
- package/dist/esm/v3/{useOverflow-ff9ae748.js → useOverflow-b482f3c9.js} +9 -2
- package/package.json +2 -3
- package/src/components/or-select-v3/OrSelect.vue +107 -115
- package/src/components/or-select-v3/partials/index.ts +3 -0
- package/src/components/or-select-v3/partials/or-select-control-input/OrSelectControlInput.vue +88 -0
- package/src/components/or-select-v3/partials/or-select-control-input/index.ts +1 -0
- package/src/components/or-select-v3/partials/or-select-control-input/styles.ts +13 -0
- package/src/components/or-select-v3/partials/or-select-multiple-control/OrSelectMultipleControl.vue +161 -0
- package/src/components/or-select-v3/partials/or-select-multiple-control/index.ts +1 -0
- package/src/components/or-select-v3/partials/or-select-multiple-control/styles.ts +6 -0
- package/src/components/or-select-v3/partials/or-select-multiple-control/utils/castToMultipleModel.ts +10 -0
- package/src/components/or-select-v3/partials/or-select-placeholder/index.ts +1 -0
- package/src/components/or-select-v3/partials/or-select-single-control/OrSelectSingleControl.vue +131 -0
- package/src/components/or-select-v3/partials/or-select-single-control/index.ts +1 -0
- package/src/components/or-select-v3/partials/or-select-single-control/styles.ts +4 -0
- package/src/components/or-select-v3/styles.ts +1 -0
- package/src/components/or-select-v3/types.ts +5 -1
- package/src/components/or-tag-input-v3/OrTagInput.vue +121 -44
- package/src/components/or-tag-input-v3/styles.ts +1 -1
- package/src/components/or-tags-v3/OrTags.vue +67 -15
- package/src/components/or-tags-v3/props.ts +4 -0
- package/src/components/or-tags-v3/styles.ts +17 -2
- package/src/components/or-tags-v3/types.ts +6 -0
- package/src/components/or-tags-v3/utils/castToTag.ts +11 -0
- package/src/hooks/useOverflow.ts +13 -3
- package/dist/bundled/v3/OrSelect.vue_vue_type_script_lang-d1d57fd5.js +0 -352
- /package/dist/bundled/v2/{OrDateTimePickerMonthSelect-06eb6ce3.js → OrDateTimePickerMonthSelect-0dfe417f.js} +0 -0
- /package/dist/bundled/v2/{OrDateTimePickerPopoverHeader-fceb3125.js → OrDateTimePickerPopoverHeader-20b13137.js} +0 -0
- /package/dist/bundled/v2/{OrDateTimePickerTimeSelect-5ebd3f35.js → OrDateTimePickerTimeSelect-02a369fb.js} +0 -0
- /package/dist/bundled/v3/{OrExpansionPanel.vue_vue_type_script_lang-d7c2d142.js → OrExpansionPanel.vue_vue_type_script_lang-6efa4414.js} +0 -0
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
ref="inputBox"
|
|
23
23
|
v-dropdown-open="toggle"
|
|
24
24
|
v-dropdown-close="close"
|
|
25
|
-
:class="[popoverState === 'open' && (popover.isFlipped ? 'rounded-t-0' : 'rounded-b-0')]"
|
|
25
|
+
:class="[popoverState === 'open' && (popover && popover.isFlipped ? 'rounded-t-0' : 'rounded-b-0')]"
|
|
26
26
|
:variant="disableDefaultStyles ? 'unstyled' : 'styled'"
|
|
27
27
|
:size="size"
|
|
28
28
|
:invalid="!!error"
|
|
@@ -38,84 +38,51 @@
|
|
|
38
38
|
@focus="$emit('focus', $event)"
|
|
39
39
|
@blur="$emit('blur', $event)"
|
|
40
40
|
>
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
<slot
|
|
42
|
+
name="valueTemplate"
|
|
43
|
+
:model="proxyModelValue"
|
|
44
|
+
>
|
|
45
|
+
<template v-if="multiple">
|
|
46
|
+
<OrSelectMultipleControl
|
|
47
|
+
ref="multipleControl"
|
|
48
|
+
v-model="searchText"
|
|
49
|
+
:options="options"
|
|
45
50
|
:model="proxyModelValue"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
>
|
|
54
|
-
{{ option.label }}
|
|
55
|
-
</OrTag>
|
|
56
|
-
</slot>
|
|
57
|
-
</template>
|
|
58
|
-
|
|
59
|
-
<template v-else-if="popoverState === 'closed' || !enableSearch">
|
|
60
|
-
<OrSelectPlaceholder :disabled="disabled">
|
|
61
|
-
{{ placeholder }}
|
|
62
|
-
</OrSelectPlaceholder>
|
|
51
|
+
:placeholder="placeholder"
|
|
52
|
+
:disabled="disabled"
|
|
53
|
+
:readonly="readonly"
|
|
54
|
+
:enable-search="enableSearch"
|
|
55
|
+
:overflow="overflow"
|
|
56
|
+
@reset="deselect"
|
|
57
|
+
/>
|
|
63
58
|
</template>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
<slot
|
|
69
|
-
name="valueTemplate"
|
|
59
|
+
<template v-else>
|
|
60
|
+
<OrSelectSingleControl
|
|
61
|
+
ref="singleControl"
|
|
62
|
+
v-model="searchText"
|
|
70
63
|
:model="proxyModelValue"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
</slot>
|
|
64
|
+
:options="options"
|
|
65
|
+
:placeholder="placeholder"
|
|
66
|
+
:enable-search="enableSearch"
|
|
67
|
+
/>
|
|
76
68
|
</template>
|
|
77
|
-
|
|
78
|
-
<template v-else-if="popoverState === 'closed' || !enableSearch">
|
|
79
|
-
<OrSelectPlaceholder :disabled="disabled">
|
|
80
|
-
{{ placeholder }}
|
|
81
|
-
</OrSelectPlaceholder>
|
|
82
|
-
</template>
|
|
83
|
-
</template>
|
|
69
|
+
</slot>
|
|
84
70
|
</div>
|
|
85
71
|
|
|
86
|
-
<template v-if="multiple && outerItems.length > 0">
|
|
87
|
-
+{{ outerItems.length }}
|
|
88
|
-
</template>
|
|
89
|
-
|
|
90
|
-
<template v-if="popoverState === 'open' && enableSearch && isDesktop">
|
|
91
|
-
<OrInput
|
|
92
|
-
ref="searchControl"
|
|
93
|
-
v-model="searchText"
|
|
94
|
-
:class="[...searchControlStyles, isEmptyModelValue && 'md:!ml-none']"
|
|
95
|
-
:type="'search'"
|
|
96
|
-
:placeholder="searchPlaceholder"
|
|
97
|
-
:size="size"
|
|
98
|
-
:disable-default-styles="true"
|
|
99
|
-
@click.stop
|
|
100
|
-
/>
|
|
101
|
-
</template>
|
|
102
|
-
|
|
103
|
-
<template v-else>
|
|
104
|
-
<div :class="['grow']" />
|
|
105
|
-
</template>
|
|
106
|
-
|
|
107
72
|
<div :class="['layout-inline-row', 'gap-sm']">
|
|
108
73
|
<template v-if="showClear">
|
|
109
74
|
<OrIconButton
|
|
110
75
|
:icon="'close'"
|
|
111
76
|
:color="'inherit'"
|
|
77
|
+
:additional-styles="['!text-outline', '!dark:text-outline-dark']"
|
|
112
78
|
:disabled="readonly || disabled"
|
|
113
79
|
@click.stop="$emit('update:modelValue', multiple ? [] : undefined)"
|
|
114
80
|
/>
|
|
115
81
|
</template>
|
|
116
82
|
|
|
117
83
|
<OrIcon
|
|
118
|
-
:icon="popoverState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'"
|
|
84
|
+
:icon="popoverState === 'open' ? enableSearch ? 'search' : 'arrow_drop_up' : 'arrow_drop_down'"
|
|
85
|
+
:class=" popoverState === 'open' && enableSearch ? '!text-outline !dark:text-outline-dark' : ''"
|
|
119
86
|
:variant="'outlined'"
|
|
120
87
|
/>
|
|
121
88
|
</div>
|
|
@@ -128,7 +95,6 @@
|
|
|
128
95
|
:full-width="true"
|
|
129
96
|
:custom-styles="dropdownStyles"
|
|
130
97
|
:disable-default-styles="true"
|
|
131
|
-
@close="clearSearchControl()"
|
|
132
98
|
>
|
|
133
99
|
<template v-if="popoverState === 'open' && enableSearch && isMobile">
|
|
134
100
|
<OrInput
|
|
@@ -136,7 +102,7 @@
|
|
|
136
102
|
v-model="searchText"
|
|
137
103
|
:class="searchControlStyles"
|
|
138
104
|
:type="'search'"
|
|
139
|
-
:placeholder="
|
|
105
|
+
:placeholder="placeholder"
|
|
140
106
|
/>
|
|
141
107
|
</template>
|
|
142
108
|
|
|
@@ -174,7 +140,7 @@
|
|
|
174
140
|
:key="i"
|
|
175
141
|
:class="dropdownItemStyles"
|
|
176
142
|
:selected="proxyModelValue === option.value"
|
|
177
|
-
@click.stop="
|
|
143
|
+
@click.stop="toggleOption(option.value)"
|
|
178
144
|
>
|
|
179
145
|
<slot
|
|
180
146
|
name="optionTemplate"
|
|
@@ -194,18 +160,22 @@
|
|
|
194
160
|
v-for="(option, i) in resolvedSearchOptions"
|
|
195
161
|
:key="i"
|
|
196
162
|
:selected="proxyModelValue && proxyModelValue.includes(option.value)"
|
|
163
|
+
@click.stop="toggleOption(option.value)"
|
|
197
164
|
>
|
|
198
165
|
<OrCheckbox
|
|
199
|
-
|
|
166
|
+
:model-value="proxyModelValue"
|
|
200
167
|
:value="option.value"
|
|
201
|
-
:label="option.label"
|
|
202
168
|
:label-variant="'menu-item'"
|
|
203
169
|
>
|
|
204
|
-
<
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
170
|
+
<div @click="toggleOption(option.value)">
|
|
171
|
+
<slot
|
|
172
|
+
name="optionTemplate"
|
|
173
|
+
:model="proxyModelValue"
|
|
174
|
+
:option="option"
|
|
175
|
+
>
|
|
176
|
+
{{ option.label }}
|
|
177
|
+
</slot>
|
|
178
|
+
</div>
|
|
209
179
|
</OrCheckbox>
|
|
210
180
|
</OrMenuItem>
|
|
211
181
|
</template>
|
|
@@ -216,7 +186,7 @@
|
|
|
216
186
|
:key="i"
|
|
217
187
|
:class="dropdownItemStyles"
|
|
218
188
|
:selected="proxyModelValue === option.value"
|
|
219
|
-
@click.stop="
|
|
189
|
+
@click.stop="toggleOption(option.value);"
|
|
220
190
|
>
|
|
221
191
|
<slot
|
|
222
192
|
name="optionTemplate"
|
|
@@ -265,8 +235,8 @@
|
|
|
265
235
|
<script lang="ts">
|
|
266
236
|
import { computed, defineComponent, getCurrentInstance, onMounted, PropType, ref, toRefs, watch } from 'vue-demi';
|
|
267
237
|
import { DropdownClose, DropdownOpen } from '../../directives';
|
|
268
|
-
import {
|
|
269
|
-
import { isEmptyValue } from '../../utils
|
|
238
|
+
import { useProxyModelValue, useResponsive } from '../../hooks';
|
|
239
|
+
import { isEmptyValue } from '../../utils';
|
|
270
240
|
import { OrCheckboxV3 as OrCheckbox } from '../or-checkbox-v3';
|
|
271
241
|
import { OrErrorV3 as OrError } from '../or-error-v3';
|
|
272
242
|
import { OrExpansionPanelV3 as OrExpansionPanel } from '../or-expansion-panel-v3';
|
|
@@ -278,14 +248,16 @@ import { OrInputV3 as OrInput } from '../or-input-v3';
|
|
|
278
248
|
import { OrLabelV3 as OrLabel } from '../or-label-v3';
|
|
279
249
|
import { OrMenuItemV3 as OrMenuItem } from '../or-menu-item-v3';
|
|
280
250
|
import { OrPopoverV3 as OrPopover } from '../or-popover-v3';
|
|
281
|
-
import { OrTagV3 as OrTag } from '../or-tag-v3';
|
|
282
|
-
import OrSelectPlaceholder from './partials/or-select-placeholder/OrSelectPlaceholder.vue';
|
|
283
251
|
import { SelectSize } from './props';
|
|
284
252
|
import { Select, SelectControl, SelectDropdown, SelectDropdownDefault, SelectDropdownFlipped, SelectDropdownItem, SelectNoSearchResults, SelectSearchControl } from './styles';
|
|
285
|
-
import { SelectGroupByFunction, SelectOption, SelectSearchFunction } from './types';
|
|
253
|
+
import { SelectGroupByFunction, SelectOption, SelectSearchFunction, SelectValue } from './types';
|
|
254
|
+
import { TagsOverflow } from '../or-tags-v3';
|
|
255
|
+
import { OrSelectMultipleControl, OrSelectSingleControl } from './partials';
|
|
286
256
|
|
|
287
257
|
export default defineComponent({
|
|
288
258
|
components: {
|
|
259
|
+
OrSelectMultipleControl,
|
|
260
|
+
OrSelectSingleControl,
|
|
289
261
|
OrCheckbox,
|
|
290
262
|
OrError,
|
|
291
263
|
OrExpansionPanel,
|
|
@@ -297,8 +269,6 @@ export default defineComponent({
|
|
|
297
269
|
OrLabel,
|
|
298
270
|
OrMenuItem,
|
|
299
271
|
OrPopover,
|
|
300
|
-
OrSelectPlaceholder,
|
|
301
|
-
OrTag,
|
|
302
272
|
},
|
|
303
273
|
|
|
304
274
|
directives: {
|
|
@@ -323,7 +293,7 @@ export default defineComponent({
|
|
|
323
293
|
},
|
|
324
294
|
|
|
325
295
|
modelValue: {
|
|
326
|
-
type: [Object, String, Number, Array] as PropType<
|
|
296
|
+
type: [Object, String, Number, Array] as PropType<SelectValue>,
|
|
327
297
|
default: undefined,
|
|
328
298
|
},
|
|
329
299
|
|
|
@@ -347,11 +317,6 @@ export default defineComponent({
|
|
|
347
317
|
default: undefined,
|
|
348
318
|
},
|
|
349
319
|
|
|
350
|
-
searchPlaceholder: {
|
|
351
|
-
type: String,
|
|
352
|
-
default: undefined,
|
|
353
|
-
},
|
|
354
|
-
|
|
355
320
|
hint: {
|
|
356
321
|
type: String,
|
|
357
322
|
default: undefined,
|
|
@@ -404,6 +369,11 @@ export default defineComponent({
|
|
|
404
369
|
type: Boolean,
|
|
405
370
|
default: false,
|
|
406
371
|
},
|
|
372
|
+
|
|
373
|
+
overflow: {
|
|
374
|
+
type: String as PropType<`${TagsOverflow}`>,
|
|
375
|
+
default: TagsOverflow.Hidden,
|
|
376
|
+
},
|
|
407
377
|
},
|
|
408
378
|
|
|
409
379
|
emits: [
|
|
@@ -429,7 +399,8 @@ export default defineComponent({
|
|
|
429
399
|
const inputBoxRoot = computed(() => inputBox.value?.root);
|
|
430
400
|
|
|
431
401
|
const control = ref<HTMLElement>();
|
|
432
|
-
|
|
402
|
+
const multipleControl = ref<InstanceType<typeof OrSelectMultipleControl>>();
|
|
403
|
+
const singleControl = ref<InstanceType<typeof OrSelectSingleControl>>();
|
|
433
404
|
const searchControl = ref<HTMLElement>();
|
|
434
405
|
|
|
435
406
|
const popover = ref<InstanceType<typeof OrPopover>>();
|
|
@@ -437,7 +408,7 @@ export default defineComponent({
|
|
|
437
408
|
const popoverState = computed(() => popover.value?.state);
|
|
438
409
|
|
|
439
410
|
// Props
|
|
440
|
-
const { enableClear, modelValue } = toRefs(props);
|
|
411
|
+
const { enableClear, enableSearch, modelValue, multiple } = toRefs(props);
|
|
441
412
|
|
|
442
413
|
// Styles
|
|
443
414
|
const rootStyles = computed(() => [
|
|
@@ -487,20 +458,16 @@ export default defineComponent({
|
|
|
487
458
|
}
|
|
488
459
|
});
|
|
489
460
|
|
|
490
|
-
const
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
if (Array.isArray(modelValue)) {
|
|
496
|
-
return modelValue
|
|
497
|
-
.map((value) => props.options.find((option) => option.value === value))
|
|
498
|
-
.filter((value) => !!value);
|
|
461
|
+
const focused = computed(() => {
|
|
462
|
+
if (multiple.value) {
|
|
463
|
+
return multipleControl.value?.focused;
|
|
464
|
+
} else {
|
|
465
|
+
return singleControl.value?.focused;
|
|
499
466
|
}
|
|
500
|
-
|
|
501
|
-
return props.options.find((option) => option.value === modelValue);
|
|
502
467
|
});
|
|
503
468
|
|
|
469
|
+
const readonly = computed(() => context.attrs.readonly as boolean);
|
|
470
|
+
|
|
504
471
|
const internalSearchOptions = ref<SelectOption[]>(props.options);
|
|
505
472
|
|
|
506
473
|
const resolvedSearchOptions = computed(() => {
|
|
@@ -549,15 +516,23 @@ export default defineComponent({
|
|
|
549
516
|
const popoverInstance = popover.value;
|
|
550
517
|
|
|
551
518
|
if (popoverInstance) {
|
|
552
|
-
if (popoverState.value === 'open') {
|
|
553
|
-
|
|
519
|
+
if (popoverState.value === 'open' && !focused.value) {
|
|
520
|
+
close();
|
|
554
521
|
} else {
|
|
555
|
-
|
|
522
|
+
open();
|
|
523
|
+
focus();
|
|
556
524
|
}
|
|
557
525
|
}
|
|
558
526
|
}
|
|
559
527
|
}
|
|
560
528
|
|
|
529
|
+
function open(): void {
|
|
530
|
+
const popoverInstance = popover.value;
|
|
531
|
+
|
|
532
|
+
if (popoverInstance) {
|
|
533
|
+
(popoverInstance.open as () => void)();
|
|
534
|
+
}
|
|
535
|
+
}
|
|
561
536
|
function close(): void {
|
|
562
537
|
const popoverInstance = popover.value;
|
|
563
538
|
|
|
@@ -566,35 +541,53 @@ export default defineComponent({
|
|
|
566
541
|
}
|
|
567
542
|
}
|
|
568
543
|
|
|
569
|
-
function
|
|
544
|
+
function focus(): void {
|
|
545
|
+
if (enableSearch.value) {
|
|
546
|
+
const controlInstance = multiple.value ? multipleControl.value : singleControl.value;
|
|
547
|
+
if (controlInstance) {
|
|
548
|
+
(controlInstance.focus as () => void)();
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
function deselect(option: string): void {
|
|
570
554
|
const modelValue = proxyModelValue.value;
|
|
571
555
|
|
|
572
556
|
if (Array.isArray(modelValue)) {
|
|
573
|
-
proxyModelValue.value = modelValue.filter((value) => value !== option
|
|
557
|
+
proxyModelValue.value = modelValue.filter((value) => value !== option);
|
|
574
558
|
}
|
|
575
559
|
}
|
|
576
560
|
|
|
561
|
+
function toggleOption(option: string): void {
|
|
562
|
+
const modelValue = proxyModelValue.value;
|
|
563
|
+
|
|
564
|
+
if (Array.isArray(modelValue)) {
|
|
565
|
+
if (modelValue.includes(option)) {
|
|
566
|
+
deselect(option);
|
|
567
|
+
} else {
|
|
568
|
+
proxyModelValue.value = [...modelValue, option];
|
|
569
|
+
}
|
|
570
|
+
} else {
|
|
571
|
+
proxyModelValue.value = option;
|
|
572
|
+
}
|
|
573
|
+
clearSearchControl();
|
|
574
|
+
}
|
|
575
|
+
|
|
577
576
|
function clearSearchControl(): void {
|
|
578
577
|
searchText.value = '';
|
|
579
578
|
}
|
|
580
579
|
|
|
581
|
-
const { innerItems, outerItems } = useOverflow(control);
|
|
582
|
-
|
|
583
580
|
// Utils
|
|
584
581
|
const { isDesktop, isMobile } = useResponsive();
|
|
585
582
|
|
|
586
|
-
// Effects
|
|
587
|
-
watch(searchControl, (control) => {
|
|
588
|
-
setTimeout(() => {
|
|
589
|
-
control?.focus();
|
|
590
|
-
});
|
|
591
|
-
});
|
|
592
583
|
|
|
593
584
|
return {
|
|
594
585
|
root,
|
|
595
586
|
inputBox,
|
|
596
587
|
inputBoxRoot,
|
|
597
588
|
control,
|
|
589
|
+
multipleControl,
|
|
590
|
+
singleControl,
|
|
598
591
|
searchControl,
|
|
599
592
|
popover,
|
|
600
593
|
popoverRoot,
|
|
@@ -610,17 +603,16 @@ export default defineComponent({
|
|
|
610
603
|
readonly,
|
|
611
604
|
isEmptyModelValue,
|
|
612
605
|
showClear,
|
|
613
|
-
selection,
|
|
614
606
|
searchText,
|
|
615
607
|
internalSearchOptions,
|
|
616
608
|
resolvedSearchOptions,
|
|
617
609
|
groupedOptions,
|
|
618
610
|
toggle,
|
|
619
611
|
close,
|
|
612
|
+
open,
|
|
620
613
|
deselect,
|
|
614
|
+
toggleOption,
|
|
621
615
|
clearSearchControl,
|
|
622
|
-
innerItems,
|
|
623
|
-
outerItems,
|
|
624
616
|
isDesktop,
|
|
625
617
|
isMobile,
|
|
626
618
|
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<input
|
|
3
|
+
ref="root"
|
|
4
|
+
v-model="proxyModelValue"
|
|
5
|
+
:style="controlInlineStyles"
|
|
6
|
+
:class="controlStyles"
|
|
7
|
+
:type="'text'"
|
|
8
|
+
:placeholder="placeholder"
|
|
9
|
+
:readonly="readonly"
|
|
10
|
+
:disabled="disabled"
|
|
11
|
+
:autocomplete="'off'"
|
|
12
|
+
:minlength="undefined"
|
|
13
|
+
:maxlength="undefined"
|
|
14
|
+
>
|
|
15
|
+
</template>
|
|
16
|
+
<script lang="ts">
|
|
17
|
+
import { computed, defineComponent, toRefs, ref } from 'vue-demi';
|
|
18
|
+
import { useProxyModelValue } from '../../../../hooks';
|
|
19
|
+
import { SelectControlInput } from './styles';
|
|
20
|
+
import { useFocus } from '@vueuse/core';
|
|
21
|
+
|
|
22
|
+
export default defineComponent({
|
|
23
|
+
model: {
|
|
24
|
+
prop: 'modelValue',
|
|
25
|
+
event: 'update:modelValue',
|
|
26
|
+
},
|
|
27
|
+
props: {
|
|
28
|
+
modelValue: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: '',
|
|
31
|
+
},
|
|
32
|
+
placeholder: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: '',
|
|
35
|
+
},
|
|
36
|
+
disabled: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false,
|
|
39
|
+
},
|
|
40
|
+
readonly: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: false,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
emits: ['update:modelValue'],
|
|
46
|
+
expose: ['focused', 'root', 'focus'],
|
|
47
|
+
setup(props, context) {
|
|
48
|
+
// Refs
|
|
49
|
+
const root = ref<HTMLInputElement>();
|
|
50
|
+
|
|
51
|
+
// Props
|
|
52
|
+
const { placeholder, modelValue } = toRefs(props);
|
|
53
|
+
|
|
54
|
+
// State
|
|
55
|
+
const proxyModelValue = useProxyModelValue(modelValue, context.emit);
|
|
56
|
+
const { focused } = useFocus(root);
|
|
57
|
+
|
|
58
|
+
// Styles
|
|
59
|
+
const controlStyles = computed(() => [
|
|
60
|
+
...SelectControlInput,
|
|
61
|
+
]);
|
|
62
|
+
|
|
63
|
+
const controlInlineStyles = computed(() => {
|
|
64
|
+
const chars = proxyModelValue.value.length > 0
|
|
65
|
+
? proxyModelValue.value.length
|
|
66
|
+
: placeholder.value?.length;
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
width: `${Math.max(chars + 1 || 0, 2)}ch`,
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
// Methods
|
|
74
|
+
function focus() {
|
|
75
|
+
focused.value = true;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return {
|
|
79
|
+
root,
|
|
80
|
+
proxyModelValue,
|
|
81
|
+
controlStyles,
|
|
82
|
+
controlInlineStyles,
|
|
83
|
+
focused,
|
|
84
|
+
focus,
|
|
85
|
+
};
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
</script>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as OrSelectControlInput } from './OrSelectControlInput.vue';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const SelectControlInput: string[] = [
|
|
2
|
+
// Base
|
|
3
|
+
'appearance-none',
|
|
4
|
+
|
|
5
|
+
// Typography
|
|
6
|
+
'typography-inherit',
|
|
7
|
+
|
|
8
|
+
// Theme (placeholder)
|
|
9
|
+
'placeholder:theme-foreground-outline',
|
|
10
|
+
'dark:placeholder:theme-foreground-outline-dark',
|
|
11
|
+
'theme-background-transparent',
|
|
12
|
+
'outline-none',
|
|
13
|
+
];
|
package/src/components/or-select-v3/partials/or-select-multiple-control/OrSelectMultipleControl.vue
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
ref="root"
|
|
4
|
+
:class="rootStyles"
|
|
5
|
+
>
|
|
6
|
+
<OrTags
|
|
7
|
+
v-show="!isEmpty || enableSearch"
|
|
8
|
+
ref="tags"
|
|
9
|
+
:items="selection"
|
|
10
|
+
class="grow"
|
|
11
|
+
:disabled="disabled"
|
|
12
|
+
:tag-props="{
|
|
13
|
+
variant: readonly || disabled ? 'tag' : 'reset',
|
|
14
|
+
disabled: disabled
|
|
15
|
+
}"
|
|
16
|
+
:overflow="overflow"
|
|
17
|
+
@reset="$emit('reset', $event)"
|
|
18
|
+
>
|
|
19
|
+
<template
|
|
20
|
+
v-if="enableSearch"
|
|
21
|
+
v-slot:tail
|
|
22
|
+
>
|
|
23
|
+
<div class="inline-flex w-fit max-w-full">
|
|
24
|
+
<OrSelectControlInput
|
|
25
|
+
ref="searchControl"
|
|
26
|
+
v-model="searchModelValue"
|
|
27
|
+
:placeholder="isEmpty ? placeholder: ''"
|
|
28
|
+
:readonly="readonly"
|
|
29
|
+
:disabled="disabled"
|
|
30
|
+
/>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
</OrTags>
|
|
34
|
+
<template v-if="isEmpty && !enableSearch">
|
|
35
|
+
<OrSelectPlaceholder :disabled="disabled">
|
|
36
|
+
{{ placeholder }}
|
|
37
|
+
</OrSelectPlaceholder>
|
|
38
|
+
</template>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
41
|
+
<script lang="ts">
|
|
42
|
+
import { defineComponent, PropType, ref, toRefs, computed, watch } from 'vue-demi';
|
|
43
|
+
import { useProxyModelValue } from '../../../../hooks';
|
|
44
|
+
import { OrTagsV3 as OrTags, TagsOverflow } from '../../../or-tags-v3';
|
|
45
|
+
import { SelectOption, SelectValue } from '../../types';
|
|
46
|
+
import OrSelectPlaceholder from '../or-select-placeholder/OrSelectPlaceholder.vue';
|
|
47
|
+
import { castToMultipleValue } from './utils/castToMultipleModel';
|
|
48
|
+
import { OrSelectControlInput } from '../or-select-control-input';
|
|
49
|
+
import { SelectMultipleControlRoot } from './styles';
|
|
50
|
+
|
|
51
|
+
export default defineComponent({
|
|
52
|
+
components: {
|
|
53
|
+
OrSelectPlaceholder,
|
|
54
|
+
OrSelectControlInput,
|
|
55
|
+
OrTags,
|
|
56
|
+
},
|
|
57
|
+
model: {
|
|
58
|
+
prop: 'modelValue',
|
|
59
|
+
event: 'update:modelValue',
|
|
60
|
+
},
|
|
61
|
+
props: {
|
|
62
|
+
model: {
|
|
63
|
+
type: [Object, String, Number, Array] as PropType<SelectValue>,
|
|
64
|
+
default: () => [],
|
|
65
|
+
},
|
|
66
|
+
options: {
|
|
67
|
+
type: Array as PropType<SelectOption[]>,
|
|
68
|
+
default: () => [],
|
|
69
|
+
},
|
|
70
|
+
disabled: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: false,
|
|
73
|
+
},
|
|
74
|
+
readonly: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: false,
|
|
77
|
+
},
|
|
78
|
+
placeholder: {
|
|
79
|
+
type: String,
|
|
80
|
+
default: '',
|
|
81
|
+
},
|
|
82
|
+
enableSearch: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
default: false,
|
|
85
|
+
},
|
|
86
|
+
overflow: {
|
|
87
|
+
type: String as PropType<`${TagsOverflow}`>,
|
|
88
|
+
default: TagsOverflow.Hidden,
|
|
89
|
+
},
|
|
90
|
+
modelValue: {
|
|
91
|
+
type: String,
|
|
92
|
+
default: '',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
emits: ['reset', 'update:modelValue'],
|
|
96
|
+
expose: ['focus', 'root', 'focused'],
|
|
97
|
+
setup(props, context) {
|
|
98
|
+
// Refs
|
|
99
|
+
const root = ref<HTMLDivElement>();
|
|
100
|
+
|
|
101
|
+
const searchControl = ref<InstanceType<typeof OrSelectControlInput>>();
|
|
102
|
+
const tags = ref<InstanceType<typeof OrTags>>();
|
|
103
|
+
// Props
|
|
104
|
+
const { modelValue, model, options, overflow } = toRefs(props);
|
|
105
|
+
|
|
106
|
+
// State
|
|
107
|
+
const searchModelValue = useProxyModelValue(modelValue, context.emit);
|
|
108
|
+
|
|
109
|
+
const focused = computed(() => {
|
|
110
|
+
return searchControl.value?.focused;
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
// Styles
|
|
115
|
+
const rootStyles = computed(() => [
|
|
116
|
+
'or-select-multiple-control-v3',
|
|
117
|
+
...SelectMultipleControlRoot,
|
|
118
|
+
]);
|
|
119
|
+
|
|
120
|
+
// Computed
|
|
121
|
+
const value = computed(() => castToMultipleValue(model.value));
|
|
122
|
+
const isEmpty = computed(() => value.value.length === 0);
|
|
123
|
+
|
|
124
|
+
const selection = computed(() => {
|
|
125
|
+
if (model.value === undefined || model.value === null) {
|
|
126
|
+
return [];
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return value.value
|
|
130
|
+
.map((value) => options.value.find((option) => option.value === value))
|
|
131
|
+
.filter((value) => !!value) as SelectOption[];
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
watch(selection, (items, prevItems) => {
|
|
135
|
+
if (items.length != prevItems.length && overflow.value === TagsOverflow.Scroll && tags.value) {
|
|
136
|
+
(tags.value.scrollToEnd as () => void)();
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
// Methods
|
|
141
|
+
function focus(): void {
|
|
142
|
+
if (searchControl.value) {
|
|
143
|
+
(searchControl.value.focus as () => void)();
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return {
|
|
148
|
+
root,
|
|
149
|
+
tags,
|
|
150
|
+
rootStyles,
|
|
151
|
+
searchControl,
|
|
152
|
+
searchModelValue,
|
|
153
|
+
isEmpty,
|
|
154
|
+
selection,
|
|
155
|
+
value,
|
|
156
|
+
focus,
|
|
157
|
+
focused,
|
|
158
|
+
};
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
</script>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as OrSelectMultipleControl } from './OrSelectMultipleControl.vue';
|