@uzum-tech/ui 2.3.2 → 2.3.4
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/index.js +29612 -29062
- package/dist/index.mjs +29877 -29327
- package/dist/index.prod.js +2 -2
- package/dist/index.prod.mjs +2 -2
- package/es/_internal/checkbox/src/use-checkbox.d.ts +2 -2
- package/es/_internal/close/src/Close.d.ts +1 -1
- package/es/_internal/fade-in-expand-transition/src/FadeInExpandTransition.d.ts +1 -1
- package/es/_internal/select-menu/src/SelectMenu.d.ts +1039 -169
- package/es/_internal/select-menu/src/SelectMenu.mjs +56 -204
- package/es/_internal/select-menu/src/SelectMenuParts/Action.d.ts +15 -0
- package/es/_internal/select-menu/src/SelectMenuParts/Action.mjs +28 -0
- package/es/_internal/select-menu/src/SelectMenuParts/Header.d.ts +12 -0
- package/es/_internal/select-menu/src/SelectMenuParts/Header.mjs +22 -0
- package/es/_internal/select-menu/src/SelectMenuParts/List.d.ts +129 -0
- package/es/_internal/select-menu/src/SelectMenuParts/List.mjs +196 -0
- package/es/_internal/select-menu/src/SelectMenuParts/Search.d.ts +90 -0
- package/es/_internal/select-menu/src/SelectMenuParts/Search.mjs +69 -0
- package/es/_internal/select-menu/src/SelectOption.d.ts +1 -0
- package/es/_internal/select-menu/src/SelectOption.mjs +17 -2
- package/es/_internal/select-menu/src/interface.d.ts +650 -2
- package/es/_internal/select-menu/src/interface.mjs +81 -0
- package/es/_internal/select-menu/src/styles/index.cssr.mjs +23 -1
- package/es/_internal/select-menu/styles/dark.mjs +5 -1
- package/es/_internal/select-menu/styles/light.d.ts +123 -0
- package/es/_internal/select-menu/styles/light.mjs +5 -1
- package/es/_internal/selection/src/Selection.d.ts +3 -3
- package/es/_internal/skeleton/src/Skeleton.d.ts +1 -1
- package/es/_internal/typography/src/text.d.ts +3 -3
- package/es/action-card/src/ActionCard.d.ts +2 -2
- package/es/affix/src/Affix.d.ts +1 -1
- package/es/alert/src/Alert.d.ts +1 -1
- package/es/anchor/src/AnchorAdapter.d.ts +1 -1
- package/es/anchor/src/BaseAnchor.d.ts +2 -2
- package/es/auto-complete/src/AutoComplete.d.ts +1386 -30
- package/es/auto-complete/styles/light.d.ts +123 -0
- package/es/avatar/src/Avatar.d.ts +1 -1
- package/es/avatar-group/src/AvatarGroup.d.ts +2 -2
- package/es/back-top/src/BackTop.d.ts +1 -1
- package/es/badge/src/Badge.d.ts +1 -1
- package/es/button/src/Button.d.ts +7 -7
- package/es/button-group/src/ButtonGroup.d.ts +1 -1
- package/es/card/src/Card.d.ts +1 -1
- package/es/card-list/src/CardListItem.d.ts +1 -1
- package/es/carousel/src/Carousel.d.ts +4 -4
- package/es/carousel/src/CarouselDots.d.ts +2 -2
- package/es/cascader/src/Cascader.d.ts +1404 -51
- package/es/cascader/src/CascaderMenu.d.ts +492 -0
- package/es/cascader/src/CascaderOption.d.ts +492 -0
- package/es/cascader/src/CascaderSelectMenu.d.ts +496 -1
- package/es/cascader/src/CascaderSubmenu.d.ts +492 -0
- package/es/cascader/styles/light.d.ts +123 -0
- package/es/chat/src/Chat.d.ts +5921 -2897
- package/es/chat/src/Chat.mjs +13 -240
- package/es/chat/src/ChatListItems.d.ts +1875 -30
- package/es/chat/src/ChatMainArea.d.ts +1925 -54
- package/es/chat/src/ChatMainArea.mjs +49 -3
- package/es/chat/src/ChatMessages.d.ts +1874 -29
- package/es/chat/src/ChatParts/Sidebar.d.ts +492 -0
- package/es/chat/src/interface.d.ts +2814 -2
- package/es/chat/src/interface.mjs +244 -1
- package/es/chat/styles/dark.d.ts +123 -0
- package/es/chat/styles/light.d.ts +123 -0
- package/es/checkbox/src/Checkbox.d.ts +7 -7
- package/es/checkbox/src/CheckboxGroup.d.ts +1 -1
- package/es/code/src/Code.d.ts +2 -2
- package/es/color-picker/src/ColorPicker.d.ts +1 -1
- package/es/color-picker/src/ColorPickerTrigger.d.ts +1 -1
- package/es/components.d.ts +19428 -602
- package/es/config-provider/src/ConfigProvider.d.ts +1 -1
- package/es/config-provider/src/context.mjs +1 -1
- package/es/crop/src/Crop.d.ts +1 -1
- package/es/data-table/src/DataTable.d.ts +2087 -119
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +984 -0
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +984 -0
- package/es/data-table/src/TableParts/Body.d.ts +985 -1
- package/es/data-table/src/TableParts/Header.d.ts +985 -1
- package/es/data-table/src/interface.d.ts +738 -0
- package/es/data-table/styles/light.d.ts +246 -0
- package/es/date-picker/src/DatePicker.d.ts +3 -3
- package/es/date-picker-v2/src/DatePickerV2.d.ts +2 -2
- package/es/descriptions/src/Descriptions.d.ts +2 -2
- package/es/dialog/src/Dialog.d.ts +1 -1
- package/es/dialog/src/DialogEnvironment.d.ts +1 -1
- package/es/dialog/src/DialogProvider.d.ts +52 -52
- package/es/dialog/src/dialogProps.d.ts +1 -1
- package/es/divider/src/Divider.d.ts +1 -1
- package/es/drawer/src/Drawer.d.ts +2 -2
- package/es/dropdown/src/Dropdown.d.ts +4 -4
- package/es/dynamic-input/src/DynamicInput.d.ts +2 -2
- package/es/dynamic-input/src/InputPreset.d.ts +1 -1
- package/es/dynamic-input/src/PairPreset.d.ts +1 -1
- package/es/dynamic-tags/src/DynamicTags.d.ts +2 -2
- package/es/empty/src/Empty.d.ts +1 -1
- package/es/flex/src/Flex.d.ts +1 -1
- package/es/float-button/src/FloatButton.d.ts +1 -1
- package/es/form/src/Form.d.ts +1 -1
- package/es/form/src/FormItem.d.ts +3 -3
- package/es/form/src/FormItemCol.d.ts +3 -3
- package/es/form/src/FormItemGridItem.d.ts +3 -3
- package/es/form/src/FormItemRow.d.ts +2 -2
- package/es/form/src/utils.d.ts +1 -1
- package/es/gradient-text/src/GradientText.d.ts +2 -2
- package/es/header/src/Header.d.ts +1 -1
- package/es/header/src/mobile/HeaderMobile.d.ts +1 -1
- package/es/heatmap/src/Heatmap.d.ts +1 -1
- package/es/icon-bar/src/IconBarItem.d.ts +4 -4
- package/es/icon-pack/src/IconPack.d.ts +2 -2
- package/es/image/src/Image.d.ts +1 -1
- package/es/input/src/Input.d.ts +7 -7
- package/es/input-number/src/InputNumber.d.ts +3 -3
- package/es/input-otp/src/InputOtp.d.ts +2 -2
- package/es/kanban/src/Kanban.d.ts +1 -1
- package/es/layout/src/LayoutSider.d.ts +1 -1
- package/es/legacy-transfer/src/Transfer.d.ts +2 -2
- package/es/list/src/List.d.ts +9 -9
- package/es/list/src/ListItem.d.ts +10 -10
- package/es/locales/common/enUS.d.ts +1 -0
- package/es/locales/common/enUS.mjs +2 -1
- package/es/locales/common/ruRU.mjs +2 -1
- package/es/locales/common/uzUZ.mjs +2 -1
- package/es/locales/common/zhCN.mjs +2 -1
- package/es/mention/src/Mention.d.ts +1388 -32
- package/es/mention/styles/light.d.ts +123 -0
- package/es/menu/src/Menu.d.ts +3 -3
- package/es/menu/src/MenuOption.d.ts +1 -1
- package/es/menu/src/MenuOptionContent.d.ts +2 -2
- package/es/menu/src/MenuOptionGroup.d.ts +1 -1
- package/es/menu/src/Submenu.d.ts +1 -1
- package/es/message-bubble/src/MessageBubble.d.ts +3 -3
- package/es/modal/src/BodyWrapper.d.ts +2 -2
- package/es/modal/src/Modal.d.ts +4 -4
- package/es/modal/src/ModalEnvironment.d.ts +4 -4
- package/es/modal/src/presetProps.d.ts +1 -1
- package/es/modal-fullscreen/src/ModalFull.d.ts +1 -1
- package/es/notification/src/Notification.d.ts +2 -2
- package/es/notification/src/NotificationEnvironment.d.ts +1 -1
- package/es/notification/src/NotificationProvider.d.ts +12 -12
- package/es/number-animation/src/NumberAnimation.d.ts +1 -1
- package/es/pagination/src/Pagination.d.ts +1995 -27
- package/es/pagination/src/interface.d.ts +738 -0
- package/es/pagination/styles/light.d.ts +246 -0
- package/es/popconfirm/src/Popconfirm.d.ts +3 -3
- package/es/popover/src/Popover.d.ts +3 -3
- package/es/popover/src/PopoverBody.d.ts +1 -1
- package/es/popselect/src/Popselect.d.ts +1383 -30
- package/es/popselect/src/PopselectPanel.d.ts +494 -2
- package/es/popselect/styles/light.d.ts +123 -0
- package/es/qr-code/src/QrCode.d.ts +2 -2
- package/es/radio/src/Radio.d.ts +2 -2
- package/es/radio/src/RadioButton.d.ts +9 -9
- package/es/radio/src/RadioGroup.d.ts +1 -1
- package/es/rate/src/Rate.d.ts +1 -1
- package/es/result/src/Result.d.ts +1 -1
- package/es/select/index.d.ts +4 -3
- package/es/select/index.mjs +2 -1
- package/es/select/src/Select.d.ts +1127 -811
- package/es/select/src/Select.mjs +257 -226
- package/es/select/src/interface.d.ts +1140 -8
- package/es/select/src/interface.mjs +154 -1
- package/es/select/src/styles/index.cssr.mjs +16 -3
- package/es/select/src/utils.d.ts +3 -1
- package/es/select/src/utils.mjs +32 -0
- package/es/select/styles/light.d.ts +123 -0
- package/es/skeleton/src/Skeleton.d.ts +1 -1
- package/es/slider/src/Slider.d.ts +4 -4
- package/es/spin/src/Spin.d.ts +1 -1
- package/es/split/src/Split.d.ts +2 -2
- package/es/steps/src/Steps.d.ts +1 -1
- package/es/switch/src/Switch.d.ts +2 -2
- package/es/tabs/src/Tab.d.ts +8 -8
- package/es/tabs/src/TabPane.d.ts +1 -1
- package/es/tabs/src/Tabs.d.ts +1 -1
- package/es/tag/src/Tag.d.ts +4 -4
- package/es/tag/src/TagGroup.d.ts +2 -2
- package/es/time-picker/src/Panel.d.ts +1 -1
- package/es/time-picker/src/TimePicker.d.ts +3 -3
- package/es/timeline/src/Timeline.d.ts +1 -1
- package/es/timeline/src/TimelineItem.d.ts +1 -1
- package/es/toggle-button/src/ToggleButton.d.ts +8 -8
- package/es/tooltip/src/Tooltip.d.ts +3 -3
- package/es/transfer/src/Transfer.d.ts +2 -2
- package/es/tree/src/Tree.d.ts +2 -2
- package/es/tree/src/TreeNodeCheckbox.d.ts +1 -1
- package/es/tree/src/TreeNodeContent.d.ts +1 -1
- package/es/tree-select/src/TreeSelect.d.ts +4 -4
- package/es/typography/src/create-header.d.ts +1 -1
- package/es/typography/src/headers.d.ts +6 -6
- package/es/typography/src/text.d.ts +5 -5
- package/es/upload/src/Upload.d.ts +3 -3
- package/es/upload/src/UploadFile.d.ts +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/virtual-list/src/VirtualList.d.ts +2 -2
- package/es/watermark/src/Watermark.d.ts +2 -2
- package/lib/_internal/checkbox/src/use-checkbox.d.ts +2 -2
- package/lib/_internal/close/src/Close.d.ts +1 -1
- package/lib/_internal/fade-in-expand-transition/src/FadeInExpandTransition.d.ts +1 -1
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +1039 -169
- package/lib/_internal/select-menu/src/SelectMenu.js +29 -109
- package/lib/_internal/select-menu/src/SelectMenuParts/Action.d.ts +15 -0
- package/lib/_internal/select-menu/src/SelectMenuParts/Action.js +25 -0
- package/lib/_internal/select-menu/src/SelectMenuParts/Header.d.ts +12 -0
- package/lib/_internal/select-menu/src/SelectMenuParts/Header.js +17 -0
- package/lib/_internal/select-menu/src/SelectMenuParts/List.d.ts +129 -0
- package/lib/_internal/select-menu/src/SelectMenuParts/List.js +134 -0
- package/lib/_internal/select-menu/src/SelectMenuParts/Search.d.ts +90 -0
- package/lib/_internal/select-menu/src/SelectMenuParts/Search.js +52 -0
- package/lib/_internal/select-menu/src/SelectOption.d.ts +1 -0
- package/lib/_internal/select-menu/src/SelectOption.js +13 -4
- package/lib/_internal/select-menu/src/interface.d.ts +650 -2
- package/lib/_internal/select-menu/src/interface.js +46 -1
- package/lib/_internal/select-menu/src/styles/index.cssr.js +23 -1
- package/lib/_internal/select-menu/styles/dark.js +8 -4
- package/lib/_internal/select-menu/styles/light.d.ts +123 -0
- package/lib/_internal/select-menu/styles/light.js +8 -4
- package/lib/_internal/selection/src/Selection.d.ts +3 -3
- package/lib/_internal/skeleton/src/Skeleton.d.ts +1 -1
- package/lib/_internal/typography/src/text.d.ts +3 -3
- package/lib/action-card/src/ActionCard.d.ts +2 -2
- package/lib/affix/src/Affix.d.ts +1 -1
- package/lib/alert/src/Alert.d.ts +1 -1
- package/lib/anchor/src/AnchorAdapter.d.ts +1 -1
- package/lib/anchor/src/BaseAnchor.d.ts +2 -2
- package/lib/auto-complete/src/AutoComplete.d.ts +1386 -30
- package/lib/auto-complete/styles/light.d.ts +123 -0
- package/lib/avatar/src/Avatar.d.ts +1 -1
- package/lib/avatar-group/src/AvatarGroup.d.ts +2 -2
- package/lib/back-top/src/BackTop.d.ts +1 -1
- package/lib/badge/src/Badge.d.ts +1 -1
- package/lib/button/src/Button.d.ts +7 -7
- package/lib/button-group/src/ButtonGroup.d.ts +1 -1
- package/lib/card/src/Card.d.ts +1 -1
- package/lib/card-list/src/CardListItem.d.ts +1 -1
- package/lib/carousel/src/Carousel.d.ts +4 -4
- package/lib/carousel/src/CarouselDots.d.ts +2 -2
- package/lib/cascader/src/Cascader.d.ts +1404 -51
- package/lib/cascader/src/CascaderMenu.d.ts +492 -0
- package/lib/cascader/src/CascaderOption.d.ts +492 -0
- package/lib/cascader/src/CascaderSelectMenu.d.ts +496 -1
- package/lib/cascader/src/CascaderSubmenu.d.ts +492 -0
- package/lib/cascader/styles/light.d.ts +123 -0
- package/lib/chat/src/Chat.d.ts +5921 -2897
- package/lib/chat/src/Chat.js +15 -180
- package/lib/chat/src/ChatListItems.d.ts +1875 -30
- package/lib/chat/src/ChatMainArea.d.ts +1925 -54
- package/lib/chat/src/ChatMainArea.js +48 -3
- package/lib/chat/src/ChatMessages.d.ts +1874 -29
- package/lib/chat/src/ChatParts/Sidebar.d.ts +492 -0
- package/lib/chat/src/interface.d.ts +2814 -2
- package/lib/chat/src/interface.js +183 -1
- package/lib/chat/styles/dark.d.ts +123 -0
- package/lib/chat/styles/light.d.ts +123 -0
- package/lib/checkbox/src/Checkbox.d.ts +7 -7
- package/lib/checkbox/src/CheckboxGroup.d.ts +1 -1
- package/lib/code/src/Code.d.ts +2 -2
- package/lib/color-picker/src/ColorPicker.d.ts +1 -1
- package/lib/color-picker/src/ColorPickerTrigger.d.ts +1 -1
- package/lib/components.d.ts +19428 -602
- package/lib/config-provider/src/ConfigProvider.d.ts +1 -1
- package/lib/config-provider/src/context.js +2 -2
- package/lib/crop/src/Crop.d.ts +1 -1
- package/lib/data-table/src/DataTable.d.ts +2087 -119
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +984 -0
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +984 -0
- package/lib/data-table/src/TableParts/Body.d.ts +985 -1
- package/lib/data-table/src/TableParts/Header.d.ts +985 -1
- package/lib/data-table/src/interface.d.ts +738 -0
- package/lib/data-table/styles/light.d.ts +246 -0
- package/lib/date-picker/src/DatePicker.d.ts +3 -3
- package/lib/date-picker-v2/src/DatePickerV2.d.ts +2 -2
- package/lib/descriptions/src/Descriptions.d.ts +2 -2
- package/lib/dialog/src/Dialog.d.ts +1 -1
- package/lib/dialog/src/DialogEnvironment.d.ts +1 -1
- package/lib/dialog/src/DialogProvider.d.ts +52 -52
- package/lib/dialog/src/dialogProps.d.ts +1 -1
- package/lib/divider/src/Divider.d.ts +1 -1
- package/lib/drawer/src/Drawer.d.ts +2 -2
- package/lib/dropdown/src/Dropdown.d.ts +4 -4
- package/lib/dynamic-input/src/DynamicInput.d.ts +2 -2
- package/lib/dynamic-input/src/InputPreset.d.ts +1 -1
- package/lib/dynamic-input/src/PairPreset.d.ts +1 -1
- package/lib/dynamic-tags/src/DynamicTags.d.ts +2 -2
- package/lib/empty/src/Empty.d.ts +1 -1
- package/lib/flex/src/Flex.d.ts +1 -1
- package/lib/float-button/src/FloatButton.d.ts +1 -1
- package/lib/form/src/Form.d.ts +1 -1
- package/lib/form/src/FormItem.d.ts +3 -3
- package/lib/form/src/FormItemCol.d.ts +3 -3
- package/lib/form/src/FormItemGridItem.d.ts +3 -3
- package/lib/form/src/FormItemRow.d.ts +2 -2
- package/lib/form/src/utils.d.ts +1 -1
- package/lib/gradient-text/src/GradientText.d.ts +2 -2
- package/lib/header/src/Header.d.ts +1 -1
- package/lib/header/src/mobile/HeaderMobile.d.ts +1 -1
- package/lib/heatmap/src/Heatmap.d.ts +1 -1
- package/lib/icon-bar/src/IconBarItem.d.ts +4 -4
- package/lib/icon-pack/src/IconPack.d.ts +2 -2
- package/lib/image/src/Image.d.ts +1 -1
- package/lib/input/src/Input.d.ts +7 -7
- package/lib/input-number/src/InputNumber.d.ts +3 -3
- package/lib/input-otp/src/InputOtp.d.ts +2 -2
- package/lib/kanban/src/Kanban.d.ts +1 -1
- package/lib/layout/src/LayoutSider.d.ts +1 -1
- package/lib/legacy-transfer/src/Transfer.d.ts +2 -2
- package/lib/list/src/List.d.ts +9 -9
- package/lib/list/src/ListItem.d.ts +10 -10
- package/lib/locales/common/enUS.d.ts +1 -0
- package/lib/locales/common/enUS.js +2 -1
- package/lib/locales/common/ruRU.js +2 -1
- package/lib/locales/common/uzUZ.js +2 -1
- package/lib/locales/common/zhCN.js +2 -1
- package/lib/mention/src/Mention.d.ts +1388 -32
- package/lib/mention/styles/light.d.ts +123 -0
- package/lib/menu/src/Menu.d.ts +3 -3
- package/lib/menu/src/MenuOption.d.ts +1 -1
- package/lib/menu/src/MenuOptionContent.d.ts +2 -2
- package/lib/menu/src/MenuOptionGroup.d.ts +1 -1
- package/lib/menu/src/Submenu.d.ts +1 -1
- package/lib/message-bubble/src/MessageBubble.d.ts +3 -3
- package/lib/modal/src/BodyWrapper.d.ts +2 -2
- package/lib/modal/src/Modal.d.ts +4 -4
- package/lib/modal/src/ModalEnvironment.d.ts +4 -4
- package/lib/modal/src/presetProps.d.ts +1 -1
- package/lib/modal-fullscreen/src/ModalFull.d.ts +1 -1
- package/lib/notification/src/Notification.d.ts +2 -2
- package/lib/notification/src/NotificationEnvironment.d.ts +1 -1
- package/lib/notification/src/NotificationProvider.d.ts +12 -12
- package/lib/number-animation/src/NumberAnimation.d.ts +1 -1
- package/lib/pagination/src/Pagination.d.ts +1995 -27
- package/lib/pagination/src/interface.d.ts +738 -0
- package/lib/pagination/styles/light.d.ts +246 -0
- package/lib/popconfirm/src/Popconfirm.d.ts +3 -3
- package/lib/popover/src/Popover.d.ts +3 -3
- package/lib/popover/src/PopoverBody.d.ts +1 -1
- package/lib/popselect/src/Popselect.d.ts +1383 -30
- package/lib/popselect/src/PopselectPanel.d.ts +494 -2
- package/lib/popselect/styles/light.d.ts +123 -0
- package/lib/qr-code/src/QrCode.d.ts +2 -2
- package/lib/radio/src/Radio.d.ts +2 -2
- package/lib/radio/src/RadioButton.d.ts +9 -9
- package/lib/radio/src/RadioGroup.d.ts +1 -1
- package/lib/rate/src/Rate.d.ts +1 -1
- package/lib/result/src/Result.d.ts +1 -1
- package/lib/select/index.d.ts +4 -3
- package/lib/select/index.js +2 -1
- package/lib/select/src/Select.d.ts +1127 -811
- package/lib/select/src/Select.js +189 -108
- package/lib/select/src/interface.d.ts +1140 -8
- package/lib/select/src/interface.js +85 -0
- package/lib/select/src/styles/index.cssr.js +15 -2
- package/lib/select/src/utils.d.ts +3 -1
- package/lib/select/src/utils.js +38 -0
- package/lib/select/styles/light.d.ts +123 -0
- package/lib/skeleton/src/Skeleton.d.ts +1 -1
- package/lib/slider/src/Slider.d.ts +4 -4
- package/lib/spin/src/Spin.d.ts +1 -1
- package/lib/split/src/Split.d.ts +2 -2
- package/lib/steps/src/Steps.d.ts +1 -1
- package/lib/switch/src/Switch.d.ts +2 -2
- package/lib/tabs/src/Tab.d.ts +8 -8
- package/lib/tabs/src/TabPane.d.ts +1 -1
- package/lib/tabs/src/Tabs.d.ts +1 -1
- package/lib/tag/src/Tag.d.ts +4 -4
- package/lib/tag/src/TagGroup.d.ts +2 -2
- package/lib/time-picker/src/Panel.d.ts +1 -1
- package/lib/time-picker/src/TimePicker.d.ts +3 -3
- package/lib/timeline/src/Timeline.d.ts +1 -1
- package/lib/timeline/src/TimelineItem.d.ts +1 -1
- package/lib/toggle-button/src/ToggleButton.d.ts +8 -8
- package/lib/tooltip/src/Tooltip.d.ts +3 -3
- package/lib/transfer/src/Transfer.d.ts +2 -2
- package/lib/tree/src/Tree.d.ts +2 -2
- package/lib/tree/src/TreeNodeCheckbox.d.ts +1 -1
- package/lib/tree/src/TreeNodeContent.d.ts +1 -1
- package/lib/tree-select/src/TreeSelect.d.ts +4 -4
- package/lib/typography/src/create-header.d.ts +1 -1
- package/lib/typography/src/headers.d.ts +6 -6
- package/lib/typography/src/text.d.ts +5 -5
- package/lib/upload/src/Upload.d.ts +3 -3
- package/lib/upload/src/UploadFile.d.ts +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/virtual-list/src/VirtualList.d.ts +2 -2
- package/lib/watermark/src/Watermark.d.ts +2 -2
- package/package.json +1 -1
- package/web-types.json +86 -3
package/es/select/src/Select.mjs
CHANGED
|
@@ -1,152 +1,32 @@
|
|
|
1
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
4
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
|
+
}
|
|
7
|
+
return t;
|
|
8
|
+
};
|
|
1
9
|
import { getPreciseEventTarget, happensIn } from 'seemly';
|
|
2
10
|
import { createTreeMate } from 'treemate';
|
|
3
11
|
import { clickoutside } from 'vdirs';
|
|
4
12
|
import { useCompitable, useIsMounted, useMergedState } from 'vooks';
|
|
5
|
-
import { computed, defineComponent, h, ref, toRef, Transition, vShow, watch, watchEffect, withDirectives } from 'vue';
|
|
13
|
+
import { computed, defineComponent, h, nextTick, ref, toRef, Transition, vShow, watch, watchEffect, withDirectives } from 'vue';
|
|
6
14
|
import { VBinder, VFollower, VTarget } from 'vueuc';
|
|
7
15
|
import { UInternalSelection, UInternalSelectMenu } from "../../_internal/index.mjs";
|
|
8
16
|
import { useConfig, useFormItem, useLocale, useTheme, useThemeClass } from "../../_mixins/index.mjs";
|
|
9
17
|
import { call, markEventEffectPerformed, useAdjustedTo, warnOnce } from "../../_utils/index.mjs";
|
|
18
|
+
import { UButton } from "../../button/index.mjs";
|
|
10
19
|
import { selectLight } from "../styles/index.mjs";
|
|
20
|
+
import { selectProps } from "./interface.mjs";
|
|
11
21
|
import style from "./styles/index.cssr.mjs";
|
|
12
|
-
import { createTmOptions, createValOptMap, filterOptions, patternMatched } from "./utils.mjs";
|
|
13
|
-
export
|
|
14
|
-
to: useAdjustedTo.propTo,
|
|
15
|
-
bordered: {
|
|
16
|
-
type: Boolean,
|
|
17
|
-
default: undefined
|
|
18
|
-
},
|
|
19
|
-
clearable: Boolean,
|
|
20
|
-
clearCreatedOptionsOnClear: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
default: true
|
|
23
|
-
},
|
|
24
|
-
clearFilterAfterSelect: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
default: true
|
|
27
|
-
},
|
|
28
|
-
options: {
|
|
29
|
-
type: Array,
|
|
30
|
-
default: () => []
|
|
31
|
-
},
|
|
32
|
-
defaultValue: {
|
|
33
|
-
type: [String, Number, Array],
|
|
34
|
-
default: null
|
|
35
|
-
},
|
|
36
|
-
keyboard: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: true
|
|
39
|
-
},
|
|
40
|
-
value: [String, Number, Array],
|
|
41
|
-
placeholder: String,
|
|
42
|
-
menuProps: Object,
|
|
43
|
-
multiple: Boolean,
|
|
44
|
-
size: String,
|
|
45
|
-
menuSize: {
|
|
46
|
-
type: String
|
|
47
|
-
},
|
|
48
|
-
filterable: Boolean,
|
|
49
|
-
disabled: {
|
|
50
|
-
type: Boolean,
|
|
51
|
-
default: undefined
|
|
52
|
-
},
|
|
53
|
-
remote: Boolean,
|
|
54
|
-
loading: Boolean,
|
|
55
|
-
loadingSkeleton: Boolean,
|
|
56
|
-
filter: Function,
|
|
57
|
-
placement: {
|
|
58
|
-
type: String,
|
|
59
|
-
default: 'bottom-start'
|
|
60
|
-
},
|
|
61
|
-
widthMode: {
|
|
62
|
-
type: String,
|
|
63
|
-
default: 'trigger'
|
|
64
|
-
},
|
|
65
|
-
tag: Boolean,
|
|
66
|
-
onCreate: Function,
|
|
67
|
-
fallbackOption: {
|
|
68
|
-
type: [Function, Boolean],
|
|
69
|
-
default: undefined
|
|
70
|
-
},
|
|
71
|
-
show: {
|
|
72
|
-
type: Boolean,
|
|
73
|
-
default: undefined
|
|
74
|
-
},
|
|
75
|
-
showArrow: {
|
|
76
|
-
type: Boolean,
|
|
77
|
-
default: true
|
|
78
|
-
},
|
|
79
|
-
maxTagCount: [Number, String],
|
|
80
|
-
ellipsisTagPopoverProps: Object,
|
|
81
|
-
consistentMenuWidth: {
|
|
82
|
-
type: Boolean,
|
|
83
|
-
default: true
|
|
84
|
-
},
|
|
85
|
-
virtualScroll: {
|
|
86
|
-
type: Boolean,
|
|
87
|
-
default: true
|
|
88
|
-
},
|
|
89
|
-
labelField: {
|
|
90
|
-
type: String,
|
|
91
|
-
default: 'label'
|
|
92
|
-
},
|
|
93
|
-
valueField: {
|
|
94
|
-
type: String,
|
|
95
|
-
default: 'value'
|
|
96
|
-
},
|
|
97
|
-
childrenField: {
|
|
98
|
-
type: String,
|
|
99
|
-
default: 'children'
|
|
100
|
-
},
|
|
101
|
-
filled: Boolean,
|
|
102
|
-
tagField: String,
|
|
103
|
-
renderTagLabel: Function,
|
|
104
|
-
renderLabel: Function,
|
|
105
|
-
renderOption: Function,
|
|
106
|
-
renderTag: Function,
|
|
107
|
-
'onUpdate:value': [Function, Array],
|
|
108
|
-
inputProps: Object,
|
|
109
|
-
nodeProps: Function,
|
|
110
|
-
ignoreComposition: {
|
|
111
|
-
type: Boolean,
|
|
112
|
-
default: true
|
|
113
|
-
},
|
|
114
|
-
showOnFocus: Boolean,
|
|
115
|
-
// for jsx
|
|
116
|
-
onUpdateValue: [Function, Array],
|
|
117
|
-
onBlur: [Function, Array],
|
|
118
|
-
onClear: [Function, Array],
|
|
119
|
-
onFocus: [Function, Array],
|
|
120
|
-
onScroll: [Function, Array],
|
|
121
|
-
onSearch: [Function, Array],
|
|
122
|
-
onUpdateShow: [Function, Array],
|
|
123
|
-
'onUpdate:show': [Function, Array],
|
|
124
|
-
displayDirective: {
|
|
125
|
-
type: String,
|
|
126
|
-
default: 'show'
|
|
127
|
-
},
|
|
128
|
-
resetMenuOnOptionsChange: {
|
|
129
|
-
type: Boolean,
|
|
130
|
-
default: true
|
|
131
|
-
},
|
|
132
|
-
status: String,
|
|
133
|
-
showCheckmark: {
|
|
134
|
-
type: Boolean,
|
|
135
|
-
default: true
|
|
136
|
-
},
|
|
137
|
-
scrollbarProps: Object,
|
|
138
|
-
round: Boolean,
|
|
139
|
-
counter: Boolean,
|
|
140
|
-
secondary: Boolean,
|
|
141
|
-
/** deprecated */
|
|
142
|
-
onChange: [Function, Array],
|
|
143
|
-
items: Array,
|
|
144
|
-
account: Boolean
|
|
145
|
-
});
|
|
22
|
+
import { createOptionValueSet, createTmOptions, createValOptMap, filterOptions, mergeDefaultOptions, patternMatched } from "./utils.mjs";
|
|
23
|
+
export { selectProps };
|
|
146
24
|
export default defineComponent({
|
|
147
25
|
name: 'Select',
|
|
148
26
|
props: selectProps,
|
|
149
|
-
setup(props
|
|
27
|
+
setup(props, {
|
|
28
|
+
slots
|
|
29
|
+
}) {
|
|
150
30
|
if (process.env.NODE_ENV !== 'production') {
|
|
151
31
|
watchEffect(() => {
|
|
152
32
|
if (props.items !== undefined) {
|
|
@@ -155,6 +35,9 @@ export default defineComponent({
|
|
|
155
35
|
if (props.onChange !== undefined) {
|
|
156
36
|
warnOnce('select', '`on-change` is deprecated, please use `on-update:value` instead.');
|
|
157
37
|
}
|
|
38
|
+
if (slots.trigger && props.filterable && props.filterPlacement !== 'dropdown') {
|
|
39
|
+
warnOnce('select', '`trigger` slot with `filterable` requires `filter-placement` to be `dropdown`, since the search input can\'t live inside a custom trigger.');
|
|
40
|
+
}
|
|
158
41
|
});
|
|
159
42
|
}
|
|
160
43
|
const {
|
|
@@ -173,6 +56,8 @@ export default defineComponent({
|
|
|
173
56
|
const uncontrolledShowRef = ref(false);
|
|
174
57
|
const mergedShowRef = useMergedState(toRef(props, 'show'), uncontrolledShowRef);
|
|
175
58
|
const triggerRef = ref(null);
|
|
59
|
+
const selfElRef = ref(null);
|
|
60
|
+
const triggerSlotWrapperRef = ref(null);
|
|
176
61
|
const followerRef = ref(null);
|
|
177
62
|
const menuRef = ref(null);
|
|
178
63
|
const {
|
|
@@ -182,6 +67,16 @@ export default defineComponent({
|
|
|
182
67
|
var _a;
|
|
183
68
|
return (_a = props.placeholder) !== null && _a !== void 0 ? _a : localeRef.value.placeholder;
|
|
184
69
|
});
|
|
70
|
+
const localizedSearchPlaceholderRef = computed(() => {
|
|
71
|
+
var _a;
|
|
72
|
+
return (_a = props.searchPlaceholder) !== null && _a !== void 0 ? _a : localeRef.value.searchPlaceholder;
|
|
73
|
+
});
|
|
74
|
+
const mergedTriggerFilterableRef = computed(() => {
|
|
75
|
+
return props.filterable && props.filterPlacement !== 'dropdown';
|
|
76
|
+
});
|
|
77
|
+
const mergedMenuFilterableRef = computed(() => {
|
|
78
|
+
return props.filterable && props.filterPlacement === 'dropdown';
|
|
79
|
+
});
|
|
185
80
|
const compitableOptionsRef = useCompitable(props, ['items', 'options']);
|
|
186
81
|
const emptyArray = [];
|
|
187
82
|
const createdOptionsRef = ref([]);
|
|
@@ -208,8 +103,14 @@ export default defineComponent({
|
|
|
208
103
|
});
|
|
209
104
|
};
|
|
210
105
|
});
|
|
106
|
+
const defaultOptionValuesRef = computed(() => createOptionValueSet(props.defaultOptions, props.valueField, props.childrenField));
|
|
107
|
+
const mergedOptionsRef = computed(() => {
|
|
108
|
+
const options = compitableOptionsRef.value || emptyArray;
|
|
109
|
+
if (!props.defaultOptions.length) return options;
|
|
110
|
+
return mergeDefaultOptions(props.defaultOptions, defaultOptionValuesRef.value, options, props.valueField, props.childrenField);
|
|
111
|
+
});
|
|
211
112
|
const localOptionsRef = computed(() => {
|
|
212
|
-
return beingCreatedOptionsRef.value.concat(createdOptionsRef.value).concat(
|
|
113
|
+
return beingCreatedOptionsRef.value.concat(createdOptionsRef.value).concat(mergedOptionsRef.value);
|
|
213
114
|
});
|
|
214
115
|
const resolvedFilterRef = computed(() => {
|
|
215
116
|
const {
|
|
@@ -238,7 +139,7 @@ export default defineComponent({
|
|
|
238
139
|
});
|
|
239
140
|
const filteredOptionsRef = computed(() => {
|
|
240
141
|
if (props.remote) {
|
|
241
|
-
return
|
|
142
|
+
return mergedOptionsRef.value;
|
|
242
143
|
} else {
|
|
243
144
|
const {
|
|
244
145
|
value: localOptions
|
|
@@ -262,6 +163,10 @@ export default defineComponent({
|
|
|
262
163
|
return createTreeMate(filteredOptionsRef.value, options);
|
|
263
164
|
});
|
|
264
165
|
const valOptMapRef = computed(() => createValOptMap(localOptionsRef.value, props.valueField, props.childrenField));
|
|
166
|
+
function getTriggerEl() {
|
|
167
|
+
var _a, _b;
|
|
168
|
+
return (_b = (_a = triggerRef.value) === null || _a === void 0 ? void 0 : _a.$el) !== null && _b !== void 0 ? _b : selfElRef.value;
|
|
169
|
+
}
|
|
265
170
|
function getMergedOptions(values) {
|
|
266
171
|
const remote = props.remote;
|
|
267
172
|
const {
|
|
@@ -317,6 +222,13 @@ export default defineComponent({
|
|
|
317
222
|
if (props.account) return 'huge';
|
|
318
223
|
return formItem.mergedSizeRef.value;
|
|
319
224
|
});
|
|
225
|
+
const mergedCloseOnSelectRef = computed(() => {
|
|
226
|
+
const {
|
|
227
|
+
closeOnSelect
|
|
228
|
+
} = props;
|
|
229
|
+
if (closeOnSelect !== undefined) return closeOnSelect;
|
|
230
|
+
return !props.multiple;
|
|
231
|
+
});
|
|
320
232
|
function doUpdateValue(value, option) {
|
|
321
233
|
const {
|
|
322
234
|
onChange,
|
|
@@ -419,13 +331,43 @@ export default defineComponent({
|
|
|
419
331
|
doUpdateShow(true);
|
|
420
332
|
uncontrolledShowRef.value = true;
|
|
421
333
|
if (props.filterable) {
|
|
422
|
-
|
|
334
|
+
if (props.filterPlacement === 'dropdown') {
|
|
335
|
+
void nextTick(() => {
|
|
336
|
+
var _a;
|
|
337
|
+
(_a = menuRef.value) === null || _a === void 0 ? void 0 : _a.focusSearchInput();
|
|
338
|
+
});
|
|
339
|
+
} else {
|
|
340
|
+
focusSelectionInput();
|
|
341
|
+
}
|
|
423
342
|
}
|
|
424
343
|
}
|
|
425
344
|
}
|
|
426
345
|
function closeMenu() {
|
|
427
346
|
doUpdateShow(false);
|
|
428
347
|
}
|
|
348
|
+
function toggleMenu() {
|
|
349
|
+
if (mergedShowRef.value) {
|
|
350
|
+
closeMenu();
|
|
351
|
+
} else {
|
|
352
|
+
openMenu();
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
function closeMenuAndRestoreFocus() {
|
|
356
|
+
focusSelection();
|
|
357
|
+
closeMenu();
|
|
358
|
+
}
|
|
359
|
+
function handleFooterButtonClick(buttonProps, event) {
|
|
360
|
+
const {
|
|
361
|
+
onClick,
|
|
362
|
+
closeOnClick
|
|
363
|
+
} = buttonProps;
|
|
364
|
+
if (onClick) {
|
|
365
|
+
call(onClick, event);
|
|
366
|
+
}
|
|
367
|
+
if (closeOnClick) {
|
|
368
|
+
closeMenuAndRestoreFocus();
|
|
369
|
+
}
|
|
370
|
+
}
|
|
429
371
|
function handleMenuAfterLeave() {
|
|
430
372
|
patternRef.value = '';
|
|
431
373
|
beingCreatedOptionsRef.value = emptyArray;
|
|
@@ -449,7 +391,7 @@ export default defineComponent({
|
|
|
449
391
|
if (!mergedShowRef.value) {
|
|
450
392
|
openMenu();
|
|
451
393
|
} else {
|
|
452
|
-
if (!props.filterable) {
|
|
394
|
+
if (!props.filterable || props.filterPlacement === 'dropdown') {
|
|
453
395
|
// already focused, don't need to return focus
|
|
454
396
|
closeMenu();
|
|
455
397
|
} else {
|
|
@@ -476,21 +418,20 @@ export default defineComponent({
|
|
|
476
418
|
}
|
|
477
419
|
function handleMenuBlur(e) {
|
|
478
420
|
var _a;
|
|
479
|
-
if ((_a =
|
|
421
|
+
if ((_a = getTriggerEl()) === null || _a === void 0 ? void 0 : _a.contains(e.relatedTarget)) return;
|
|
480
422
|
focusedRef.value = false;
|
|
481
423
|
doBlur(e);
|
|
482
424
|
// outside select, don't need to return focus
|
|
483
425
|
closeMenu();
|
|
484
426
|
}
|
|
485
427
|
function handleMenuTabOut() {
|
|
486
|
-
|
|
487
|
-
(_a = triggerRef.value) === null || _a === void 0 ? void 0 : _a.focus();
|
|
428
|
+
focusSelection();
|
|
488
429
|
closeMenu();
|
|
489
430
|
}
|
|
490
431
|
function handleMenuClickOutside(e) {
|
|
491
432
|
var _a;
|
|
492
433
|
if (mergedShowRef.value) {
|
|
493
|
-
if (!((_a =
|
|
434
|
+
if (!((_a = getTriggerEl()) === null || _a === void 0 ? void 0 : _a.contains(getPreciseEventTarget(e)))) {
|
|
494
435
|
// outside select, don't need to return focus
|
|
495
436
|
closeMenu();
|
|
496
437
|
}
|
|
@@ -513,9 +454,9 @@ export default defineComponent({
|
|
|
513
454
|
const {
|
|
514
455
|
value: memoValOptMap
|
|
515
456
|
} = memoValOptMapRef;
|
|
516
|
-
return value.filter(
|
|
457
|
+
return value.filter(value => valOptMap.has(value) || memoValOptMap.has(value));
|
|
517
458
|
} else {
|
|
518
|
-
return value.filter(
|
|
459
|
+
return value.filter(value => valOptMap.has(value));
|
|
519
460
|
}
|
|
520
461
|
}
|
|
521
462
|
}
|
|
@@ -564,6 +505,9 @@ export default defineComponent({
|
|
|
564
505
|
changedValue.push(option[valueField]);
|
|
565
506
|
if (clearFilterAfterSelect) patternRef.value = '';
|
|
566
507
|
}
|
|
508
|
+
if (mergedCloseOnSelectRef.value) {
|
|
509
|
+
closeMenuAndRestoreFocus();
|
|
510
|
+
}
|
|
567
511
|
doUpdateValue(changedValue, getMergedOptions(changedValue));
|
|
568
512
|
} else {
|
|
569
513
|
if (tag && !remote) {
|
|
@@ -574,8 +518,9 @@ export default defineComponent({
|
|
|
574
518
|
createdOptionsRef.value = emptyArray;
|
|
575
519
|
}
|
|
576
520
|
}
|
|
577
|
-
|
|
578
|
-
|
|
521
|
+
if (mergedCloseOnSelectRef.value) {
|
|
522
|
+
closeMenuAndRestoreFocus();
|
|
523
|
+
}
|
|
579
524
|
doUpdateValue(option[valueField], option);
|
|
580
525
|
}
|
|
581
526
|
}
|
|
@@ -583,13 +528,7 @@ export default defineComponent({
|
|
|
583
528
|
const createdOptions = createdOptionsRef.value;
|
|
584
529
|
return createdOptions.findIndex(createdOption => createdOption[props.valueField] === optionValue);
|
|
585
530
|
}
|
|
586
|
-
function
|
|
587
|
-
if (!mergedShowRef.value) {
|
|
588
|
-
openMenu();
|
|
589
|
-
}
|
|
590
|
-
const {
|
|
591
|
-
value
|
|
592
|
-
} = e.target;
|
|
531
|
+
function setPattern(value) {
|
|
593
532
|
patternRef.value = value;
|
|
594
533
|
const {
|
|
595
534
|
tag,
|
|
@@ -612,7 +551,7 @@ export default defineComponent({
|
|
|
612
551
|
valueField,
|
|
613
552
|
labelField
|
|
614
553
|
} = props;
|
|
615
|
-
if (
|
|
554
|
+
if (mergedOptionsRef.value.some(option => {
|
|
616
555
|
return option[valueField] === optionBeingCreated[valueField] || option[labelField] === optionBeingCreated[labelField];
|
|
617
556
|
}) || createdOptionsRef.value.some(option => {
|
|
618
557
|
return option[valueField] === optionBeingCreated[valueField] || option[labelField] === optionBeingCreated[labelField];
|
|
@@ -623,6 +562,18 @@ export default defineComponent({
|
|
|
623
562
|
}
|
|
624
563
|
}
|
|
625
564
|
}
|
|
565
|
+
function handlePatternInput(e) {
|
|
566
|
+
if (!mergedShowRef.value) {
|
|
567
|
+
openMenu();
|
|
568
|
+
}
|
|
569
|
+
const {
|
|
570
|
+
value
|
|
571
|
+
} = e.target;
|
|
572
|
+
setPattern(value);
|
|
573
|
+
}
|
|
574
|
+
function handleMenuPatternInput(value) {
|
|
575
|
+
setPattern(value);
|
|
576
|
+
}
|
|
626
577
|
function handleClear(e) {
|
|
627
578
|
e.stopPropagation();
|
|
628
579
|
const {
|
|
@@ -645,7 +596,7 @@ export default defineComponent({
|
|
|
645
596
|
}
|
|
646
597
|
}
|
|
647
598
|
function handleMenuMousedown(e) {
|
|
648
|
-
if (!happensIn(e, 'action') && !happensIn(e, 'empty') && !happensIn(e, 'header')) {
|
|
599
|
+
if (!happensIn(e, 'action') && !happensIn(e, 'empty') && !happensIn(e, 'header') && !happensIn(e, 'search')) {
|
|
649
600
|
e.preventDefault();
|
|
650
601
|
}
|
|
651
602
|
}
|
|
@@ -655,18 +606,18 @@ export default defineComponent({
|
|
|
655
606
|
}
|
|
656
607
|
// keyboard events
|
|
657
608
|
// also for menu keydown
|
|
658
|
-
function handleKeydown(
|
|
659
|
-
var _a, _b, _c, _d
|
|
609
|
+
function handleKeydown(event) {
|
|
610
|
+
var _a, _b, _c, _d;
|
|
660
611
|
if (!props.keyboard) {
|
|
661
|
-
|
|
612
|
+
event.preventDefault();
|
|
662
613
|
return;
|
|
663
614
|
}
|
|
664
|
-
switch (
|
|
615
|
+
switch (event.key) {
|
|
665
616
|
case ' ':
|
|
666
617
|
if (props.filterable) {
|
|
667
618
|
break;
|
|
668
619
|
} else {
|
|
669
|
-
|
|
620
|
+
event.preventDefault();
|
|
670
621
|
}
|
|
671
622
|
// eslint-disable-next-line no-fallthrough
|
|
672
623
|
case 'Enter':
|
|
@@ -701,17 +652,17 @@ export default defineComponent({
|
|
|
701
652
|
}
|
|
702
653
|
}
|
|
703
654
|
}
|
|
704
|
-
|
|
655
|
+
event.preventDefault();
|
|
705
656
|
break;
|
|
706
657
|
case 'ArrowUp':
|
|
707
|
-
|
|
658
|
+
event.preventDefault();
|
|
708
659
|
if (props.loading) return;
|
|
709
660
|
if (mergedShowRef.value) {
|
|
710
661
|
(_c = menuRef.value) === null || _c === void 0 ? void 0 : _c.prev();
|
|
711
662
|
}
|
|
712
663
|
break;
|
|
713
664
|
case 'ArrowDown':
|
|
714
|
-
|
|
665
|
+
event.preventDefault();
|
|
715
666
|
if (props.loading) return;
|
|
716
667
|
if (mergedShowRef.value) {
|
|
717
668
|
(_d = menuRef.value) === null || _d === void 0 ? void 0 : _d.next();
|
|
@@ -721,16 +672,29 @@ export default defineComponent({
|
|
|
721
672
|
break;
|
|
722
673
|
case 'Escape':
|
|
723
674
|
if (mergedShowRef.value) {
|
|
724
|
-
markEventEffectPerformed(
|
|
675
|
+
markEventEffectPerformed(event);
|
|
725
676
|
closeMenu();
|
|
726
677
|
}
|
|
727
|
-
(
|
|
678
|
+
focusSelection();
|
|
728
679
|
break;
|
|
729
680
|
}
|
|
730
681
|
}
|
|
731
|
-
function
|
|
682
|
+
function handleSelfKeydown(event) {
|
|
732
683
|
var _a;
|
|
733
|
-
(_a =
|
|
684
|
+
if (((_a = menuRef.value) === null || _a === void 0 ? void 0 : _a.selfRef) && menuRef.value.selfRef.contains(event.target)) {
|
|
685
|
+
return;
|
|
686
|
+
}
|
|
687
|
+
handleKeydown(event);
|
|
688
|
+
}
|
|
689
|
+
function focusSelection() {
|
|
690
|
+
if (triggerRef.value) {
|
|
691
|
+
triggerRef.value.focus();
|
|
692
|
+
return;
|
|
693
|
+
}
|
|
694
|
+
const wrapperEl = triggerSlotWrapperRef.value;
|
|
695
|
+
if (!wrapperEl) return;
|
|
696
|
+
const focusableEl = wrapperEl.querySelector('[tabindex], button, input, select, textarea, a[href]');
|
|
697
|
+
focusableEl === null || focusableEl === void 0 ? void 0 : focusableEl.focus();
|
|
734
698
|
}
|
|
735
699
|
function focusSelectionInput() {
|
|
736
700
|
var _a;
|
|
@@ -780,6 +744,8 @@ export default defineComponent({
|
|
|
780
744
|
treeMate: treeMateRef,
|
|
781
745
|
isMounted: useIsMounted(),
|
|
782
746
|
triggerRef,
|
|
747
|
+
selfElRef,
|
|
748
|
+
triggerSlotWrapperRef,
|
|
783
749
|
menuRef,
|
|
784
750
|
pattern: patternRef,
|
|
785
751
|
uncontrolledShow: uncontrolledShowRef,
|
|
@@ -789,6 +755,9 @@ export default defineComponent({
|
|
|
789
755
|
mergedValue: mergedValueRef,
|
|
790
756
|
followerRef,
|
|
791
757
|
localizedPlaceholder: localizedPlaceholderRef,
|
|
758
|
+
localizedSearchPlaceholder: localizedSearchPlaceholderRef,
|
|
759
|
+
mergedTriggerFilterable: mergedTriggerFilterableRef,
|
|
760
|
+
mergedMenuFilterable: mergedMenuFilterableRef,
|
|
792
761
|
selectedOption: selectedOptionRef,
|
|
793
762
|
selectedOptions: selectedOptionsRef,
|
|
794
763
|
mergedSize: mergedSizeRef,
|
|
@@ -806,6 +775,7 @@ export default defineComponent({
|
|
|
806
775
|
handleToggle: handleToggleByTmNode,
|
|
807
776
|
handleDeleteOption: handleToggleByOption,
|
|
808
777
|
handlePatternInput,
|
|
778
|
+
handleMenuPatternInput,
|
|
809
779
|
handleClear,
|
|
810
780
|
handleTriggerBlur,
|
|
811
781
|
handleTriggerFocus,
|
|
@@ -815,6 +785,11 @@ export default defineComponent({
|
|
|
815
785
|
handleMenuScroll,
|
|
816
786
|
handleMenuKeydown: handleKeydown,
|
|
817
787
|
handleMenuMousedown,
|
|
788
|
+
handleFooterButtonClick,
|
|
789
|
+
handleSelfKeydown,
|
|
790
|
+
openMenu,
|
|
791
|
+
closeMenu,
|
|
792
|
+
toggleMenu,
|
|
818
793
|
mergedTheme: themeRef,
|
|
819
794
|
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
820
795
|
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
@@ -822,63 +797,117 @@ export default defineComponent({
|
|
|
822
797
|
});
|
|
823
798
|
},
|
|
824
799
|
render() {
|
|
800
|
+
const renderFooterButton = (buttonProps, key) => {
|
|
801
|
+
if (!buttonProps) return null;
|
|
802
|
+
const {
|
|
803
|
+
label,
|
|
804
|
+
closeOnClick: _closeOnClick,
|
|
805
|
+
onClick: _onClick
|
|
806
|
+
} = buttonProps,
|
|
807
|
+
restButtonProps = __rest(buttonProps, ["label", "closeOnClick", "onClick"]);
|
|
808
|
+
return h(UButton, Object.assign({
|
|
809
|
+
key: key
|
|
810
|
+
}, restButtonProps, {
|
|
811
|
+
onClick: e => {
|
|
812
|
+
this.handleFooterButtonClick(buttonProps, e);
|
|
813
|
+
}
|
|
814
|
+
}), {
|
|
815
|
+
default: () => typeof label === 'function' ? label() : label
|
|
816
|
+
});
|
|
817
|
+
};
|
|
818
|
+
const renderFooter = () => {
|
|
819
|
+
const {
|
|
820
|
+
action
|
|
821
|
+
} = this.$slots;
|
|
822
|
+
if (action) {
|
|
823
|
+
return [action()].flat();
|
|
824
|
+
}
|
|
825
|
+
const {
|
|
826
|
+
primaryButtonProps,
|
|
827
|
+
secondaryButtonProps
|
|
828
|
+
} = this;
|
|
829
|
+
if (!primaryButtonProps && !secondaryButtonProps) return undefined;
|
|
830
|
+
return [h("div", {
|
|
831
|
+
class: `${this.mergedClsPrefix}-select-footer`,
|
|
832
|
+
key: "footer"
|
|
833
|
+
}, renderFooterButton(secondaryButtonProps, 'secondary'), renderFooterButton(primaryButtonProps, 'primary'))];
|
|
834
|
+
};
|
|
825
835
|
return h("div", {
|
|
826
|
-
|
|
836
|
+
ref: "selfElRef",
|
|
837
|
+
class: `${this.mergedClsPrefix}-select`,
|
|
838
|
+
onKeydown: this.$slots.trigger ? this.handleSelfKeydown : undefined
|
|
827
839
|
}, h(VBinder, null, {
|
|
828
840
|
default: () => [h(VTarget, null, {
|
|
829
|
-
default: () =>
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
multiple: this.multiple,
|
|
845
|
-
renderTag: this.renderTag,
|
|
846
|
-
renderLabel: this.renderLabel,
|
|
847
|
-
filterable: this.filterable,
|
|
848
|
-
clearable: this.clearable,
|
|
849
|
-
disabled: this.mergedDisabled,
|
|
850
|
-
size: this.mergedSize,
|
|
851
|
-
theme: this.mergedTheme.peers.InternalSelection,
|
|
852
|
-
labelField: this.labelField,
|
|
853
|
-
valueField: this.valueField,
|
|
854
|
-
themeOverrides: this.mergedTheme.peerOverrides.InternalSelection,
|
|
855
|
-
loading: this.loading,
|
|
856
|
-
loadingSkeleton: this.loadingSkeleton,
|
|
857
|
-
focused: this.focused,
|
|
858
|
-
onClick: this.handleTriggerClick,
|
|
859
|
-
onDeleteOption: this.handleDeleteOption,
|
|
860
|
-
onPatternInput: this.handlePatternInput,
|
|
861
|
-
onClear: this.handleClear,
|
|
862
|
-
onBlur: this.handleTriggerBlur,
|
|
863
|
-
onFocus: this.handleTriggerFocus,
|
|
864
|
-
onKeydown: this.handleKeydown,
|
|
865
|
-
onPatternBlur: this.onTriggerInputBlur,
|
|
866
|
-
onPatternFocus: this.onTriggerInputFocus,
|
|
867
|
-
onResize: this.handleTriggerOrMenuResize,
|
|
868
|
-
ignoreComposition: this.ignoreComposition,
|
|
869
|
-
round: this.round,
|
|
870
|
-
counter: this.counter,
|
|
871
|
-
secondary: this.secondary,
|
|
872
|
-
account: this.account,
|
|
873
|
-
tagField: this.tagField,
|
|
874
|
-
renderTagLabel: this.renderTagLabel,
|
|
875
|
-
filled: this.filled
|
|
876
|
-
}, {
|
|
877
|
-
arrow: () => {
|
|
878
|
-
var _a, _b;
|
|
879
|
-
return [(_b = (_a = this.$slots).arrow) === null || _b === void 0 ? void 0 : _b.call(_a)];
|
|
841
|
+
default: () => {
|
|
842
|
+
if (this.$slots.trigger) {
|
|
843
|
+
return h("div", {
|
|
844
|
+
ref: "triggerSlotWrapperRef",
|
|
845
|
+
class: `${this.mergedClsPrefix}-select__trigger-wrapper`
|
|
846
|
+
}, this.$slots.trigger({
|
|
847
|
+
open: this.openMenu,
|
|
848
|
+
close: this.closeMenu,
|
|
849
|
+
toggle: this.toggleMenu,
|
|
850
|
+
show: this.mergedShow,
|
|
851
|
+
disabled: this.mergedDisabled,
|
|
852
|
+
value: this.mergedValue,
|
|
853
|
+
selectedOption: this.selectedOption,
|
|
854
|
+
selectedOptions: this.selectedOptions
|
|
855
|
+
}));
|
|
880
856
|
}
|
|
881
|
-
|
|
857
|
+
return h(UInternalSelection, {
|
|
858
|
+
ref: "triggerRef",
|
|
859
|
+
inlineThemeDisabled: this.inlineThemeDisabled,
|
|
860
|
+
status: this.mergedStatus,
|
|
861
|
+
inputProps: this.inputProps,
|
|
862
|
+
clsPrefix: this.mergedClsPrefix,
|
|
863
|
+
showArrow: this.showArrow,
|
|
864
|
+
maxTagCount: this.maxTagCount,
|
|
865
|
+
ellipsisTagPopoverProps: this.ellipsisTagPopoverProps,
|
|
866
|
+
bordered: this.mergedBordered,
|
|
867
|
+
active: this.activeWithoutMenuOpen || this.mergedShow,
|
|
868
|
+
pattern: this.pattern,
|
|
869
|
+
placeholder: this.localizedPlaceholder,
|
|
870
|
+
selectedOption: this.selectedOption,
|
|
871
|
+
selectedOptions: this.selectedOptions,
|
|
872
|
+
multiple: this.multiple,
|
|
873
|
+
renderTag: this.renderTag,
|
|
874
|
+
renderLabel: this.renderLabel,
|
|
875
|
+
filterable: this.mergedTriggerFilterable,
|
|
876
|
+
clearable: this.clearable,
|
|
877
|
+
disabled: this.mergedDisabled,
|
|
878
|
+
size: this.mergedSize,
|
|
879
|
+
theme: this.mergedTheme.peers.InternalSelection,
|
|
880
|
+
labelField: this.labelField,
|
|
881
|
+
valueField: this.valueField,
|
|
882
|
+
themeOverrides: this.mergedTheme.peerOverrides.InternalSelection,
|
|
883
|
+
loading: this.loading,
|
|
884
|
+
loadingSkeleton: this.loadingSkeleton,
|
|
885
|
+
focused: this.focused,
|
|
886
|
+
onClick: this.handleTriggerClick,
|
|
887
|
+
onDeleteOption: this.handleDeleteOption,
|
|
888
|
+
onPatternInput: this.handlePatternInput,
|
|
889
|
+
onClear: this.handleClear,
|
|
890
|
+
onBlur: this.handleTriggerBlur,
|
|
891
|
+
onFocus: this.handleTriggerFocus,
|
|
892
|
+
onKeydown: this.handleKeydown,
|
|
893
|
+
onPatternBlur: this.onTriggerInputBlur,
|
|
894
|
+
onPatternFocus: this.onTriggerInputFocus,
|
|
895
|
+
onResize: this.handleTriggerOrMenuResize,
|
|
896
|
+
ignoreComposition: this.ignoreComposition,
|
|
897
|
+
round: this.round,
|
|
898
|
+
counter: this.counter,
|
|
899
|
+
secondary: this.secondary,
|
|
900
|
+
account: this.account,
|
|
901
|
+
tagField: this.tagField,
|
|
902
|
+
renderTagLabel: this.renderTagLabel,
|
|
903
|
+
filled: this.filled
|
|
904
|
+
}, {
|
|
905
|
+
arrow: () => {
|
|
906
|
+
var _a, _b;
|
|
907
|
+
return [(_b = (_a = this.$slots).arrow) === null || _b === void 0 ? void 0 : _b.call(_a)];
|
|
908
|
+
}
|
|
909
|
+
});
|
|
910
|
+
}
|
|
882
911
|
}), h(VFollower, {
|
|
883
912
|
ref: "followerRef",
|
|
884
913
|
show: this.mergedShow,
|
|
@@ -931,6 +960,11 @@ export default defineComponent({
|
|
|
931
960
|
onMousedown: this.handleMenuMousedown,
|
|
932
961
|
show: this.mergedShow,
|
|
933
962
|
showCheckmark: this.showCheckmark,
|
|
963
|
+
markType: this.markType,
|
|
964
|
+
filterable: this.mergedMenuFilterable,
|
|
965
|
+
pattern: this.pattern,
|
|
966
|
+
searchPlaceholder: this.localizedSearchPlaceholder,
|
|
967
|
+
onPatternInput: this.handleMenuPatternInput,
|
|
934
968
|
resetMenuOnOptionsChange: this.resetMenuOnOptionsChange,
|
|
935
969
|
scrollbarProps: this.scrollbarProps
|
|
936
970
|
}), {
|
|
@@ -942,10 +976,7 @@ export default defineComponent({
|
|
|
942
976
|
var _a, _b;
|
|
943
977
|
return [(_b = (_a = this.$slots).header) === null || _b === void 0 ? void 0 : _b.call(_a)];
|
|
944
978
|
},
|
|
945
|
-
action:
|
|
946
|
-
var _a, _b;
|
|
947
|
-
return [(_b = (_a = this.$slots).action) === null || _b === void 0 ? void 0 : _b.call(_a)];
|
|
948
|
-
}
|
|
979
|
+
action: renderFooter
|
|
949
980
|
}), this.displayDirective === 'show' ? [[vShow, this.mergedShow], [clickoutside, this.handleMenuClickOutside, undefined, {
|
|
950
981
|
capture: true
|
|
951
982
|
}]] : [[clickoutside, this.handleMenuClickOutside, undefined, {
|