naive-ui 2.18.1 → 2.19.2
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/es/_internal/clear/src/Clear.d.ts +1 -4
- package/es/_internal/clear/src/Clear.js +1 -4
- package/es/_internal/icons/Checkmark.js +3 -2
- package/es/_internal/select-menu/src/SelectMenu.d.ts +173 -0
- package/es/_internal/select-menu/src/SelectMenu.js +9 -6
- package/es/_internal/select-menu/src/SelectOption.js +2 -1
- package/es/_internal/select-menu/src/styles/index.cssr.js +32 -28
- package/es/_internal/select-menu/styles/light.d.ts +2 -0
- package/es/_internal/select-menu/styles/light.js +1 -1
- package/es/_internal/selection/src/Selection.d.ts +64 -56
- package/es/_internal/selection/src/Selection.js +34 -14
- package/es/_internal/selection/src/styles/index.cssr.js +16 -14
- package/es/_internal/selection/styles/_common.d.ts +1 -8
- package/es/_internal/selection/styles/_common.js +2 -9
- package/es/_internal/selection/styles/dark.js +10 -2
- package/es/_internal/selection/styles/light.d.ts +18 -16
- package/es/_internal/selection/styles/light.js +10 -2
- package/es/_mixins/use-rtl.js +1 -1
- package/es/_styles/common/light.js +1 -1
- package/es/_utils/naive/mutable.d.ts +2 -2
- package/es/alert/src/Alert.js +15 -16
- package/es/anchor/src/AnchorAdapter.d.ts +13 -8
- package/es/anchor/src/AnchorAdapter.js +3 -5
- package/es/anchor/src/BaseAnchor.d.ts +14 -1
- package/es/anchor/src/BaseAnchor.js +20 -7
- package/es/anchor/src/Link.js +5 -5
- package/es/anchor/src/styles/index.cssr.js +25 -16
- package/es/auto-complete/index.d.ts +1 -0
- package/es/auto-complete/src/AutoComplete.d.ts +10 -0
- package/es/auto-complete/src/interface.d.ts +1 -1
- package/es/auto-complete/styles/light.d.ts +1 -0
- package/es/badge/src/styles/index.cssr.js +1 -0
- package/es/card/src/Card.d.ts +17 -1
- package/es/card/src/Card.js +3 -2
- package/es/card/styles/dark.js +6 -1
- package/es/card/styles/light.d.ts +1 -0
- package/es/card/styles/light.js +2 -2
- package/es/cascader/src/Cascader.d.ts +100 -80
- package/es/cascader/src/Cascader.js +28 -19
- package/es/cascader/src/CascaderMenu.js +17 -15
- package/es/cascader/src/CascaderOption.d.ts +10 -8
- package/es/cascader/src/CascaderSelectMenu.d.ts +10 -8
- package/es/cascader/src/CascaderSubmenu.d.ts +10 -8
- package/es/cascader/src/interface.d.ts +2 -2
- package/es/cascader/src/styles/index.cssr.js +6 -1
- package/es/cascader/styles/light.d.ts +10 -8
- package/es/checkbox/src/Checkbox.d.ts +1 -0
- package/es/checkbox/src/Checkbox.js +5 -3
- package/es/checkbox/src/CheckboxGroup.js +1 -1
- package/es/composables/use-theme-vars.js +5 -5
- package/es/config-provider/src/internal-interface.d.ts +2 -0
- package/es/data-table/src/DataTable.d.ts +110 -88
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +20 -16
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +20 -16
- package/es/data-table/src/TableParts/Body.d.ts +20 -16
- package/es/data-table/src/TableParts/Cell.d.ts +40 -32
- package/es/data-table/src/TableParts/Header.d.ts +20 -16
- package/es/data-table/styles/light.d.ts +10 -8
- package/es/date-picker/src/DatePicker.d.ts +8 -3
- package/es/date-picker/src/DatePicker.js +2 -2
- package/es/date-picker/src/panel/date.d.ts +3 -3
- package/es/date-picker/src/panel/date.js +10 -1
- package/es/date-picker/src/panel/daterange.js +10 -1
- package/es/date-picker/src/panel/datetimerange.js +10 -1
- package/es/descriptions/src/Descriptions.d.ts +4 -17
- package/es/descriptions/src/Descriptions.js +2 -8
- package/es/dialog/src/DialogProvider.d.ts +20 -20
- package/es/drawer/src/styles/index.cssr.js +2 -0
- package/es/dropdown/src/Dropdown.d.ts +9 -23
- package/es/dynamic-tags/src/DynamicTags.js +2 -1
- package/es/empty/src/Empty.d.ts +6 -1
- package/es/empty/src/Empty.js +16 -4
- package/es/form/src/FormItemGridItem.d.ts +1 -1
- package/es/form/src/FormItemGridItem.js +2 -2
- package/es/global-style/src/GlobalStyle.js +13 -3
- package/es/grid/src/GridItem.d.ts +2 -2
- package/es/grid/src/GridItem.js +1 -1
- package/es/input-number/src/InputNumber.d.ts +8 -3
- package/es/input-number/src/InputNumber.js +4 -4
- package/es/jest-setup.js +3 -1
- package/es/layout/src/Layout.d.ts +18 -4
- package/es/layout/src/LayoutContent.d.ts +9 -2
- package/es/layout/src/LayoutFooter.d.ts +9 -0
- package/es/layout/src/LayoutHeader.d.ts +6 -0
- package/es/layout/src/LayoutSider.d.ts +11 -0
- package/es/layout/src/LayoutSider.js +4 -2
- package/es/layout/src/ToggleButton.js +7 -3
- package/es/layout/src/styles/layout-sider.cssr.js +31 -15
- package/es/layout/styles/dark.js +3 -2
- package/es/layout/styles/light.d.ts +2 -0
- package/es/layout/styles/light.js +3 -2
- package/es/locales/common/enUS.js +1 -1
- package/es/locales/common/ruRU.js +1 -1
- package/es/locales/common/ukUA.d.ts +3 -0
- package/es/locales/common/ukUA.js +92 -0
- package/es/locales/common/zhCN.js +1 -1
- package/es/locales/date/ukUA.d.ts +3 -0
- package/es/locales/date/ukUA.js +6 -0
- package/es/locales/index.d.ts +2 -0
- package/es/locales/index.js +2 -0
- package/es/mention/src/Mention.d.ts +10 -0
- package/es/mention/styles/light.d.ts +1 -0
- package/es/menu/src/Menu.d.ts +6 -1
- package/es/menu/src/Menu.js +10 -1
- package/es/menu/src/MenuOption.d.ts +3 -1
- package/es/menu/src/MenuOptionContent.d.ts +3 -1
- package/es/menu/src/Submenu.d.ts +3 -1
- package/es/modal/src/BodyWrapper.d.ts +5 -0
- package/es/modal/src/Modal.d.ts +36 -55
- package/es/modal/src/Modal.js +18 -39
- package/es/modal/src/presetProps.d.ts +2 -1
- package/es/modal/styles/light.d.ts +1 -0
- package/es/notification/src/Notification.d.ts +1 -1
- package/es/notification/src/NotificationEnvironment.d.ts +1 -1
- package/es/notification/src/NotificationProvider.d.ts +16 -16
- package/es/page-header/src/PageHeader.d.ts +1 -0
- package/es/page-header/src/PageHeader.js +8 -2
- package/es/page-header/src/styles/rtl.cssr.d.ts +2 -0
- package/es/page-header/src/styles/rtl.cssr.js +19 -0
- package/es/page-header/styles/index.d.ts +1 -0
- package/es/page-header/styles/index.js +1 -0
- package/es/page-header/styles/rtl.d.ts +5 -0
- package/es/page-header/styles/rtl.js +5 -0
- package/es/pagination/src/Pagination.d.ts +111 -100
- package/es/pagination/styles/light.d.ts +10 -8
- package/es/popconfirm/src/Popconfirm.d.ts +8 -22
- package/es/popover/src/Popover.d.ts +12 -32
- package/es/popover/src/Popover.js +25 -18
- package/es/popover/src/PopoverBody.d.ts +2 -2
- package/es/popover/src/PopoverBody.js +4 -2
- package/es/popselect/src/Popselect.d.ts +18 -22
- package/es/popselect/src/PopselectPanel.d.ts +1 -0
- package/es/popselect/src/PopselectPanel.js +38 -19
- package/es/popselect/styles/light.d.ts +1 -0
- package/es/select/src/Select.d.ts +111 -83
- package/es/select/src/Select.js +55 -56
- package/es/select/src/interface.d.ts +2 -2
- package/es/select/styles/light.d.ts +10 -8
- package/es/spin/src/Spin.d.ts +34 -25
- package/es/spin/src/Spin.js +27 -20
- package/es/spin/src/styles/index.cssr.js +23 -9
- package/es/spin/styles/light.d.ts +2 -0
- package/es/spin/styles/light.js +3 -1
- package/es/styles.d.ts +1 -0
- package/es/styles.js +1 -0
- package/es/tabs/src/Tab.d.ts +1 -1
- package/es/tabs/src/Tab.js +4 -6
- package/es/tabs/src/Tabs.d.ts +133 -42
- package/es/tabs/src/Tabs.js +37 -38
- package/es/tabs/src/interface.d.ts +2 -1
- package/es/tabs/src/styles/index.cssr.js +34 -10
- package/es/tabs/styles/_common.d.ts +6 -0
- package/es/tabs/styles/_common.js +6 -0
- package/es/tabs/styles/dark.js +7 -1
- package/es/tabs/styles/light.d.ts +13 -0
- package/es/tabs/styles/light.js +3 -3
- package/es/tag/src/styles/index.cssr.js +1 -1
- package/es/time/src/Time.d.ts +14 -22
- package/es/time/src/Time.js +32 -18
- package/es/time-picker/src/TimePicker.d.ts +5 -0
- package/es/time-picker/src/TimePicker.js +2 -2
- package/es/tooltip/src/Tooltip.d.ts +8 -22
- package/es/transfer/src/TransferList.d.ts +1 -1
- package/es/tree/src/Tree.d.ts +25 -10
- package/es/tree/src/Tree.js +34 -11
- package/es/tree/src/TreeNode.js +5 -2
- package/es/tree/src/interface.d.ts +2 -2
- package/es/tree-select/src/TreeSelect.d.ts +103 -81
- package/es/tree-select/src/TreeSelect.js +36 -40
- package/es/tree-select/src/interface.d.ts +2 -2
- package/es/tree-select/styles/light.d.ts +9 -8
- package/es/typography/src/blockquote.d.ts +2 -8
- package/es/typography/src/blockquote.js +1 -4
- package/es/typography/src/ol.d.ts +2 -8
- package/es/typography/src/ol.js +1 -4
- package/es/typography/src/p.d.ts +2 -2
- package/es/typography/src/p.js +1 -1
- package/es/typography/src/text.d.ts +14 -58
- package/es/typography/src/text.js +2 -23
- package/es/typography/src/ul.d.ts +2 -8
- package/es/typography/src/ul.js +1 -4
- package/es/upload/index.d.ts +2 -0
- package/es/upload/index.js +2 -0
- package/es/upload/src/Upload.d.ts +16 -68
- package/es/upload/src/Upload.js +71 -98
- package/es/upload/src/UploadDragger.js +7 -1
- package/es/upload/src/UploadFileList.d.ts +2 -0
- package/es/upload/src/UploadFileList.js +34 -0
- package/es/upload/src/UploadProgress.d.ts +0 -7
- package/es/upload/src/UploadProgress.js +1 -5
- package/es/upload/src/UploadTrigger.d.ts +12 -0
- package/es/upload/src/UploadTrigger.js +63 -0
- package/es/upload/src/interface.d.ts +13 -2
- package/es/upload/src/styles/index.cssr.js +40 -32
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/clear/src/Clear.d.ts +1 -4
- package/lib/_internal/clear/src/Clear.js +1 -4
- package/lib/_internal/icons/Checkmark.js +3 -2
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +173 -0
- package/lib/_internal/select-menu/src/SelectMenu.js +9 -6
- package/lib/_internal/select-menu/src/SelectOption.js +2 -1
- package/lib/_internal/select-menu/src/styles/index.cssr.js +32 -28
- package/lib/_internal/select-menu/styles/light.d.ts +2 -0
- package/lib/_internal/select-menu/styles/light.js +1 -1
- package/lib/_internal/selection/src/Selection.d.ts +64 -56
- package/lib/_internal/selection/src/Selection.js +34 -14
- package/lib/_internal/selection/src/styles/index.cssr.js +16 -14
- package/lib/_internal/selection/styles/_common.d.ts +1 -8
- package/lib/_internal/selection/styles/_common.js +2 -9
- package/lib/_internal/selection/styles/dark.js +10 -2
- package/lib/_internal/selection/styles/light.d.ts +18 -16
- package/lib/_internal/selection/styles/light.js +10 -2
- package/lib/_mixins/use-rtl.js +1 -1
- package/lib/_styles/common/light.js +1 -1
- package/lib/_utils/naive/mutable.d.ts +2 -2
- package/lib/alert/src/Alert.js +15 -16
- package/lib/anchor/src/AnchorAdapter.d.ts +13 -8
- package/lib/anchor/src/AnchorAdapter.js +3 -5
- package/lib/anchor/src/BaseAnchor.d.ts +14 -1
- package/lib/anchor/src/BaseAnchor.js +19 -6
- package/lib/anchor/src/Link.js +5 -5
- package/lib/anchor/src/styles/index.cssr.js +25 -16
- package/lib/auto-complete/index.d.ts +1 -0
- package/lib/auto-complete/src/AutoComplete.d.ts +10 -0
- package/lib/auto-complete/src/interface.d.ts +1 -1
- package/lib/auto-complete/styles/light.d.ts +1 -0
- package/lib/badge/src/styles/index.cssr.js +1 -0
- package/lib/card/src/Card.d.ts +17 -1
- package/lib/card/src/Card.js +3 -2
- package/lib/card/styles/dark.js +6 -1
- package/lib/card/styles/light.d.ts +1 -0
- package/lib/card/styles/light.js +2 -2
- package/lib/cascader/src/Cascader.d.ts +100 -80
- package/lib/cascader/src/Cascader.js +28 -19
- package/lib/cascader/src/CascaderMenu.js +16 -14
- package/lib/cascader/src/CascaderOption.d.ts +10 -8
- package/lib/cascader/src/CascaderSelectMenu.d.ts +10 -8
- package/lib/cascader/src/CascaderSubmenu.d.ts +10 -8
- package/lib/cascader/src/interface.d.ts +2 -2
- package/lib/cascader/src/styles/index.cssr.js +6 -1
- package/lib/cascader/styles/light.d.ts +10 -8
- package/lib/checkbox/src/Checkbox.d.ts +1 -0
- package/lib/checkbox/src/Checkbox.js +5 -3
- package/lib/checkbox/src/CheckboxGroup.js +1 -1
- package/lib/composables/use-theme-vars.js +5 -5
- package/lib/config-provider/src/internal-interface.d.ts +2 -0
- package/lib/data-table/src/DataTable.d.ts +110 -88
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +20 -16
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +20 -16
- package/lib/data-table/src/TableParts/Body.d.ts +20 -16
- package/lib/data-table/src/TableParts/Cell.d.ts +40 -32
- package/lib/data-table/src/TableParts/Header.d.ts +20 -16
- package/lib/data-table/styles/light.d.ts +10 -8
- package/lib/date-picker/src/DatePicker.d.ts +8 -3
- package/lib/date-picker/src/DatePicker.js +2 -2
- package/lib/date-picker/src/panel/date.d.ts +3 -3
- package/lib/date-picker/src/panel/date.js +9 -0
- package/lib/date-picker/src/panel/daterange.js +9 -0
- package/lib/date-picker/src/panel/datetimerange.js +9 -0
- package/lib/descriptions/src/Descriptions.d.ts +4 -17
- package/lib/descriptions/src/Descriptions.js +2 -8
- package/lib/dialog/src/DialogProvider.d.ts +20 -20
- package/lib/drawer/src/styles/index.cssr.js +2 -0
- package/lib/dropdown/src/Dropdown.d.ts +9 -23
- package/lib/dynamic-tags/src/DynamicTags.js +2 -1
- package/lib/empty/src/Empty.d.ts +6 -1
- package/lib/empty/src/Empty.js +15 -3
- package/lib/form/src/FormItemGridItem.d.ts +1 -1
- package/lib/form/src/FormItemGridItem.js +2 -2
- package/lib/global-style/src/GlobalStyle.js +13 -3
- package/lib/grid/src/GridItem.d.ts +2 -2
- package/lib/grid/src/GridItem.js +1 -1
- package/lib/input-number/src/InputNumber.d.ts +8 -3
- package/lib/input-number/src/InputNumber.js +4 -4
- package/lib/jest-setup.js +3 -1
- package/lib/layout/src/Layout.d.ts +18 -4
- package/lib/layout/src/LayoutContent.d.ts +9 -2
- package/lib/layout/src/LayoutFooter.d.ts +9 -0
- package/lib/layout/src/LayoutHeader.d.ts +6 -0
- package/lib/layout/src/LayoutSider.d.ts +11 -0
- package/lib/layout/src/LayoutSider.js +4 -2
- package/lib/layout/src/ToggleButton.js +7 -3
- package/lib/layout/src/styles/layout-sider.cssr.js +31 -15
- package/lib/layout/styles/dark.js +3 -2
- package/lib/layout/styles/light.d.ts +2 -0
- package/lib/layout/styles/light.js +3 -2
- package/lib/locales/common/enUS.js +1 -1
- package/lib/locales/common/ruRU.js +1 -1
- package/lib/locales/common/ukUA.d.ts +3 -0
- package/lib/locales/common/ukUA.js +94 -0
- package/lib/locales/common/zhCN.js +1 -1
- package/lib/locales/date/ukUA.d.ts +3 -0
- package/lib/locales/date/ukUA.js +8 -0
- package/lib/locales/index.d.ts +2 -0
- package/lib/locales/index.js +5 -1
- package/lib/mention/src/Mention.d.ts +10 -0
- package/lib/mention/styles/light.d.ts +1 -0
- package/lib/menu/src/Menu.d.ts +6 -1
- package/lib/menu/src/Menu.js +10 -1
- package/lib/menu/src/MenuOption.d.ts +3 -1
- package/lib/menu/src/MenuOptionContent.d.ts +3 -1
- package/lib/menu/src/Submenu.d.ts +3 -1
- package/lib/modal/src/BodyWrapper.d.ts +5 -0
- package/lib/modal/src/Modal.d.ts +36 -55
- package/lib/modal/src/Modal.js +17 -38
- package/lib/modal/src/presetProps.d.ts +2 -1
- package/lib/modal/styles/light.d.ts +1 -0
- package/lib/notification/src/Notification.d.ts +1 -1
- package/lib/notification/src/NotificationEnvironment.d.ts +1 -1
- package/lib/notification/src/NotificationProvider.d.ts +16 -16
- package/lib/page-header/src/PageHeader.d.ts +1 -0
- package/lib/page-header/src/PageHeader.js +8 -2
- package/lib/page-header/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/page-header/src/styles/rtl.cssr.js +26 -0
- package/lib/page-header/styles/index.d.ts +1 -0
- package/lib/page-header/styles/index.js +3 -1
- package/lib/page-header/styles/rtl.d.ts +5 -0
- package/lib/page-header/styles/rtl.js +7 -0
- package/lib/pagination/src/Pagination.d.ts +111 -100
- package/lib/pagination/styles/light.d.ts +10 -8
- package/lib/popconfirm/src/Popconfirm.d.ts +8 -22
- package/lib/popover/src/Popover.d.ts +12 -32
- package/lib/popover/src/Popover.js +23 -16
- package/lib/popover/src/PopoverBody.d.ts +2 -2
- package/lib/popover/src/PopoverBody.js +4 -2
- package/lib/popselect/src/Popselect.d.ts +18 -22
- package/lib/popselect/src/PopselectPanel.d.ts +1 -0
- package/lib/popselect/src/PopselectPanel.js +38 -19
- package/lib/popselect/styles/light.d.ts +1 -0
- package/lib/select/src/Select.d.ts +111 -83
- package/lib/select/src/Select.js +55 -56
- package/lib/select/src/interface.d.ts +2 -2
- package/lib/select/styles/light.d.ts +10 -8
- package/lib/spin/src/Spin.d.ts +34 -25
- package/lib/spin/src/Spin.js +25 -18
- package/lib/spin/src/styles/index.cssr.js +23 -9
- package/lib/spin/styles/light.d.ts +2 -0
- package/lib/spin/styles/light.js +3 -1
- package/lib/styles.d.ts +1 -0
- package/lib/styles.js +63 -61
- package/lib/tabs/src/Tab.d.ts +1 -1
- package/lib/tabs/src/Tab.js +4 -6
- package/lib/tabs/src/Tabs.d.ts +133 -42
- package/lib/tabs/src/Tabs.js +36 -37
- package/lib/tabs/src/interface.d.ts +2 -1
- package/lib/tabs/src/styles/index.cssr.js +34 -10
- package/lib/tabs/styles/_common.d.ts +6 -0
- package/lib/tabs/styles/_common.js +6 -0
- package/lib/tabs/styles/dark.js +7 -1
- package/lib/tabs/styles/light.d.ts +13 -0
- package/lib/tabs/styles/light.js +3 -3
- package/lib/tag/src/styles/index.cssr.js +1 -1
- package/lib/time/src/Time.d.ts +14 -22
- package/lib/time/src/Time.js +31 -17
- package/lib/time-picker/src/TimePicker.d.ts +5 -0
- package/lib/time-picker/src/TimePicker.js +2 -2
- package/lib/tooltip/src/Tooltip.d.ts +8 -22
- package/lib/transfer/src/TransferList.d.ts +1 -1
- package/lib/tree/src/Tree.d.ts +25 -10
- package/lib/tree/src/Tree.js +34 -11
- package/lib/tree/src/TreeNode.js +5 -2
- package/lib/tree/src/interface.d.ts +2 -2
- package/lib/tree-select/src/TreeSelect.d.ts +103 -81
- package/lib/tree-select/src/TreeSelect.js +36 -40
- package/lib/tree-select/src/interface.d.ts +2 -2
- package/lib/tree-select/styles/light.d.ts +9 -8
- package/lib/typography/src/blockquote.d.ts +2 -8
- package/lib/typography/src/blockquote.js +1 -4
- package/lib/typography/src/ol.d.ts +2 -8
- package/lib/typography/src/ol.js +1 -4
- package/lib/typography/src/p.d.ts +2 -2
- package/lib/typography/src/p.js +1 -1
- package/lib/typography/src/text.d.ts +14 -58
- package/lib/typography/src/text.js +2 -23
- package/lib/typography/src/ul.d.ts +2 -8
- package/lib/typography/src/ul.js +1 -4
- package/lib/upload/index.d.ts +2 -0
- package/lib/upload/index.js +5 -1
- package/lib/upload/src/Upload.d.ts +16 -68
- package/lib/upload/src/Upload.js +68 -95
- package/lib/upload/src/UploadDragger.js +7 -1
- package/lib/upload/src/UploadFileList.d.ts +2 -0
- package/lib/upload/src/UploadFileList.js +36 -0
- package/lib/upload/src/UploadProgress.d.ts +0 -7
- package/lib/upload/src/UploadProgress.js +1 -5
- package/lib/upload/src/UploadTrigger.d.ts +12 -0
- package/lib/upload/src/UploadTrigger.js +65 -0
- package/lib/upload/src/interface.d.ts +13 -2
- package/lib/upload/src/styles/index.cssr.js +40 -32
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +9 -7
- package/web-types.json +239 -13
|
@@ -54,9 +54,14 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
54
54
|
});
|
|
55
55
|
const filterablePlaceholderRef = (0, vue_1.computed)(() => {
|
|
56
56
|
return props.selectedOption
|
|
57
|
-
? props.
|
|
58
|
-
? props.
|
|
59
|
-
|
|
57
|
+
? props.renderTag
|
|
58
|
+
? props.renderTag({
|
|
59
|
+
option: props.selectedOption,
|
|
60
|
+
handleClose: () => { }
|
|
61
|
+
})
|
|
62
|
+
: props.renderLabel
|
|
63
|
+
? props.renderLabel(props.selectedOption, true)
|
|
64
|
+
: (0, _utils_1.render)(props.selectedOption.label, props.selectedOption, true)
|
|
60
65
|
: props.placeholder;
|
|
61
66
|
});
|
|
62
67
|
const labelRef = (0, vue_1.computed)(() => {
|
|
@@ -329,7 +334,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
329
334
|
// form error
|
|
330
335
|
colorActiveError, boxShadowFocusError, boxShadowActiveError, boxShadowHoverError, borderError, borderFocusError, borderHoverError, borderActiveError,
|
|
331
336
|
// clear
|
|
332
|
-
clearColor, clearColorHover, clearColorPressed, clearSize,
|
|
337
|
+
clearColor, clearColorHover, clearColorPressed, clearSize,
|
|
338
|
+
// arrow
|
|
339
|
+
arrowSize, [(0, _utils_1.createKey)('height', size)]: height, [(0, _utils_1.createKey)('fontSize', size)]: fontSize } } = themeRef.value;
|
|
333
340
|
return {
|
|
334
341
|
'--bezier': cubicBezierEaseInOut,
|
|
335
342
|
'--border': border,
|
|
@@ -376,7 +383,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
376
383
|
'--clear-size': clearSize,
|
|
377
384
|
'--clear-color': clearColor,
|
|
378
385
|
'--clear-color-hover': clearColorHover,
|
|
379
|
-
'--clear-color-pressed': clearColorPressed
|
|
386
|
+
'--clear-color-pressed': clearColorPressed,
|
|
387
|
+
// arrow-size
|
|
388
|
+
'--arrow-size': arrowSize
|
|
380
389
|
};
|
|
381
390
|
})
|
|
382
391
|
};
|
|
@@ -451,7 +460,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
451
460
|
themeOverrides: this.mergedTheme.peerOverrides.Popover
|
|
452
461
|
}
|
|
453
462
|
: null;
|
|
454
|
-
const placeholder = !this.selected && !this.pattern && !this.isCompositing ? ((0, vue_1.h)("div", { class: `${clsPrefix}-base-selection-placeholder ${clsPrefix}-base-
|
|
463
|
+
const placeholder = !this.selected && !this.pattern && !this.isCompositing ? ((0, vue_1.h)("div", { class: `${clsPrefix}-base-selection-placeholder ${clsPrefix}-base-selection-overlay` }, this.placeholder)) : null;
|
|
455
464
|
if (filterable) {
|
|
456
465
|
const popoverTrigger = ((0, vue_1.h)("div", { ref: "patternInputWrapperRef", class: `${clsPrefix}-base-selection-tags` },
|
|
457
466
|
tags,
|
|
@@ -482,19 +491,30 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
482
491
|
(this.active || !this.selected) &&
|
|
483
492
|
!this.isCompositing;
|
|
484
493
|
body = ((0, vue_1.h)("div", { ref: "patternInputWrapperRef", class: `${clsPrefix}-base-selection-label` },
|
|
485
|
-
(0, vue_1.h)("input", { ref: "patternInputRef", class: `${clsPrefix}-base-selection-
|
|
494
|
+
(0, vue_1.h)("input", { ref: "patternInputRef", class: `${clsPrefix}-base-selection-input`, value: this.patternInputFocused && this.active ? this.pattern : '', placeholder: "", readonly: disabled, disabled: disabled, tabindex: -1, autofocus: this.autofocus, onFocus: this.handlePatternInputFocus, onBlur: this.handlePatternInputBlur, onInput: this.handlePatternInputInput, onCompositionstart: this.handleCompositionStart, onCompositionend: this.handleCompositionEnd }),
|
|
486
495
|
showPlaceholder ? null : this.patternInputFocused &&
|
|
487
|
-
this.active ? null : ((0, vue_1.h)("div", { class: `${clsPrefix}-base-selection-label__render-label ${clsPrefix}-base-
|
|
488
|
-
?
|
|
489
|
-
|
|
490
|
-
|
|
496
|
+
this.active ? null : ((0, vue_1.h)("div", { class: `${clsPrefix}-base-selection-label__render-label ${clsPrefix}-base-selection-overlay`, key: "input" }, renderTag
|
|
497
|
+
? renderTag({
|
|
498
|
+
option: this.selectedOption,
|
|
499
|
+
handleClose: () => { }
|
|
500
|
+
})
|
|
501
|
+
: renderLabel
|
|
502
|
+
? renderLabel(this.selectedOption, true)
|
|
503
|
+
: (0, _utils_1.render)(this.label, this.selectedOption, true))),
|
|
504
|
+
showPlaceholder ? ((0, vue_1.h)("div", { class: `${clsPrefix}-base-selection-placeholder ${clsPrefix}-base-selection-overlay`, key: "placeholder" }, this.filterablePlaceholder)) : null,
|
|
491
505
|
suffix));
|
|
492
506
|
}
|
|
493
507
|
else {
|
|
494
508
|
body = ((0, vue_1.h)("div", { ref: "singleElRef", class: `${clsPrefix}-base-selection-label`, tabindex: this.disabled ? undefined : 0 },
|
|
495
|
-
this.label !== undefined ? ((0, vue_1.h)("div", { class: `${clsPrefix}-base-selection-
|
|
496
|
-
|
|
497
|
-
|
|
509
|
+
this.label !== undefined ? ((0, vue_1.h)("div", { class: `${clsPrefix}-base-selection-input`, title: (0, _utils_1.getTitleAttribute)(this.label), key: "input" },
|
|
510
|
+
(0, vue_1.h)("div", { class: `${clsPrefix}-base-selection-input__content` }, renderTag
|
|
511
|
+
? renderTag({
|
|
512
|
+
option: this.selectedOption,
|
|
513
|
+
handleClose: () => { }
|
|
514
|
+
})
|
|
515
|
+
: renderLabel
|
|
516
|
+
? renderLabel(this.selectedOption, true)
|
|
517
|
+
: (0, _utils_1.render)(this.label, this.selectedOption, true)))) : ((0, vue_1.h)("div", { class: `${clsPrefix}-base-selection-placeholder ${clsPrefix}-base-selection-overlay`, key: "placeholder" }, this.placeholder)),
|
|
498
518
|
suffix));
|
|
499
519
|
}
|
|
500
520
|
}
|
|
@@ -26,6 +26,7 @@ const cssr_1 = require("../../../../_utils/cssr"); // vars:
|
|
|
26
26
|
// --text-color
|
|
27
27
|
// --text-color-disabled
|
|
28
28
|
// --arrow-color
|
|
29
|
+
// --arrow-size
|
|
29
30
|
// --loading-color
|
|
30
31
|
// ...clear vars
|
|
31
32
|
// ...form item vars
|
|
@@ -41,13 +42,10 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('base-selection', `
|
|
|
41
42
|
vertical-align: bottom;
|
|
42
43
|
border-radius: var(--border-radius);
|
|
43
44
|
min-height: var(--height);
|
|
44
|
-
line-height:
|
|
45
|
+
line-height: 1.5;
|
|
45
46
|
font-size: var(--font-size);
|
|
46
47
|
`, [(0, cssr_1.cB)('base-loading', `
|
|
47
48
|
color: var(--loading-color);
|
|
48
|
-
`), (0, cssr_1.cB)('base-selection-label', `
|
|
49
|
-
height: var(--height);
|
|
50
|
-
line-height: var(--height);
|
|
51
49
|
`), (0, cssr_1.cB)('base-selection-tags', {
|
|
52
50
|
minHeight: 'var(--height)'
|
|
53
51
|
}), (0, cssr_1.cE)('border, state-border', `
|
|
@@ -72,13 +70,14 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('base-selection', `
|
|
|
72
70
|
transform: translateY(-50%);
|
|
73
71
|
right: 10px;
|
|
74
72
|
`, [(0, cssr_1.cE)('arrow', `
|
|
73
|
+
font-size: var(--arrow-size);
|
|
75
74
|
color: var(--arrow-color);
|
|
76
75
|
transition: color .3s var(--bezier);
|
|
77
|
-
`)]), (0, cssr_1.cB)('base-
|
|
76
|
+
`)]), (0, cssr_1.cB)('base-selection-overlay', `
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
78
79
|
white-space: nowrap;
|
|
79
80
|
overflow: hidden;
|
|
80
|
-
height: var(--height);
|
|
81
|
-
line-height: var(--height);
|
|
82
81
|
pointer-events: none;
|
|
83
82
|
position: absolute;
|
|
84
83
|
top: 0;
|
|
@@ -108,7 +107,8 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('base-selection', `
|
|
|
108
107
|
box-shadow .3s var(--bezier),
|
|
109
108
|
background-color .3s var(--bezier);
|
|
110
109
|
`), (0, cssr_1.cB)('base-selection-label', `
|
|
111
|
-
|
|
110
|
+
height: var(--height);
|
|
111
|
+
display: inline-flex;
|
|
112
112
|
width: 100%;
|
|
113
113
|
vertical-align: bottom;
|
|
114
114
|
cursor: pointer;
|
|
@@ -122,22 +122,24 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('base-selection', `
|
|
|
122
122
|
background-color .3s var(--bezier);
|
|
123
123
|
border-radius: inherit;
|
|
124
124
|
background-color: var(--color);
|
|
125
|
-
|
|
125
|
+
align-items: center;
|
|
126
|
+
`, [(0, cssr_1.cB)('base-selection-input', `
|
|
126
127
|
line-height: inherit;
|
|
127
128
|
outline: none;
|
|
128
129
|
cursor: pointer;
|
|
129
130
|
box-sizing: border-box;
|
|
130
|
-
text-overflow: ellipsis;
|
|
131
|
-
overflow: hidden;
|
|
132
131
|
border:none;
|
|
133
132
|
width: 100%;
|
|
134
|
-
white-space: nowrap;
|
|
135
133
|
padding: var(--padding-single);
|
|
136
134
|
background-color: #0000;
|
|
137
135
|
color: var(--text-color);
|
|
138
136
|
transition: color .3s var(--bezier);
|
|
139
137
|
caret-color: var(--caret-color);
|
|
140
|
-
|
|
138
|
+
`, [(0, cssr_1.cE)('content', `
|
|
139
|
+
text-overflow: ellipsis;
|
|
140
|
+
overflow: hidden;
|
|
141
|
+
white-space: nowrap;
|
|
142
|
+
`)]), (0, cssr_1.cE)('render-label', `
|
|
141
143
|
color: var(--text-color);
|
|
142
144
|
`)]), (0, cssr_1.cNotM)('disabled', [(0, cssr_1.c)('&:hover', [(0, cssr_1.cE)('state-border', `
|
|
143
145
|
box-shadow: var(--box-shadow-hover);
|
|
@@ -159,7 +161,7 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('base-selection', `
|
|
|
159
161
|
`), (0, cssr_1.cB)('base-selection-label', `
|
|
160
162
|
cursor: not-allowed;
|
|
161
163
|
background-color: var(--color-disabled);
|
|
162
|
-
`, [(0, cssr_1.
|
|
164
|
+
`, [(0, cssr_1.cB)('base-selection-input', `
|
|
163
165
|
cursor: not-allowed;
|
|
164
166
|
color: var(--text-color-disabled);
|
|
165
167
|
`), (0, cssr_1.cE)('render-label', `
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
heightTiny: string;
|
|
3
|
-
heightSmall: string;
|
|
4
|
-
heightMedium: string;
|
|
5
|
-
heightLarge: string;
|
|
6
|
-
fontSizeTiny: string;
|
|
7
|
-
fontSizeSmall: string;
|
|
8
|
-
fontSizeMedium: string;
|
|
9
|
-
fontSizeLarge: string;
|
|
10
2
|
paddingSingle: string;
|
|
11
3
|
clearSize: string;
|
|
4
|
+
arrowSize: string;
|
|
12
5
|
};
|
|
13
6
|
export default _default;
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
|
-
heightTiny: '22px',
|
|
5
|
-
heightSmall: '28px',
|
|
6
|
-
heightMedium: '34px',
|
|
7
|
-
heightLarge: '40px',
|
|
8
|
-
fontSizeTiny: '12px',
|
|
9
|
-
fontSizeSmall: '14px',
|
|
10
|
-
fontSizeMedium: '14px',
|
|
11
|
-
fontSizeLarge: '15px',
|
|
12
4
|
paddingSingle: '0 26px 0 14px',
|
|
13
|
-
clearSize: '16px'
|
|
5
|
+
clearSize: '16px',
|
|
6
|
+
arrowSize: '16px'
|
|
14
7
|
};
|
|
@@ -11,8 +11,16 @@ const internalSelectionDark = {
|
|
|
11
11
|
Popover: styles_1.popoverDark
|
|
12
12
|
},
|
|
13
13
|
self(vars) {
|
|
14
|
-
const { borderRadius, textColor2, textColorDisabled, inputColor, inputColorDisabled, primaryColor, primaryColorHover, warningColor, warningColorHover, errorColor, errorColorHover, iconColor, iconColorDisabled, clearColor, clearColorHover, clearColorPressed, placeholderColor, placeholderColorDisabled } = vars;
|
|
15
|
-
return Object.assign(Object.assign({}, _common_1.default), {
|
|
14
|
+
const { borderRadius, textColor2, textColorDisabled, inputColor, inputColorDisabled, primaryColor, primaryColorHover, warningColor, warningColorHover, errorColor, errorColorHover, iconColor, iconColorDisabled, clearColor, clearColorHover, clearColorPressed, placeholderColor, placeholderColorDisabled, fontSizeTiny, fontSizeSmall, fontSizeMedium, fontSizeLarge, heightTiny, heightSmall, heightMedium, heightLarge } = vars;
|
|
15
|
+
return Object.assign(Object.assign({}, _common_1.default), { fontSizeTiny,
|
|
16
|
+
fontSizeSmall,
|
|
17
|
+
fontSizeMedium,
|
|
18
|
+
fontSizeLarge,
|
|
19
|
+
heightTiny,
|
|
20
|
+
heightSmall,
|
|
21
|
+
heightMedium,
|
|
22
|
+
heightLarge,
|
|
23
|
+
borderRadius,
|
|
16
24
|
// default
|
|
17
25
|
textColor: textColor2, textColorDisabled,
|
|
18
26
|
placeholderColor,
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import type { ThemeCommonVars } from '../../../_styles/common';
|
|
2
2
|
declare const self: (vars: ThemeCommonVars) => {
|
|
3
|
+
fontSizeTiny: string;
|
|
4
|
+
fontSizeSmall: string;
|
|
5
|
+
fontSizeMedium: string;
|
|
6
|
+
fontSizeLarge: string;
|
|
7
|
+
heightTiny: string;
|
|
8
|
+
heightSmall: string;
|
|
9
|
+
heightMedium: string;
|
|
10
|
+
heightLarge: string;
|
|
3
11
|
borderRadius: string;
|
|
4
12
|
textColor: string;
|
|
5
13
|
textColorDisabled: string;
|
|
@@ -40,19 +48,20 @@ declare const self: (vars: ThemeCommonVars) => {
|
|
|
40
48
|
clearColor: string;
|
|
41
49
|
clearColorHover: string;
|
|
42
50
|
clearColorPressed: string;
|
|
43
|
-
heightTiny: string;
|
|
44
|
-
heightSmall: string;
|
|
45
|
-
heightMedium: string;
|
|
46
|
-
heightLarge: string;
|
|
47
|
-
fontSizeTiny: string;
|
|
48
|
-
fontSizeSmall: string;
|
|
49
|
-
fontSizeMedium: string;
|
|
50
|
-
fontSizeLarge: string;
|
|
51
51
|
paddingSingle: string;
|
|
52
52
|
clearSize: string;
|
|
53
|
+
arrowSize: string;
|
|
53
54
|
};
|
|
54
55
|
export declare type InternalSelectionThemeVars = ReturnType<typeof self>;
|
|
55
56
|
declare const internalSelectionLight: import("../../../_mixins").Theme<"InternalSelection", {
|
|
57
|
+
fontSizeTiny: string;
|
|
58
|
+
fontSizeSmall: string;
|
|
59
|
+
fontSizeMedium: string;
|
|
60
|
+
fontSizeLarge: string;
|
|
61
|
+
heightTiny: string;
|
|
62
|
+
heightSmall: string;
|
|
63
|
+
heightMedium: string;
|
|
64
|
+
heightLarge: string;
|
|
56
65
|
borderRadius: string;
|
|
57
66
|
textColor: string;
|
|
58
67
|
textColorDisabled: string;
|
|
@@ -93,16 +102,9 @@ declare const internalSelectionLight: import("../../../_mixins").Theme<"Internal
|
|
|
93
102
|
clearColor: string;
|
|
94
103
|
clearColorHover: string;
|
|
95
104
|
clearColorPressed: string;
|
|
96
|
-
heightTiny: string;
|
|
97
|
-
heightSmall: string;
|
|
98
|
-
heightMedium: string;
|
|
99
|
-
heightLarge: string;
|
|
100
|
-
fontSizeTiny: string;
|
|
101
|
-
fontSizeSmall: string;
|
|
102
|
-
fontSizeMedium: string;
|
|
103
|
-
fontSizeLarge: string;
|
|
104
105
|
paddingSingle: string;
|
|
105
106
|
clearSize: string;
|
|
107
|
+
arrowSize: string;
|
|
106
108
|
}, {
|
|
107
109
|
Popover: import("../../../_mixins").Theme<"Popover", {
|
|
108
110
|
fontSize: string;
|
|
@@ -6,8 +6,16 @@ const styles_1 = require("../../../popover/styles");
|
|
|
6
6
|
const _common_1 = require("./_common");
|
|
7
7
|
const _mixins_1 = require("../../../_mixins");
|
|
8
8
|
const self = (vars) => {
|
|
9
|
-
const { borderRadius, textColor2, textColorDisabled, inputColor, inputColorDisabled, primaryColor, primaryColorHover, warningColor, warningColorHover, errorColor, errorColorHover, borderColor, iconColor, iconColorDisabled, clearColor, clearColorHover, clearColorPressed, placeholderColor, placeholderColorDisabled } = vars;
|
|
10
|
-
return Object.assign(Object.assign({}, _common_1.default), {
|
|
9
|
+
const { borderRadius, textColor2, textColorDisabled, inputColor, inputColorDisabled, primaryColor, primaryColorHover, warningColor, warningColorHover, errorColor, errorColorHover, borderColor, iconColor, iconColorDisabled, clearColor, clearColorHover, clearColorPressed, placeholderColor, placeholderColorDisabled, fontSizeTiny, fontSizeSmall, fontSizeMedium, fontSizeLarge, heightTiny, heightSmall, heightMedium, heightLarge } = vars;
|
|
10
|
+
return Object.assign(Object.assign({}, _common_1.default), { fontSizeTiny,
|
|
11
|
+
fontSizeSmall,
|
|
12
|
+
fontSizeMedium,
|
|
13
|
+
fontSizeLarge,
|
|
14
|
+
heightTiny,
|
|
15
|
+
heightSmall,
|
|
16
|
+
heightMedium,
|
|
17
|
+
heightLarge,
|
|
18
|
+
borderRadius,
|
|
11
19
|
// default
|
|
12
20
|
textColor: textColor2, textColorDisabled,
|
|
13
21
|
placeholderColor,
|
package/lib/_mixins/use-rtl.js
CHANGED
|
@@ -25,7 +25,7 @@ function useRtl(mountId, rtlStateRef, clsPrefixRef) {
|
|
|
25
25
|
// if it already exists, we only need to watch clsPrefix, although in most
|
|
26
26
|
// of time it's unnecessary... However we can at least listen less
|
|
27
27
|
// handlers, which is great.
|
|
28
|
-
if ((0, css_render_1.exists)(id))
|
|
28
|
+
if ((0, css_render_1.exists)(id, ssrAdapter))
|
|
29
29
|
return;
|
|
30
30
|
const { value: componentRtlState } = componentRtlStateRef;
|
|
31
31
|
if (!componentRtlState)
|
|
@@ -89,7 +89,7 @@ const derived = Object.assign(Object.assign({ name: 'common' }, _common_1.defaul
|
|
|
89
89
|
// close
|
|
90
90
|
closeColor: neutral(Number(base.alphaClose)), closeColorHover: neutral(Number(base.alphaClose) * 1.25), closeColorPressed: neutral(Number(base.alphaClose) * 0.8), closeColorDisabled: neutral(base.alpha4),
|
|
91
91
|
// clear
|
|
92
|
-
clearColor: neutral(base.alpha4), clearColorHover: (0, seemly_1.scaleColor)(neutral(base.alpha4), { lightness: 0.75 }), clearColorPressed: (0, seemly_1.scaleColor)(neutral(base.alpha4), { lightness: 0.9 }), scrollbarColor: overlay(base.alphaScrollbar), scrollbarColorHover: overlay(base.alphaScrollbarHover), scrollbarWidth: '5px', scrollbarHeight: '5px', scrollbarBorderRadius: '5px', progressRailColor: neutral(base.alphaProgressRail), railColor: 'rgb(219, 219, 223)', popoverColor: base.neutralPopover, tableColor: base.neutralCard, cardColor: base.neutralCard, modalColor: base.neutralModal, bodyColor: base.neutralBody, tagColor: 'rgb(250, 250, 252)', avatarColor: neutral(base.alphaAvatar), invertedColor: 'rgb(0, 20, 40)', inputColor: neutral(base.alphaInput), codeColor: 'rgb(244, 244, 248)', tabColor: 'rgb(
|
|
92
|
+
clearColor: neutral(base.alpha4), clearColorHover: (0, seemly_1.scaleColor)(neutral(base.alpha4), { lightness: 0.75 }), clearColorPressed: (0, seemly_1.scaleColor)(neutral(base.alpha4), { lightness: 0.9 }), scrollbarColor: overlay(base.alphaScrollbar), scrollbarColorHover: overlay(base.alphaScrollbarHover), scrollbarWidth: '5px', scrollbarHeight: '5px', scrollbarBorderRadius: '5px', progressRailColor: neutral(base.alphaProgressRail), railColor: 'rgb(219, 219, 223)', popoverColor: base.neutralPopover, tableColor: base.neutralCard, cardColor: base.neutralCard, modalColor: base.neutralModal, bodyColor: base.neutralBody, tagColor: 'rgb(250, 250, 252)', avatarColor: neutral(base.alphaAvatar), invertedColor: 'rgb(0, 20, 40)', inputColor: neutral(base.alphaInput), codeColor: 'rgb(244, 244, 248)', tabColor: 'rgb(247, 247, 250)', actionColor: 'rgb(250, 250, 252)', tableHeaderColor: 'rgb(250, 250, 252)', hoverColor: 'rgb(243, 243, 245)',
|
|
93
93
|
// use color with alpha since it can be nested with header filter & sorter effect
|
|
94
94
|
tableColorHover: 'rgba(0, 0, 100, 0.02)', pressedColor: 'rgb(237, 237, 239)', opacityDisabled: base.alphaDisabled, inputColorDisabled: 'rgb(250, 250, 252)', boxShadow1: '0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)', boxShadow2: '0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)', boxShadow3: '0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)' });
|
|
95
95
|
exports.default = derived;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare type Mutable<T> = {
|
|
1
|
+
export declare type Mutable<T> = T extends Record<string, unknown> ? {
|
|
2
2
|
-readonly [P in keyof T]: T[P] extends ReadonlyArray<infer U> ? Array<Mutable<U>> : Mutable<T[P]>;
|
|
3
|
-
};
|
|
3
|
+
} : T;
|
package/lib/alert/src/Alert.js
CHANGED
|
@@ -98,20 +98,20 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
98
98
|
};
|
|
99
99
|
},
|
|
100
100
|
render() {
|
|
101
|
-
const { mergedClsPrefix } = this;
|
|
102
101
|
return ((0, vue_1.h)(_internal_1.NFadeInExpandTransition, { onAfterLeave: this.handleAfterLeave }, {
|
|
103
|
-
default: () =>
|
|
104
|
-
|
|
102
|
+
default: () => {
|
|
103
|
+
const { mergedClsPrefix, $slots } = this;
|
|
104
|
+
const attrs = {
|
|
105
105
|
class: [
|
|
106
106
|
`${mergedClsPrefix}-alert`,
|
|
107
|
-
{
|
|
108
|
-
[`${mergedClsPrefix}-alert--show-icon`]: this.showIcon
|
|
109
|
-
}
|
|
107
|
+
this.showIcon && `${mergedClsPrefix}-alert--show-icon`
|
|
110
108
|
],
|
|
111
|
-
style: this.cssVars
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
109
|
+
style: this.cssVars,
|
|
110
|
+
role: 'alert'
|
|
111
|
+
};
|
|
112
|
+
return this.visible ? ((0, vue_1.h)("div", Object.assign({}, (0, vue_1.mergeProps)(this.$attrs, attrs)),
|
|
113
|
+
this.closable && ((0, vue_1.h)(_internal_1.NBaseClose, { clsPrefix: mergedClsPrefix, class: `${mergedClsPrefix}-alert__close`, onClick: this.handleCloseClick })),
|
|
114
|
+
this.showIcon && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-alert__icon`, "aria-hidden": "true" }, $slots.icon ? ($slots.icon()) : ((0, vue_1.h)(_internal_1.NBaseIcon, { clsPrefix: mergedClsPrefix }, {
|
|
115
115
|
default: () => {
|
|
116
116
|
switch (this.type) {
|
|
117
117
|
case 'success':
|
|
@@ -126,14 +126,13 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
}))))
|
|
129
|
+
})))),
|
|
130
130
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-alert-body` },
|
|
131
|
-
this.title !== undefined
|
|
131
|
+
this.title !== undefined && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-alert-body__title` }, (0, vue_1.renderSlot)($slots, 'header', undefined, () => [
|
|
132
132
|
this.title
|
|
133
|
-
])))
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
: null
|
|
133
|
+
]))),
|
|
134
|
+
$slots.default && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-alert-body__content` }, $slots))))) : null;
|
|
135
|
+
}
|
|
137
136
|
}));
|
|
138
137
|
}
|
|
139
138
|
});
|
|
@@ -3,6 +3,10 @@ export interface AnchorInst {
|
|
|
3
3
|
scrollTo: (href: string) => void;
|
|
4
4
|
}
|
|
5
5
|
declare const anchorProps: {
|
|
6
|
+
readonly type: {
|
|
7
|
+
readonly type: import("vue").PropType<"block" | "rail">;
|
|
8
|
+
readonly default: "rail";
|
|
9
|
+
};
|
|
6
10
|
readonly showRail: {
|
|
7
11
|
readonly type: BooleanConstructor;
|
|
8
12
|
readonly default: true;
|
|
@@ -41,10 +45,7 @@ declare const anchorProps: {
|
|
|
41
45
|
readonly validator: () => boolean;
|
|
42
46
|
readonly default: undefined;
|
|
43
47
|
};
|
|
44
|
-
readonly affix:
|
|
45
|
-
readonly type: BooleanConstructor;
|
|
46
|
-
readonly default: false;
|
|
47
|
-
};
|
|
48
|
+
readonly affix: BooleanConstructor;
|
|
48
49
|
readonly theme: import("vue").PropType<import("../../_mixins").Theme<"Anchor", {
|
|
49
50
|
borderRadius: string;
|
|
50
51
|
railColor: string;
|
|
@@ -87,6 +88,10 @@ declare const anchorProps: {
|
|
|
87
88
|
};
|
|
88
89
|
export declare type AnchorProps = ExtractPublicPropTypes<typeof anchorProps>;
|
|
89
90
|
declare const _default: import("vue").DefineComponent<{
|
|
91
|
+
readonly type: {
|
|
92
|
+
readonly type: import("vue").PropType<"block" | "rail">;
|
|
93
|
+
readonly default: "rail";
|
|
94
|
+
};
|
|
90
95
|
readonly showRail: {
|
|
91
96
|
readonly type: BooleanConstructor;
|
|
92
97
|
readonly default: true;
|
|
@@ -125,10 +130,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
125
130
|
readonly validator: () => boolean;
|
|
126
131
|
readonly default: undefined;
|
|
127
132
|
};
|
|
128
|
-
readonly affix:
|
|
129
|
-
readonly type: BooleanConstructor;
|
|
130
|
-
readonly default: false;
|
|
131
|
-
};
|
|
133
|
+
readonly affix: BooleanConstructor;
|
|
132
134
|
readonly theme: import("vue").PropType<import("../../_mixins").Theme<"Anchor", {
|
|
133
135
|
borderRadius: string;
|
|
134
136
|
railColor: string;
|
|
@@ -172,6 +174,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
172
174
|
scrollTo(href: string): void;
|
|
173
175
|
renderAnchor: () => JSX.Element;
|
|
174
176
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
177
|
+
readonly type?: unknown;
|
|
175
178
|
readonly showRail?: unknown;
|
|
176
179
|
readonly showBackground?: unknown;
|
|
177
180
|
readonly bound?: unknown;
|
|
@@ -191,6 +194,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
191
194
|
readonly themeOverrides?: unknown;
|
|
192
195
|
readonly builtinThemeOverrides?: unknown;
|
|
193
196
|
} & {
|
|
197
|
+
type: "block" | "rail";
|
|
194
198
|
bound: number;
|
|
195
199
|
position: "absolute" | "fix";
|
|
196
200
|
affix: boolean;
|
|
@@ -247,6 +251,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
247
251
|
offsetBottom?: number | undefined;
|
|
248
252
|
offsetTarget?: string | import("./utils").OffsetTarget | (() => HTMLElement) | undefined;
|
|
249
253
|
}>, {
|
|
254
|
+
type: "block" | "rail";
|
|
250
255
|
bound: number;
|
|
251
256
|
position: "absolute" | "fix";
|
|
252
257
|
target: (() => HTMLElement) | undefined;
|
|
@@ -8,10 +8,7 @@ const _utils_1 = require("../../_utils");
|
|
|
8
8
|
const styles_1 = require("../styles");
|
|
9
9
|
const index_cssr_1 = require("./styles/index.cssr");
|
|
10
10
|
const BaseAnchor_1 = require("./BaseAnchor");
|
|
11
|
-
const anchorProps = Object.assign(Object.assign(Object.assign(Object.assign({}, _mixins_1.useTheme.props), { affix:
|
|
12
|
-
type: Boolean,
|
|
13
|
-
default: false
|
|
14
|
-
} }), Affix_1.affixProps), BaseAnchor_1.baseAnchorProps);
|
|
11
|
+
const anchorProps = Object.assign(Object.assign(Object.assign(Object.assign({}, _mixins_1.useTheme.props), { affix: Boolean }), Affix_1.affixProps), BaseAnchor_1.baseAnchorProps);
|
|
15
12
|
exports.default = (0, vue_1.defineComponent)({
|
|
16
13
|
name: 'Anchor',
|
|
17
14
|
props: anchorProps,
|
|
@@ -20,8 +17,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
20
17
|
const themeRef = (0, _mixins_1.useTheme)('Anchor', 'Anchor', index_cssr_1.default, styles_1.anchorLight, props, mergedClsPrefixRef);
|
|
21
18
|
const anchorRef = (0, vue_1.ref)(null);
|
|
22
19
|
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
23
|
-
const { self: { railColor, linkColor, railColorActive, linkTextColor, linkTextColorHover, linkTextColorPressed, linkTextColorActive, linkFontSize, railWidth, linkPadding }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
20
|
+
const { self: { railColor, linkColor, railColorActive, linkTextColor, linkTextColorHover, linkTextColorPressed, linkTextColorActive, linkFontSize, railWidth, linkPadding, borderRadius }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
24
21
|
return {
|
|
22
|
+
'--link-border-radius': borderRadius,
|
|
25
23
|
'--link-color': linkColor,
|
|
26
24
|
'--link-font-size': linkFontSize,
|
|
27
25
|
'--link-text-color': linkTextColor,
|
|
@@ -4,6 +4,10 @@ export interface BaseAnchorInst {
|
|
|
4
4
|
setActiveHref: (href: string) => void;
|
|
5
5
|
}
|
|
6
6
|
export declare const baseAnchorProps: {
|
|
7
|
+
readonly type: {
|
|
8
|
+
readonly type: PropType<"block" | "rail">;
|
|
9
|
+
readonly default: "rail";
|
|
10
|
+
};
|
|
7
11
|
readonly showRail: {
|
|
8
12
|
readonly type: BooleanConstructor;
|
|
9
13
|
readonly default: true;
|
|
@@ -19,12 +23,16 @@ export declare const baseAnchorProps: {
|
|
|
19
23
|
readonly ignoreGap: BooleanConstructor;
|
|
20
24
|
readonly offsetTarget: PropType<string | OffsetTarget | (() => HTMLElement)>;
|
|
21
25
|
};
|
|
22
|
-
export declare const baseAnchorPropKeys: ("bound" | "showRail" | "showBackground" | "ignoreGap" | "offsetTarget")[];
|
|
26
|
+
export declare const baseAnchorPropKeys: ("type" | "bound" | "showRail" | "showBackground" | "ignoreGap" | "offsetTarget")[];
|
|
23
27
|
declare const _default: import("vue").DefineComponent<{
|
|
24
28
|
mergedClsPrefix: {
|
|
25
29
|
type: StringConstructor;
|
|
26
30
|
required: true;
|
|
27
31
|
};
|
|
32
|
+
type: {
|
|
33
|
+
readonly type: PropType<"block" | "rail">;
|
|
34
|
+
readonly default: "rail";
|
|
35
|
+
};
|
|
28
36
|
showRail: {
|
|
29
37
|
readonly type: BooleanConstructor;
|
|
30
38
|
readonly default: true;
|
|
@@ -45,14 +53,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
45
53
|
slotRef: import("vue").Ref<HTMLElement | null>;
|
|
46
54
|
setActiveHref: (href: string, transition?: boolean) => void;
|
|
47
55
|
activeHref: import("vue").Ref<string | null>;
|
|
56
|
+
isBlockType: import("vue").ComputedRef<boolean>;
|
|
57
|
+
mergedShowRail: import("vue").ComputedRef<boolean>;
|
|
48
58
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
49
59
|
mergedClsPrefix?: unknown;
|
|
60
|
+
type?: unknown;
|
|
50
61
|
showRail?: unknown;
|
|
51
62
|
showBackground?: unknown;
|
|
52
63
|
bound?: unknown;
|
|
53
64
|
ignoreGap?: unknown;
|
|
54
65
|
offsetTarget?: unknown;
|
|
55
66
|
} & {
|
|
67
|
+
type: "block" | "rail";
|
|
56
68
|
bound: number;
|
|
57
69
|
mergedClsPrefix: string;
|
|
58
70
|
showRail: boolean;
|
|
@@ -61,6 +73,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
61
73
|
} & {
|
|
62
74
|
offsetTarget?: string | OffsetTarget | (() => HTMLElement) | undefined;
|
|
63
75
|
}>, {
|
|
76
|
+
type: "block" | "rail";
|
|
64
77
|
bound: number;
|
|
65
78
|
showRail: boolean;
|
|
66
79
|
showBackground: boolean;
|
|
@@ -9,6 +9,10 @@ const Link_1 = require("./Link");
|
|
|
9
9
|
const lodash_1 = require("lodash");
|
|
10
10
|
const utils_1 = require("./utils");
|
|
11
11
|
exports.baseAnchorProps = {
|
|
12
|
+
type: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: 'rail'
|
|
15
|
+
},
|
|
12
16
|
showRail: {
|
|
13
17
|
type: Boolean,
|
|
14
18
|
default: true
|
|
@@ -38,6 +42,12 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
38
42
|
const slotRef = (0, vue_1.ref)(null);
|
|
39
43
|
const barRef = (0, vue_1.ref)(null);
|
|
40
44
|
const selfRef = (0, vue_1.ref)(null);
|
|
45
|
+
const isBlockTypeRef = (0, vue_1.computed)(() => {
|
|
46
|
+
return props.type === 'block';
|
|
47
|
+
});
|
|
48
|
+
const mergedShowRailRef = (0, vue_1.computed)(() => {
|
|
49
|
+
return !isBlockTypeRef.value && props.showRail;
|
|
50
|
+
});
|
|
41
51
|
function disableTransitionOneTick() {
|
|
42
52
|
const { value: barEl } = barRef;
|
|
43
53
|
const { value: slotEl } = slotRef;
|
|
@@ -210,7 +220,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
210
220
|
(0, vue_1.watch)(activeHrefRef, (value) => {
|
|
211
221
|
if (value === null) {
|
|
212
222
|
const { value: slotEl } = slotRef;
|
|
213
|
-
if (slotEl) {
|
|
223
|
+
if (slotEl && !isBlockTypeRef.value) {
|
|
214
224
|
slotEl.style.maxWidth = '0';
|
|
215
225
|
}
|
|
216
226
|
}
|
|
@@ -220,18 +230,21 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
220
230
|
barRef,
|
|
221
231
|
slotRef,
|
|
222
232
|
setActiveHref,
|
|
223
|
-
activeHref: activeHrefRef
|
|
233
|
+
activeHref: activeHrefRef,
|
|
234
|
+
isBlockType: isBlockTypeRef,
|
|
235
|
+
mergedShowRail: mergedShowRailRef
|
|
224
236
|
};
|
|
225
237
|
},
|
|
226
238
|
render() {
|
|
227
239
|
var _a;
|
|
228
|
-
const { mergedClsPrefix, $slots } = this;
|
|
240
|
+
const { mergedClsPrefix, mergedShowRail, isBlockType, $slots } = this;
|
|
229
241
|
return ((0, vue_1.h)("div", { class: [
|
|
230
242
|
`${mergedClsPrefix}-anchor`,
|
|
231
|
-
|
|
243
|
+
isBlockType && `${mergedClsPrefix}-anchor--block`,
|
|
244
|
+
mergedShowRail && `${mergedClsPrefix}-anchor--show-rail`
|
|
232
245
|
], ref: "selfRef" },
|
|
233
|
-
|
|
234
|
-
|
|
246
|
+
mergedShowRail && this.showBackground ? ((0, vue_1.h)("div", { ref: "slotRef", class: `${mergedClsPrefix}-anchor-link-background` })) : null,
|
|
247
|
+
mergedShowRail ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-anchor-rail` },
|
|
235
248
|
(0, vue_1.h)("div", { ref: "barRef", class: [
|
|
236
249
|
`${mergedClsPrefix}-anchor-rail__bar`,
|
|
237
250
|
this.activeHref !== null &&
|
package/lib/anchor/src/Link.js
CHANGED
|
@@ -35,11 +35,11 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
35
35
|
}
|
|
36
36
|
return () => {
|
|
37
37
|
const { value: mergedClsPrefix } = NAnchor.mergedClsPrefix;
|
|
38
|
-
return ((0, vue_1.h)("div", { class:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
return ((0, vue_1.h)("div", { class: [
|
|
39
|
+
`${mergedClsPrefix}-anchor-link`,
|
|
40
|
+
activeRef.value && `${mergedClsPrefix}-anchor-link--active`
|
|
41
|
+
] },
|
|
42
|
+
(0, vue_1.h)("a", { ref: titleRef, class: [`${mergedClsPrefix}-anchor-link__title`], href: props.href, title: (0, _utils_1.getTitleAttribute)(props.title), onClick: handleClick }, props.title),
|
|
43
43
|
(0, vue_1.renderSlot)(slots, 'default')));
|
|
44
44
|
};
|
|
45
45
|
}
|