@uzum-tech/ui 2.3.2 → 2.3.3
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 +28216 -27711
- package/dist/index.mjs +28479 -27974
- 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 +5868 -87
- package/es/chat/src/ChatListItems.d.ts +1849 -4
- package/es/chat/src/ChatMainArea.d.ts +1849 -4
- package/es/chat/src/ChatMessages.d.ts +1849 -4
- package/es/chat/src/ChatParts/Sidebar.d.ts +492 -0
- 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 +19177 -419
- 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 +5868 -87
- package/lib/chat/src/ChatListItems.d.ts +1849 -4
- package/lib/chat/src/ChatMainArea.d.ts +1849 -4
- package/lib/chat/src/ChatMessages.d.ts +1849 -4
- package/lib/chat/src/ChatParts/Sidebar.d.ts +492 -0
- 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 +19177 -419
- 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 +78 -2
package/lib/select/src/Select.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
@@ -13,80 +24,16 @@ const vueuc_1 = require("vueuc");
|
|
|
13
24
|
const _internal_1 = require("../../_internal");
|
|
14
25
|
const _mixins_1 = require("../../_mixins");
|
|
15
26
|
const _utils_1 = require("../../_utils");
|
|
27
|
+
const button_1 = require("../../button");
|
|
16
28
|
const styles_1 = require("../styles");
|
|
29
|
+
const interface_1 = require("./interface");
|
|
30
|
+
Object.defineProperty(exports, "selectProps", { enumerable: true, get: function () { return interface_1.selectProps; } });
|
|
17
31
|
const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
|
|
18
32
|
const utils_1 = require("./utils");
|
|
19
|
-
exports.selectProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { to: _utils_1.useAdjustedTo.propTo, bordered: {
|
|
20
|
-
type: Boolean,
|
|
21
|
-
default: undefined
|
|
22
|
-
}, clearable: Boolean, clearCreatedOptionsOnClear: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: true
|
|
25
|
-
}, clearFilterAfterSelect: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: true
|
|
28
|
-
}, options: {
|
|
29
|
-
type: Array,
|
|
30
|
-
default: () => []
|
|
31
|
-
}, defaultValue: {
|
|
32
|
-
type: [String, Number, Array],
|
|
33
|
-
default: null
|
|
34
|
-
}, keyboard: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default: true
|
|
37
|
-
}, value: [String, Number, Array], placeholder: String, menuProps: Object, multiple: Boolean, size: String, menuSize: {
|
|
38
|
-
type: String
|
|
39
|
-
}, filterable: Boolean, disabled: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
default: undefined
|
|
42
|
-
}, remote: Boolean, loading: Boolean, loadingSkeleton: Boolean, filter: Function, placement: {
|
|
43
|
-
type: String,
|
|
44
|
-
default: 'bottom-start'
|
|
45
|
-
}, widthMode: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: 'trigger'
|
|
48
|
-
}, tag: Boolean, onCreate: Function, fallbackOption: {
|
|
49
|
-
type: [Function, Boolean],
|
|
50
|
-
default: undefined
|
|
51
|
-
}, show: {
|
|
52
|
-
type: Boolean,
|
|
53
|
-
default: undefined
|
|
54
|
-
}, showArrow: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default: true
|
|
57
|
-
}, maxTagCount: [Number, String], ellipsisTagPopoverProps: Object, consistentMenuWidth: {
|
|
58
|
-
type: Boolean,
|
|
59
|
-
default: true
|
|
60
|
-
}, virtualScroll: {
|
|
61
|
-
type: Boolean,
|
|
62
|
-
default: true
|
|
63
|
-
}, labelField: {
|
|
64
|
-
type: String,
|
|
65
|
-
default: 'label'
|
|
66
|
-
}, valueField: {
|
|
67
|
-
type: String,
|
|
68
|
-
default: 'value'
|
|
69
|
-
}, childrenField: {
|
|
70
|
-
type: String,
|
|
71
|
-
default: 'children'
|
|
72
|
-
}, filled: Boolean, tagField: String, renderTagLabel: Function, renderLabel: Function, renderOption: Function, renderTag: Function, 'onUpdate:value': [Function, Array], inputProps: Object, nodeProps: Function, ignoreComposition: { type: Boolean, default: true }, showOnFocus: Boolean,
|
|
73
|
-
// for jsx
|
|
74
|
-
onUpdateValue: [Function, Array], onBlur: [Function, Array], onClear: [Function, Array], onFocus: [Function, Array], onScroll: [Function, Array], onSearch: [Function, Array], onUpdateShow: [Function, Array], 'onUpdate:show': [Function, Array], displayDirective: {
|
|
75
|
-
type: String,
|
|
76
|
-
default: 'show'
|
|
77
|
-
}, resetMenuOnOptionsChange: {
|
|
78
|
-
type: Boolean,
|
|
79
|
-
default: true
|
|
80
|
-
}, status: String, showCheckmark: {
|
|
81
|
-
type: Boolean,
|
|
82
|
-
default: true
|
|
83
|
-
}, scrollbarProps: Object, round: Boolean, counter: Boolean, secondary: Boolean,
|
|
84
|
-
/** deprecated */
|
|
85
|
-
onChange: [Function, Array], items: Array, account: Boolean });
|
|
86
33
|
exports.default = (0, vue_1.defineComponent)({
|
|
87
34
|
name: 'Select',
|
|
88
|
-
props:
|
|
89
|
-
setup(props) {
|
|
35
|
+
props: interface_1.selectProps,
|
|
36
|
+
setup(props, { slots }) {
|
|
90
37
|
if (process.env.NODE_ENV !== 'production') {
|
|
91
38
|
(0, vue_1.watchEffect)(() => {
|
|
92
39
|
if (props.items !== undefined) {
|
|
@@ -95,6 +42,11 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
95
42
|
if (props.onChange !== undefined) {
|
|
96
43
|
(0, _utils_1.warnOnce)('select', '`on-change` is deprecated, please use `on-update:value` instead.');
|
|
97
44
|
}
|
|
45
|
+
if (slots.trigger
|
|
46
|
+
&& props.filterable
|
|
47
|
+
&& props.filterPlacement !== 'dropdown') {
|
|
48
|
+
(0, _utils_1.warnOnce)('select', '`trigger` slot with `filterable` requires `filter-placement` to be `dropdown`, since the search input can\'t live inside a custom trigger.');
|
|
49
|
+
}
|
|
98
50
|
});
|
|
99
51
|
}
|
|
100
52
|
const { mergedClsPrefixRef, mergedBorderedRef, namespaceRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
|
|
@@ -108,6 +60,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
108
60
|
const uncontrolledShowRef = (0, vue_1.ref)(false);
|
|
109
61
|
const mergedShowRef = (0, vooks_1.useMergedState)((0, vue_1.toRef)(props, 'show'), uncontrolledShowRef);
|
|
110
62
|
const triggerRef = (0, vue_1.ref)(null);
|
|
63
|
+
const selfElRef = (0, vue_1.ref)(null);
|
|
64
|
+
const triggerSlotWrapperRef = (0, vue_1.ref)(null);
|
|
111
65
|
const followerRef = (0, vue_1.ref)(null);
|
|
112
66
|
const menuRef = (0, vue_1.ref)(null);
|
|
113
67
|
const { localeRef } = (0, _mixins_1.useLocale)('Select');
|
|
@@ -115,6 +69,16 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
115
69
|
var _a;
|
|
116
70
|
return (_a = props.placeholder) !== null && _a !== void 0 ? _a : localeRef.value.placeholder;
|
|
117
71
|
});
|
|
72
|
+
const localizedSearchPlaceholderRef = (0, vue_1.computed)(() => {
|
|
73
|
+
var _a;
|
|
74
|
+
return (_a = props.searchPlaceholder) !== null && _a !== void 0 ? _a : localeRef.value.searchPlaceholder;
|
|
75
|
+
});
|
|
76
|
+
const mergedTriggerFilterableRef = (0, vue_1.computed)(() => {
|
|
77
|
+
return props.filterable && props.filterPlacement !== 'dropdown';
|
|
78
|
+
});
|
|
79
|
+
const mergedMenuFilterableRef = (0, vue_1.computed)(() => {
|
|
80
|
+
return props.filterable && props.filterPlacement === 'dropdown';
|
|
81
|
+
});
|
|
118
82
|
const compitableOptionsRef = (0, vooks_1.useCompitable)(props, ['items', 'options']);
|
|
119
83
|
const emptyArray = [];
|
|
120
84
|
const createdOptionsRef = (0, vue_1.ref)([]);
|
|
@@ -137,8 +101,15 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
137
101
|
});
|
|
138
102
|
};
|
|
139
103
|
});
|
|
104
|
+
const defaultOptionValuesRef = (0, vue_1.computed)(() => (0, utils_1.createOptionValueSet)(props.defaultOptions, props.valueField, props.childrenField));
|
|
105
|
+
const mergedOptionsRef = (0, vue_1.computed)(() => {
|
|
106
|
+
const options = compitableOptionsRef.value || emptyArray;
|
|
107
|
+
if (!props.defaultOptions.length)
|
|
108
|
+
return options;
|
|
109
|
+
return (0, utils_1.mergeDefaultOptions)(props.defaultOptions, defaultOptionValuesRef.value, options, props.valueField, props.childrenField);
|
|
110
|
+
});
|
|
140
111
|
const localOptionsRef = (0, vue_1.computed)(() => {
|
|
141
|
-
return beingCreatedOptionsRef.value.concat(createdOptionsRef.value).concat(
|
|
112
|
+
return beingCreatedOptionsRef.value.concat(createdOptionsRef.value).concat(mergedOptionsRef.value);
|
|
142
113
|
});
|
|
143
114
|
const resolvedFilterRef = (0, vue_1.computed)(() => {
|
|
144
115
|
const { filter } = props;
|
|
@@ -164,7 +135,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
164
135
|
});
|
|
165
136
|
const filteredOptionsRef = (0, vue_1.computed)(() => {
|
|
166
137
|
if (props.remote) {
|
|
167
|
-
return
|
|
138
|
+
return mergedOptionsRef.value;
|
|
168
139
|
}
|
|
169
140
|
else {
|
|
170
141
|
const { value: localOptions } = localOptionsRef;
|
|
@@ -183,6 +154,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
183
154
|
return (0, treemate_1.createTreeMate)(filteredOptionsRef.value, options);
|
|
184
155
|
});
|
|
185
156
|
const valOptMapRef = (0, vue_1.computed)(() => (0, utils_1.createValOptMap)(localOptionsRef.value, props.valueField, props.childrenField));
|
|
157
|
+
function getTriggerEl() {
|
|
158
|
+
var _a, _b;
|
|
159
|
+
return (_b = (_a = triggerRef.value) === null || _a === void 0 ? void 0 : _a.$el) !== null && _b !== void 0 ? _b : selfElRef.value;
|
|
160
|
+
}
|
|
186
161
|
function getMergedOptions(values) {
|
|
187
162
|
const remote = props.remote;
|
|
188
163
|
const { value: memoValOptMap } = memoValOptMapRef;
|
|
@@ -230,6 +205,12 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
230
205
|
return 'huge';
|
|
231
206
|
return formItem.mergedSizeRef.value;
|
|
232
207
|
});
|
|
208
|
+
const mergedCloseOnSelectRef = (0, vue_1.computed)(() => {
|
|
209
|
+
const { closeOnSelect } = props;
|
|
210
|
+
if (closeOnSelect !== undefined)
|
|
211
|
+
return closeOnSelect;
|
|
212
|
+
return !props.multiple;
|
|
213
|
+
});
|
|
233
214
|
function doUpdateValue(value, option) {
|
|
234
215
|
const { onChange, 'onUpdate:value': _onUpdateValue, onUpdateValue } = props;
|
|
235
216
|
const { triggerFormChange, triggerFormInput } = formItem;
|
|
@@ -310,13 +291,42 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
310
291
|
doUpdateShow(true);
|
|
311
292
|
uncontrolledShowRef.value = true;
|
|
312
293
|
if (props.filterable) {
|
|
313
|
-
|
|
294
|
+
if (props.filterPlacement === 'dropdown') {
|
|
295
|
+
void (0, vue_1.nextTick)(() => {
|
|
296
|
+
var _a;
|
|
297
|
+
(_a = menuRef.value) === null || _a === void 0 ? void 0 : _a.focusSearchInput();
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
focusSelectionInput();
|
|
302
|
+
}
|
|
314
303
|
}
|
|
315
304
|
}
|
|
316
305
|
}
|
|
317
306
|
function closeMenu() {
|
|
318
307
|
doUpdateShow(false);
|
|
319
308
|
}
|
|
309
|
+
function toggleMenu() {
|
|
310
|
+
if (mergedShowRef.value) {
|
|
311
|
+
closeMenu();
|
|
312
|
+
}
|
|
313
|
+
else {
|
|
314
|
+
openMenu();
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
function closeMenuAndRestoreFocus() {
|
|
318
|
+
focusSelection();
|
|
319
|
+
closeMenu();
|
|
320
|
+
}
|
|
321
|
+
function handleFooterButtonClick(buttonProps, event) {
|
|
322
|
+
const { onClick, closeOnClick } = buttonProps;
|
|
323
|
+
if (onClick) {
|
|
324
|
+
(0, _utils_1.call)(onClick, event);
|
|
325
|
+
}
|
|
326
|
+
if (closeOnClick) {
|
|
327
|
+
closeMenuAndRestoreFocus();
|
|
328
|
+
}
|
|
329
|
+
}
|
|
320
330
|
function handleMenuAfterLeave() {
|
|
321
331
|
patternRef.value = '';
|
|
322
332
|
beingCreatedOptionsRef.value = emptyArray;
|
|
@@ -342,7 +352,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
342
352
|
openMenu();
|
|
343
353
|
}
|
|
344
354
|
else {
|
|
345
|
-
if (!props.filterable) {
|
|
355
|
+
if (!props.filterable || props.filterPlacement === 'dropdown') {
|
|
346
356
|
// already focused, don't need to return focus
|
|
347
357
|
closeMenu();
|
|
348
358
|
}
|
|
@@ -370,7 +380,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
370
380
|
}
|
|
371
381
|
function handleMenuBlur(e) {
|
|
372
382
|
var _a;
|
|
373
|
-
if ((_a =
|
|
383
|
+
if ((_a = getTriggerEl()) === null || _a === void 0 ? void 0 : _a.contains(e.relatedTarget))
|
|
374
384
|
return;
|
|
375
385
|
focusedRef.value = false;
|
|
376
386
|
doBlur(e);
|
|
@@ -378,14 +388,13 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
378
388
|
closeMenu();
|
|
379
389
|
}
|
|
380
390
|
function handleMenuTabOut() {
|
|
381
|
-
|
|
382
|
-
(_a = triggerRef.value) === null || _a === void 0 ? void 0 : _a.focus();
|
|
391
|
+
focusSelection();
|
|
383
392
|
closeMenu();
|
|
384
393
|
}
|
|
385
394
|
function handleMenuClickOutside(e) {
|
|
386
395
|
var _a;
|
|
387
396
|
if (mergedShowRef.value) {
|
|
388
|
-
if (!((_a =
|
|
397
|
+
if (!((_a = getTriggerEl()) === null || _a === void 0 ? void 0 : _a.contains((0, seemly_1.getPreciseEventTarget)(e)))) {
|
|
389
398
|
// outside select, don't need to return focus
|
|
390
399
|
closeMenu();
|
|
391
400
|
}
|
|
@@ -404,10 +413,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
404
413
|
const { value: valOptMap } = valOptMapRef;
|
|
405
414
|
if (remote) {
|
|
406
415
|
const { value: memoValOptMap } = memoValOptMapRef;
|
|
407
|
-
return value.filter(
|
|
416
|
+
return value.filter(value => valOptMap.has(value) || memoValOptMap.has(value));
|
|
408
417
|
}
|
|
409
418
|
else {
|
|
410
|
-
return value.filter(
|
|
419
|
+
return value.filter(value => valOptMap.has(value));
|
|
411
420
|
}
|
|
412
421
|
}
|
|
413
422
|
}
|
|
@@ -454,6 +463,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
454
463
|
if (clearFilterAfterSelect)
|
|
455
464
|
patternRef.value = '';
|
|
456
465
|
}
|
|
466
|
+
if (mergedCloseOnSelectRef.value) {
|
|
467
|
+
closeMenuAndRestoreFocus();
|
|
468
|
+
}
|
|
457
469
|
doUpdateValue(changedValue, getMergedOptions(changedValue));
|
|
458
470
|
}
|
|
459
471
|
else {
|
|
@@ -468,8 +480,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
468
480
|
createdOptionsRef.value = emptyArray;
|
|
469
481
|
}
|
|
470
482
|
}
|
|
471
|
-
|
|
472
|
-
|
|
483
|
+
if (mergedCloseOnSelectRef.value) {
|
|
484
|
+
closeMenuAndRestoreFocus();
|
|
485
|
+
}
|
|
473
486
|
doUpdateValue(option[valueField], option);
|
|
474
487
|
}
|
|
475
488
|
}
|
|
@@ -477,11 +490,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
477
490
|
const createdOptions = createdOptionsRef.value;
|
|
478
491
|
return createdOptions.findIndex(createdOption => createdOption[props.valueField] === optionValue);
|
|
479
492
|
}
|
|
480
|
-
function
|
|
481
|
-
if (!mergedShowRef.value) {
|
|
482
|
-
openMenu();
|
|
483
|
-
}
|
|
484
|
-
const { value } = e.target;
|
|
493
|
+
function setPattern(value) {
|
|
485
494
|
patternRef.value = value;
|
|
486
495
|
const { tag, remote } = props;
|
|
487
496
|
doSearch(value);
|
|
@@ -495,7 +504,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
495
504
|
? onCreate(value)
|
|
496
505
|
: { [props.labelField]: value, [props.valueField]: value };
|
|
497
506
|
const { valueField, labelField } = props;
|
|
498
|
-
if (
|
|
507
|
+
if (mergedOptionsRef.value.some((option) => {
|
|
499
508
|
return (option[valueField] === optionBeingCreated[valueField]
|
|
500
509
|
|| option[labelField] === optionBeingCreated[labelField]);
|
|
501
510
|
})
|
|
@@ -510,6 +519,16 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
510
519
|
}
|
|
511
520
|
}
|
|
512
521
|
}
|
|
522
|
+
function handlePatternInput(e) {
|
|
523
|
+
if (!mergedShowRef.value) {
|
|
524
|
+
openMenu();
|
|
525
|
+
}
|
|
526
|
+
const { value } = e.target;
|
|
527
|
+
setPattern(value);
|
|
528
|
+
}
|
|
529
|
+
function handleMenuPatternInput(value) {
|
|
530
|
+
setPattern(value);
|
|
531
|
+
}
|
|
513
532
|
function handleClear(e) {
|
|
514
533
|
e.stopPropagation();
|
|
515
534
|
const { multiple, tag, remote, clearCreatedOptionsOnClear } = props;
|
|
@@ -530,7 +549,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
530
549
|
function handleMenuMousedown(e) {
|
|
531
550
|
if (!(0, seemly_1.happensIn)(e, 'action')
|
|
532
551
|
&& !(0, seemly_1.happensIn)(e, 'empty')
|
|
533
|
-
&& !(0, seemly_1.happensIn)(e, 'header')
|
|
552
|
+
&& !(0, seemly_1.happensIn)(e, 'header')
|
|
553
|
+
&& !(0, seemly_1.happensIn)(e, 'search')) {
|
|
534
554
|
e.preventDefault();
|
|
535
555
|
}
|
|
536
556
|
}
|
|
@@ -540,19 +560,19 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
540
560
|
}
|
|
541
561
|
// keyboard events
|
|
542
562
|
// also for menu keydown
|
|
543
|
-
function handleKeydown(
|
|
544
|
-
var _a, _b, _c, _d
|
|
563
|
+
function handleKeydown(event) {
|
|
564
|
+
var _a, _b, _c, _d;
|
|
545
565
|
if (!props.keyboard) {
|
|
546
|
-
|
|
566
|
+
event.preventDefault();
|
|
547
567
|
return;
|
|
548
568
|
}
|
|
549
|
-
switch (
|
|
569
|
+
switch (event.key) {
|
|
550
570
|
case ' ':
|
|
551
571
|
if (props.filterable) {
|
|
552
572
|
break;
|
|
553
573
|
}
|
|
554
574
|
else {
|
|
555
|
-
|
|
575
|
+
event.preventDefault();
|
|
556
576
|
}
|
|
557
577
|
// eslint-disable-next-line no-fallthrough
|
|
558
578
|
case 'Enter':
|
|
@@ -590,10 +610,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
590
610
|
}
|
|
591
611
|
}
|
|
592
612
|
}
|
|
593
|
-
|
|
613
|
+
event.preventDefault();
|
|
594
614
|
break;
|
|
595
615
|
case 'ArrowUp':
|
|
596
|
-
|
|
616
|
+
event.preventDefault();
|
|
597
617
|
if (props.loading)
|
|
598
618
|
return;
|
|
599
619
|
if (mergedShowRef.value) {
|
|
@@ -601,7 +621,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
601
621
|
}
|
|
602
622
|
break;
|
|
603
623
|
case 'ArrowDown':
|
|
604
|
-
|
|
624
|
+
event.preventDefault();
|
|
605
625
|
if (props.loading)
|
|
606
626
|
return;
|
|
607
627
|
if (mergedShowRef.value) {
|
|
@@ -613,16 +633,31 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
613
633
|
break;
|
|
614
634
|
case 'Escape':
|
|
615
635
|
if (mergedShowRef.value) {
|
|
616
|
-
(0, _utils_1.markEventEffectPerformed)(
|
|
636
|
+
(0, _utils_1.markEventEffectPerformed)(event);
|
|
617
637
|
closeMenu();
|
|
618
638
|
}
|
|
619
|
-
(
|
|
639
|
+
focusSelection();
|
|
620
640
|
break;
|
|
621
641
|
}
|
|
622
642
|
}
|
|
623
|
-
function
|
|
643
|
+
function handleSelfKeydown(event) {
|
|
624
644
|
var _a;
|
|
625
|
-
(_a =
|
|
645
|
+
if (((_a = menuRef.value) === null || _a === void 0 ? void 0 : _a.selfRef)
|
|
646
|
+
&& menuRef.value.selfRef.contains(event.target)) {
|
|
647
|
+
return;
|
|
648
|
+
}
|
|
649
|
+
handleKeydown(event);
|
|
650
|
+
}
|
|
651
|
+
function focusSelection() {
|
|
652
|
+
if (triggerRef.value) {
|
|
653
|
+
triggerRef.value.focus();
|
|
654
|
+
return;
|
|
655
|
+
}
|
|
656
|
+
const wrapperEl = triggerSlotWrapperRef.value;
|
|
657
|
+
if (!wrapperEl)
|
|
658
|
+
return;
|
|
659
|
+
const focusableEl = wrapperEl.querySelector('[tabindex], button, input, select, textarea, a[href]');
|
|
660
|
+
focusableEl === null || focusableEl === void 0 ? void 0 : focusableEl.focus();
|
|
626
661
|
}
|
|
627
662
|
function focusSelectionInput() {
|
|
628
663
|
var _a;
|
|
@@ -664,7 +699,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
664
699
|
? (0, _mixins_1.useThemeClass)('select', undefined, cssVarsRef, props)
|
|
665
700
|
: undefined;
|
|
666
701
|
return Object.assign(Object.assign({}, exposedMethods), { mergedStatus: mergedStatusRef, mergedClsPrefix: mergedClsPrefixRef, mergedBordered: mergedBorderedRef, namespace: namespaceRef, treeMate: treeMateRef, isMounted: (0, vooks_1.useIsMounted)(), triggerRef,
|
|
667
|
-
|
|
702
|
+
selfElRef,
|
|
703
|
+
triggerSlotWrapperRef,
|
|
704
|
+
menuRef, pattern: patternRef, uncontrolledShow: uncontrolledShowRef, mergedShow: mergedShowRef, adjustedTo: (0, _utils_1.useAdjustedTo)(props), uncontrolledValue: uncontrolledValueRef, mergedValue: mergedValueRef, followerRef, localizedPlaceholder: localizedPlaceholderRef, localizedSearchPlaceholder: localizedSearchPlaceholderRef, mergedTriggerFilterable: mergedTriggerFilterableRef, mergedMenuFilterable: mergedMenuFilterableRef, selectedOption: selectedOptionRef, selectedOptions: selectedOptionsRef, mergedSize: mergedSizeRef, mergedDisabled: mergedDisabledRef, focused: focusedRef, activeWithoutMenuOpen: activeWithoutMenuOpenRef, inlineThemeDisabled,
|
|
668
705
|
onTriggerInputFocus,
|
|
669
706
|
onTriggerInputBlur,
|
|
670
707
|
handleTriggerOrMenuResize,
|
|
@@ -672,22 +709,66 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
672
709
|
handleMenuBlur,
|
|
673
710
|
handleMenuTabOut,
|
|
674
711
|
handleTriggerClick, handleToggle: handleToggleByTmNode, handleDeleteOption: handleToggleByOption, handlePatternInput,
|
|
712
|
+
handleMenuPatternInput,
|
|
675
713
|
handleClear,
|
|
676
714
|
handleTriggerBlur,
|
|
677
715
|
handleTriggerFocus,
|
|
678
716
|
handleKeydown,
|
|
679
717
|
handleMenuAfterLeave,
|
|
680
718
|
handleMenuClickOutside,
|
|
681
|
-
handleMenuScroll, handleMenuKeydown: handleKeydown, handleMenuMousedown,
|
|
719
|
+
handleMenuScroll, handleMenuKeydown: handleKeydown, handleMenuMousedown,
|
|
720
|
+
handleFooterButtonClick,
|
|
721
|
+
handleSelfKeydown,
|
|
722
|
+
openMenu,
|
|
723
|
+
closeMenu,
|
|
724
|
+
toggleMenu, mergedTheme: themeRef, cssVars: inlineThemeDisabled ? undefined : cssVarsRef, themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass, onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender });
|
|
682
725
|
},
|
|
683
726
|
render() {
|
|
684
|
-
|
|
727
|
+
const renderFooterButton = (buttonProps, key) => {
|
|
728
|
+
if (!buttonProps)
|
|
729
|
+
return null;
|
|
730
|
+
const { label, closeOnClick: _closeOnClick, onClick: _onClick } = buttonProps, restButtonProps = __rest(buttonProps, ["label", "closeOnClick", "onClick"]);
|
|
731
|
+
return ((0, vue_1.h)(button_1.UButton, Object.assign({ key: key }, restButtonProps, { onClick: (e) => {
|
|
732
|
+
this.handleFooterButtonClick(buttonProps, e);
|
|
733
|
+
} }), {
|
|
734
|
+
default: () => (typeof label === 'function' ? label() : label)
|
|
735
|
+
}));
|
|
736
|
+
};
|
|
737
|
+
const renderFooter = () => {
|
|
738
|
+
const { action } = this.$slots;
|
|
739
|
+
if (action) {
|
|
740
|
+
return [action()].flat();
|
|
741
|
+
}
|
|
742
|
+
const { primaryButtonProps, secondaryButtonProps } = this;
|
|
743
|
+
if (!primaryButtonProps && !secondaryButtonProps)
|
|
744
|
+
return undefined;
|
|
745
|
+
return [
|
|
746
|
+
(0, vue_1.h)("div", { class: `${this.mergedClsPrefix}-select-footer`, key: "footer" },
|
|
747
|
+
renderFooterButton(secondaryButtonProps, 'secondary'),
|
|
748
|
+
renderFooterButton(primaryButtonProps, 'primary'))
|
|
749
|
+
];
|
|
750
|
+
};
|
|
751
|
+
return ((0, vue_1.h)("div", { ref: "selfElRef", class: `${this.mergedClsPrefix}-select`, onKeydown: this.$slots.trigger ? this.handleSelfKeydown : undefined },
|
|
685
752
|
(0, vue_1.h)(vueuc_1.VBinder, null, {
|
|
686
753
|
default: () => [
|
|
687
754
|
(0, vue_1.h)(vueuc_1.VTarget, null, {
|
|
688
|
-
default: () =>
|
|
689
|
-
|
|
690
|
-
|
|
755
|
+
default: () => {
|
|
756
|
+
if (this.$slots.trigger) {
|
|
757
|
+
return ((0, vue_1.h)("div", { ref: "triggerSlotWrapperRef", class: `${this.mergedClsPrefix}-select__trigger-wrapper` }, this.$slots.trigger({
|
|
758
|
+
open: this.openMenu,
|
|
759
|
+
close: this.closeMenu,
|
|
760
|
+
toggle: this.toggleMenu,
|
|
761
|
+
show: this.mergedShow,
|
|
762
|
+
disabled: this.mergedDisabled,
|
|
763
|
+
value: this.mergedValue,
|
|
764
|
+
selectedOption: this.selectedOption,
|
|
765
|
+
selectedOptions: this.selectedOptions
|
|
766
|
+
})));
|
|
767
|
+
}
|
|
768
|
+
return ((0, vue_1.h)(_internal_1.UInternalSelection, { ref: "triggerRef", inlineThemeDisabled: this.inlineThemeDisabled, status: this.mergedStatus, inputProps: this.inputProps, clsPrefix: this.mergedClsPrefix, showArrow: this.showArrow, maxTagCount: this.maxTagCount, ellipsisTagPopoverProps: this.ellipsisTagPopoverProps, bordered: this.mergedBordered, active: this.activeWithoutMenuOpen || this.mergedShow, pattern: this.pattern, placeholder: this.localizedPlaceholder, selectedOption: this.selectedOption, selectedOptions: this.selectedOptions, multiple: this.multiple, renderTag: this.renderTag, renderLabel: this.renderLabel, filterable: this.mergedTriggerFilterable, clearable: this.clearable, disabled: this.mergedDisabled, size: this.mergedSize, theme: this.mergedTheme.peers.InternalSelection, labelField: this.labelField, valueField: this.valueField, themeOverrides: this.mergedTheme.peerOverrides.InternalSelection, loading: this.loading, loadingSkeleton: this.loadingSkeleton, focused: this.focused, onClick: this.handleTriggerClick, onDeleteOption: this.handleDeleteOption, onPatternInput: this.handlePatternInput, onClear: this.handleClear, onBlur: this.handleTriggerBlur, onFocus: this.handleTriggerFocus, onKeydown: this.handleKeydown, onPatternBlur: this.onTriggerInputBlur, onPatternFocus: this.onTriggerInputFocus, onResize: this.handleTriggerOrMenuResize, ignoreComposition: this.ignoreComposition, round: this.round, counter: this.counter, secondary: this.secondary, account: this.account, tagField: this.tagField, renderTagLabel: this.renderTagLabel, filled: this.filled }, {
|
|
769
|
+
arrow: () => { var _a, _b; return [(_b = (_a = this.$slots).arrow) === null || _b === void 0 ? void 0 : _b.call(_a)]; }
|
|
770
|
+
}));
|
|
771
|
+
}
|
|
691
772
|
}),
|
|
692
773
|
(0, vue_1.h)(vueuc_1.VFollower, { ref: "followerRef", show: this.mergedShow, to: this.adjustedTo, teleportDisabled: this.adjustedTo === _utils_1.useAdjustedTo.tdkey, containerClass: this.namespace, width: this.consistentMenuWidth ? 'target' : undefined, minWidth: "target", placement: this.placement }, {
|
|
693
774
|
default: () => ((0, vue_1.h)(vue_1.Transition, { name: "fade-in-scale-up-transition", appear: this.isMounted, onAfterLeave: this.handleMenuAfterLeave }, {
|
|
@@ -703,10 +784,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
703
784
|
this.themeClass,
|
|
704
785
|
(_b = this.menuProps) === null || _b === void 0 ? void 0 : _b.class
|
|
705
786
|
], clsPrefix: this.mergedClsPrefix, focusable: true, account: this.account, labelField: this.labelField, valueField: this.valueField, autoPending: true, nodeProps: this.nodeProps, theme: this.mergedTheme.peers.InternalSelectMenu, themeOverrides: this.mergedTheme.peerOverrides
|
|
706
|
-
.InternalSelectMenu, treeMate: this.treeMate, multiple: this.multiple, size: this.menuSize || 'medium', renderOption: this.renderOption, renderLabel: this.renderLabel, value: this.mergedValue, style: [(_c = this.menuProps) === null || _c === void 0 ? void 0 : _c.style, this.cssVars], onToggle: this.handleToggle, onScroll: this.handleMenuScroll, onFocus: this.handleMenuFocus, onBlur: this.handleMenuBlur, onKeydown: this.handleMenuKeydown, onTabOut: this.handleMenuTabOut, onMousedown: this.handleMenuMousedown, show: this.mergedShow, showCheckmark: this.showCheckmark, resetMenuOnOptionsChange: this.resetMenuOnOptionsChange, scrollbarProps: this.scrollbarProps }), {
|
|
787
|
+
.InternalSelectMenu, treeMate: this.treeMate, multiple: this.multiple, size: this.menuSize || 'medium', renderOption: this.renderOption, renderLabel: this.renderLabel, value: this.mergedValue, style: [(_c = this.menuProps) === null || _c === void 0 ? void 0 : _c.style, this.cssVars], onToggle: this.handleToggle, onScroll: this.handleMenuScroll, onFocus: this.handleMenuFocus, onBlur: this.handleMenuBlur, onKeydown: this.handleMenuKeydown, onTabOut: this.handleMenuTabOut, onMousedown: this.handleMenuMousedown, show: this.mergedShow, showCheckmark: this.showCheckmark, markType: this.markType, filterable: this.mergedMenuFilterable, pattern: this.pattern, searchPlaceholder: this.localizedSearchPlaceholder, onPatternInput: this.handleMenuPatternInput, resetMenuOnOptionsChange: this.resetMenuOnOptionsChange, scrollbarProps: this.scrollbarProps }), {
|
|
707
788
|
empty: () => { var _a, _b; return [(_b = (_a = this.$slots).empty) === null || _b === void 0 ? void 0 : _b.call(_a)]; },
|
|
708
789
|
header: () => { var _a, _b; return [(_b = (_a = this.$slots).header) === null || _b === void 0 ? void 0 : _b.call(_a)]; },
|
|
709
|
-
action:
|
|
790
|
+
action: renderFooter
|
|
710
791
|
}), this.displayDirective === 'show'
|
|
711
792
|
? [
|
|
712
793
|
[vue_1.vShow, this.mergedShow],
|