antdv-next 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_util/ContextIsolator.js +12 -3
- package/dist/_util/hooks/useAllowClear.d.ts +22 -6
- package/dist/_util/hooks/useAllowClear.js +24 -6
- package/dist/_util/hooks/useClosable.js +1 -1
- package/dist/_util/statusUtils.d.ts +1 -1
- package/dist/_util/tools.d.ts +3 -1
- package/dist/_util/tools.js +6 -1
- package/dist/_util/vueNode.d.ts +6 -2
- package/dist/alert/Alert.js +4 -1
- package/dist/alert/style/index.d.ts +3 -3
- package/dist/alert/style/index.js +3 -3
- package/dist/antd-with-locales.esm.js +16773 -15780
- package/dist/antd-with-locales.js +78 -78
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +14353 -14003
- package/dist/antd.js +80 -80
- package/dist/auto-complete/index.js +1 -0
- package/dist/avatar/Avatar.js +2 -4
- package/dist/avatar/AvatarContext.d.ts +2 -2
- package/dist/border-beam/BorderBeam.d.ts +8 -1
- package/dist/border-beam/BorderBeam.js +28 -14
- package/dist/border-beam/index.d.ts +2 -2
- package/dist/breadcrumb/BreadcrumbItem.js +1 -1
- package/dist/card/style/index.js +2 -2
- package/dist/cascader/Panel.js +3 -3
- package/dist/cascader/index.js +12 -5
- package/dist/checkbox/Checkbox.js +6 -4
- package/dist/checkbox/Group.d.ts +19 -1
- package/dist/checkbox/Group.js +34 -5
- package/dist/checkbox/GroupContext.d.ts +3 -0
- package/dist/checkbox/index.d.ts +2 -2
- package/dist/color-picker/ColorPicker.js +1 -1
- package/dist/color-picker/style/input.js +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/date-picker/generatePicker/generateRangePicker.js +20 -2
- package/dist/date-picker/generatePicker/generateSinglePicker.js +20 -2
- package/dist/date-picker/generatePicker/interface.d.ts +4 -0
- package/dist/date-picker/style/panel.js +1 -1
- package/dist/date-picker/style/util.js +1 -1
- package/dist/date-picker/util.d.ts +2 -0
- package/dist/descriptions/hooks/useItems.d.ts +6 -6
- package/dist/descriptions/style/index.js +11 -13
- package/dist/divider/style/index.js +1 -1
- package/dist/drawer/DrawerPanel.js +1 -1
- package/dist/dropdown/dropdown.d.ts +2 -0
- package/dist/dropdown/dropdown.js +9 -2
- package/dist/dropdown/style/index.js +1 -1
- package/dist/form/ErrorList.js +1 -1
- package/dist/form/Form.js +1 -1
- package/dist/form/FormItem/ItemHolder.js +1 -1
- package/dist/form/FormItem/index.js +2 -2
- package/dist/form/FormItemInput.js +1 -1
- package/dist/form/FormItemLabel.js +1 -1
- package/dist/form/hooks/useVariant.js +1 -1
- package/dist/image/hooks/useMergedPreviewConfig.d.ts +1 -0
- package/dist/image/hooks/useMergedPreviewConfig.js +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/input/Group.js +1 -1
- package/dist/input/Input.d.ts +2 -1
- package/dist/input/Input.js +8 -5
- package/dist/input/OTP/OTPInput.d.ts +2 -1
- package/dist/input/OTP/OTPInput.js +12 -3
- package/dist/input/OTP/index.d.ts +3 -1
- package/dist/input/OTP/index.js +15 -6
- package/dist/input/Password.js +7 -5
- package/dist/input/Search.js +4 -2
- package/dist/input/TextArea.d.ts +3 -1
- package/dist/input/TextArea.js +13 -8
- package/dist/input/style/index.js +1 -1
- package/dist/input-number/index.d.ts +3 -6
- package/dist/input-number/index.js +8 -3
- package/dist/input-number/style/index.js +1 -5
- package/dist/listy/index.d.ts +1 -1
- package/dist/listy/index.js +9 -7
- package/dist/listy/interface.d.ts +6 -1
- package/dist/listy/style/index.js +4 -2
- package/dist/locale/ar_EG.js +9 -0
- package/dist/locale/az_AZ.js +9 -0
- package/dist/locale/bg_BG.js +9 -0
- package/dist/locale/bn_BD.js +9 -0
- package/dist/locale/by_BY.js +9 -0
- package/dist/locale/ca_ES.js +9 -0
- package/dist/locale/cs_CZ.js +9 -0
- package/dist/locale/da_DK.js +9 -0
- package/dist/locale/de_DE.js +9 -0
- package/dist/locale/el_GR.js +9 -0
- package/dist/locale/en_GB.js +11 -1
- package/dist/locale/en_US.js +11 -1
- package/dist/locale/es_ES.js +9 -0
- package/dist/locale/et_EE.js +9 -0
- package/dist/locale/eu_ES.js +9 -0
- package/dist/locale/fa_IR.js +9 -0
- package/dist/locale/fi_FI.js +10 -1
- package/dist/locale/fr_BE.js +9 -0
- package/dist/locale/fr_CA.js +9 -0
- package/dist/locale/fr_FR.js +9 -0
- package/dist/locale/ga_IE.js +9 -0
- package/dist/locale/gl_ES.js +9 -0
- package/dist/locale/he_IL.js +9 -0
- package/dist/locale/hi_IN.js +9 -0
- package/dist/locale/hr_HR.js +9 -0
- package/dist/locale/hu_HU.js +9 -0
- package/dist/locale/hy_AM.js +9 -0
- package/dist/locale/id_ID.js +9 -0
- package/dist/locale/index.d.ts +3 -0
- package/dist/locale/is_IS.js +9 -0
- package/dist/locale/it_IT.js +9 -0
- package/dist/locale/ja_JP.js +9 -0
- package/dist/locale/ka_GE.js +9 -0
- package/dist/locale/kk_KZ.js +9 -0
- package/dist/locale/km_KH.js +9 -0
- package/dist/locale/kmr_IQ.js +9 -0
- package/dist/locale/kn_IN.js +9 -0
- package/dist/locale/ko_KR.js +9 -0
- package/dist/locale/ku_IQ.js +9 -0
- package/dist/locale/lt_LT.js +9 -0
- package/dist/locale/lv_LV.js +9 -0
- package/dist/locale/mk_MK.js +9 -0
- package/dist/locale/ml_IN.js +9 -0
- package/dist/locale/mn_MN.js +9 -0
- package/dist/locale/mr_IN.js +9 -0
- package/dist/locale/ms_MY.js +9 -0
- package/dist/locale/my_MM.js +9 -0
- package/dist/locale/nb_NO.js +9 -0
- package/dist/locale/ne_NP.js +9 -0
- package/dist/locale/nl_BE.js +9 -0
- package/dist/locale/nl_NL.js +9 -0
- package/dist/locale/pl_PL.js +9 -0
- package/dist/locale/pt_BR.js +9 -0
- package/dist/locale/pt_PT.js +9 -0
- package/dist/locale/ro_RO.js +19 -10
- package/dist/locale/ru_RU.js +9 -0
- package/dist/locale/si_LK.js +9 -0
- package/dist/locale/sk_SK.js +9 -0
- package/dist/locale/sl_SI.js +9 -0
- package/dist/locale/sq_AL.js +9 -0
- package/dist/locale/sr_RS.js +9 -0
- package/dist/locale/sv_SE.js +9 -0
- package/dist/locale/ta_IN.js +10 -1
- package/dist/locale/th_TH.js +9 -0
- package/dist/locale/tk_TK.js +9 -0
- package/dist/locale/tr_TR.js +9 -0
- package/dist/locale/uk_UA.js +9 -0
- package/dist/locale/ur_PK.js +9 -0
- package/dist/locale/useLocale.d.ts +6 -1
- package/dist/locale/useLocale.js +12 -1
- package/dist/locale/uz_UZ.js +9 -0
- package/dist/locale/vi_VN.js +9 -0
- package/dist/locale/zh_CN.js +13 -3
- package/dist/locale/zh_HK.js +11 -1
- package/dist/locale/zh_TW.js +11 -1
- package/dist/masonry/Masonry.js +1 -1
- package/dist/mentions/index.d.ts +2 -3
- package/dist/mentions/index.js +9 -4
- package/dist/mentions/style/index.js +1 -1
- package/dist/menu/MenuContext.d.ts +2 -0
- package/dist/menu/MenuItem.js +23 -6
- package/dist/menu/index.js +5 -0
- package/dist/menu/menu.d.ts +3 -0
- package/dist/menu/menu.js +7 -0
- package/dist/modal/ConfirmDialog.js +14 -7
- package/dist/notification/PurePanel.js +7 -12
- package/dist/notification/interface.d.ts +8 -0
- package/dist/notification/style/index.js +1 -1
- package/dist/notification/style/placement.js +10 -7
- package/dist/notification/useNotification.js +5 -15
- package/dist/package.js +1 -1
- package/dist/pagination/Pagination.js +2 -2
- package/dist/pagination/useShowSizeChanger.d.ts +3 -0
- package/dist/pagination/useShowSizeChanger.js +1 -1
- package/dist/popconfirm/index.js +5 -5
- package/dist/popconfirm/style/index.js +1 -1
- package/dist/popover/index.js +1 -1
- package/dist/popover/style/index.js +2 -2
- package/dist/progress/Circle.js +0 -8
- package/dist/progress/Line.js +1 -9
- package/dist/progress/Steps.js +0 -8
- package/dist/progress/progress.js +2 -14
- package/dist/qrcode/index.js +4 -4
- package/dist/radio/group.js +40 -7
- package/dist/radio/index.d.ts +2 -2
- package/dist/radio/interface.d.ts +19 -1
- package/dist/radio/radio.js +5 -3
- package/dist/result/index.js +3 -3
- package/dist/result/noFound.js +120 -140
- package/dist/result/serverError.js +132 -147
- package/dist/result/unauthorized.js +115 -129
- package/dist/segmented/index.js +1 -1
- package/dist/select/index.js +10 -3
- package/dist/select/style/dropdown.js +1 -1
- package/dist/select/style/index.js +2 -2
- package/dist/select/style/select-input-multiple.js +1 -1
- package/dist/select/usePopupRender.js +4 -1
- package/dist/slider/index.d.ts +0 -3
- package/dist/slider/index.js +2 -2
- package/dist/splitter/SplitBar.js +9 -3
- package/dist/splitter/interface.d.ts +5 -1
- package/dist/steps/style/index.js +1 -1
- package/dist/steps/style/inline.js +1 -1
- package/dist/style/motion/collapse.js +4 -10
- package/dist/table/ExpandIcon.d.ts +9 -4
- package/dist/table/ExpandIcon.js +42 -20
- package/dist/table/InternalTable.js +21 -15
- package/dist/table/hooks/useLazyKVMap.js +1 -1
- package/dist/table/hooks/useSelection.js +54 -9
- package/dist/table/interface.d.ts +8 -0
- package/dist/table/style/index.js +1 -1
- package/dist/table/style/sorter.js +2 -2
- package/dist/tabs/index.js +9 -2
- package/dist/tabs/style/index.js +1 -1
- package/dist/time-picker/index.js +34 -0
- package/dist/timeline/Timeline.js +1 -1
- package/dist/tooltip/style/index.js +1 -1
- package/dist/tour/panelRender.js +3 -2
- package/dist/transfer/Section.js +2 -1
- package/dist/transfer/Transfer.js +1 -1
- package/dist/tree/style/index.js +1 -1
- package/dist/tree-select/index.js +14 -8
- package/dist/typography/Base/index.js +23 -2
- package/dist/typography/Link.js +5 -0
- package/dist/typography/Paragraph.js +5 -0
- package/dist/typography/Text.js +5 -0
- package/dist/typography/Title.js +5 -0
- package/dist/typography/hooks/useMergedConfig.js +1 -1
- package/dist/typography/interface.d.ts +8 -1
- package/dist/typography/style/index.js +2 -1
- package/dist/typography/style/mixins.d.ts +2 -1
- package/dist/typography/style/mixins.js +26 -3
- package/dist/upload/Upload.d.ts +1 -0
- package/dist/upload/Upload.js +10 -3
- package/dist/upload/UploadList/ListItem.js +8 -3
- package/dist/upload/interface.d.ts +1 -0
- package/dist/version/token-meta.json +1 -1
- package/dist/version/token.json +1 -1
- package/dist/watermark/index.js +1 -1
- package/package.json +9 -9
- package/web-tags.json +74 -14
- package/web-types.json +186 -22
- package/dist/_util/getAllowClear.d.ts +0 -6
- package/dist/_util/getAllowClear.js +0 -11
package/dist/locale/sr_RS.js
CHANGED
|
@@ -25,9 +25,14 @@ const localeValues = {
|
|
|
25
25
|
selectInvert: "Obrni izbor trenutne stranice",
|
|
26
26
|
selectNone: "Obriši sve podatke",
|
|
27
27
|
selectionAll: "Izaberi sve podatke",
|
|
28
|
+
selectRow: "Изабери ред",
|
|
29
|
+
selectedRow: "Ред је изабран",
|
|
30
|
+
selectionMenu: "Мени за избор",
|
|
28
31
|
sortTitle: "Sortiraj",
|
|
29
32
|
expand: "Proširi red",
|
|
30
33
|
collapse: "Skupi red",
|
|
34
|
+
expandAll: "Proširi sve redove",
|
|
35
|
+
collapseAll: "Skupi sve redove",
|
|
31
36
|
triggerDesc: "Klikni da sortiraš po padajućem redosledu",
|
|
32
37
|
triggerAsc: "Klikni da sortiraš po rastućem redosledu",
|
|
33
38
|
cancelSort: "Klikni da otkažeš sortiranje",
|
|
@@ -48,6 +53,10 @@ const localeValues = {
|
|
|
48
53
|
okText: "U redu",
|
|
49
54
|
cancelText: "Otkaži"
|
|
50
55
|
},
|
|
56
|
+
Splitter: {
|
|
57
|
+
toggleStartPanel: "Пребаци почетни панел",
|
|
58
|
+
toggleEndPanel: "Пребаци завршни панел"
|
|
59
|
+
},
|
|
51
60
|
Transfer: {
|
|
52
61
|
titles: ["", ""],
|
|
53
62
|
searchPlaceholder: "Pretraži ovde",
|
package/dist/locale/sv_SE.js
CHANGED
|
@@ -27,9 +27,14 @@ const localeValues = {
|
|
|
27
27
|
selectInvert: "Invertera nuvarande sida",
|
|
28
28
|
selectNone: "Avmarkera all data",
|
|
29
29
|
selectionAll: "Markera all data",
|
|
30
|
+
selectRow: "Välj rad",
|
|
31
|
+
selectedRow: "Rad vald",
|
|
32
|
+
selectionMenu: "Valmeny",
|
|
30
33
|
sortTitle: "Sortera",
|
|
31
34
|
expand: "Expandera rad",
|
|
32
35
|
collapse: "Komprimera rad",
|
|
36
|
+
expandAll: "Expandera alla rader",
|
|
37
|
+
collapseAll: "Komprimera alla rader",
|
|
33
38
|
triggerDesc: "Klicka för att sortera i fallande ordning",
|
|
34
39
|
triggerAsc: "Klicka för att sortera i stigande ordning",
|
|
35
40
|
cancelSort: "Klicka för att avbryta sortering"
|
|
@@ -48,6 +53,10 @@ const localeValues = {
|
|
|
48
53
|
okText: "OK",
|
|
49
54
|
cancelText: "Avbryt"
|
|
50
55
|
},
|
|
56
|
+
Splitter: {
|
|
57
|
+
toggleStartPanel: "Växla startpanelen",
|
|
58
|
+
toggleEndPanel: "Växla slutpanelen"
|
|
59
|
+
},
|
|
51
60
|
Transfer: {
|
|
52
61
|
titles: ["", ""],
|
|
53
62
|
searchPlaceholder: "Sök här",
|
package/dist/locale/ta_IN.js
CHANGED
|
@@ -28,11 +28,16 @@ const localeValues = {
|
|
|
28
28
|
filterSearchPlaceholder: "வடிப்பான்களில் தேடவும்",
|
|
29
29
|
expand: "வரிசையை விரிவாக்கு",
|
|
30
30
|
collapse: "வரிசையைச் சுருக்கு",
|
|
31
|
+
expandAll: "அனைத்து வரிசைகளையும் விரிவாக்கு",
|
|
32
|
+
collapseAll: "அனைத்து வரிசைகளையும் சுருக்கு",
|
|
31
33
|
triggerDesc: "இறங்குவரிசையை வரிசைப்படுத்த கிளிக் செய்யவும்",
|
|
32
34
|
triggerAsc: "ஏறுவரிசையில் வரிசைப்படுத்த கிளிக் செய்யவும்",
|
|
33
35
|
cancelSort: "வரிசையாக்கத்தை ரத்து செய்ய கிளிக் செய்யவும்",
|
|
34
36
|
selectNone: "எல்லா தரவையும் அழிக்கவும்",
|
|
35
|
-
selectionAll: "எல்லா தரவையும் தேர்ந்தெடுக்கவும்"
|
|
37
|
+
selectionAll: "எல்லா தரவையும் தேர்ந்தெடுக்கவும்",
|
|
38
|
+
selectRow: "வரிசையைத் தேர்ந்தெடுக்கவும்",
|
|
39
|
+
selectedRow: "வரிசை தேர்ந்தெடுக்கப்பட்டது",
|
|
40
|
+
selectionMenu: "தேர்வு மெனு"
|
|
36
41
|
},
|
|
37
42
|
Tour: {
|
|
38
43
|
Next: "அடுத்தது",
|
|
@@ -48,6 +53,10 @@ const localeValues = {
|
|
|
48
53
|
okText: "சரி",
|
|
49
54
|
cancelText: "ரத்து செய்யவும்"
|
|
50
55
|
},
|
|
56
|
+
Splitter: {
|
|
57
|
+
toggleStartPanel: "தொடக்கப் பலகையை மாற்று",
|
|
58
|
+
toggleEndPanel: "இறுதிப் பலகையை மாற்று"
|
|
59
|
+
},
|
|
51
60
|
Transfer: {
|
|
52
61
|
titles: ["", ""],
|
|
53
62
|
notFoundContent: "உள்ளடக்கம் கிடைக்கவில்லை",
|
package/dist/locale/th_TH.js
CHANGED
|
@@ -27,9 +27,14 @@ const localeValues = {
|
|
|
27
27
|
selectInvert: "กลับสถานะการเลือกในหน้านี้",
|
|
28
28
|
selectNone: "ไม่เลือกข้อมูลทั้งหมด",
|
|
29
29
|
selectionAll: "เลือกข้อมูลทั้งหมด",
|
|
30
|
+
selectRow: "เลือกแถว",
|
|
31
|
+
selectedRow: "เลือกแถวแล้ว",
|
|
32
|
+
selectionMenu: "เมนูการเลือก",
|
|
30
33
|
sortTitle: "เรียง",
|
|
31
34
|
expand: "แสดงแถวข้อมูล",
|
|
32
35
|
collapse: "ย่อแถวข้อมูล",
|
|
36
|
+
expandAll: "ขยายแถวทั้งหมด",
|
|
37
|
+
collapseAll: "ย่อแถวทั้งหมด",
|
|
33
38
|
triggerDesc: "คลิกเรียงจากมากไปน้อย",
|
|
34
39
|
triggerAsc: "คลิกเรียงจากน้อยไปมาก",
|
|
35
40
|
cancelSort: "คลิกเพื่อยกเลิกการเรียง"
|
|
@@ -48,6 +53,10 @@ const localeValues = {
|
|
|
48
53
|
okText: "ตกลง",
|
|
49
54
|
cancelText: "ยกเลิก"
|
|
50
55
|
},
|
|
56
|
+
Splitter: {
|
|
57
|
+
toggleStartPanel: "สลับแผงเริ่มต้น",
|
|
58
|
+
toggleEndPanel: "สลับแผงสิ้นสุด"
|
|
59
|
+
},
|
|
51
60
|
Transfer: {
|
|
52
61
|
titles: ["", ""],
|
|
53
62
|
searchPlaceholder: "ค้นหา",
|
package/dist/locale/tk_TK.js
CHANGED
|
@@ -25,9 +25,14 @@ const localeValues = {
|
|
|
25
25
|
selectInvert: "Tersini saýlaň",
|
|
26
26
|
selectNone: "Ähli maglumatlary arassala",
|
|
27
27
|
selectionAll: "Ähli maglumatlary saýla",
|
|
28
|
+
selectRow: "Setiri saýla",
|
|
29
|
+
selectedRow: "Setir saýlandy",
|
|
30
|
+
selectionMenu: "Saýlaw menýusy",
|
|
28
31
|
sortTitle: "Tertiple",
|
|
29
32
|
expand: "Setirleri aç",
|
|
30
33
|
collapse: "Setirleri ýygna",
|
|
34
|
+
expandAll: "Ähli setirleri aç",
|
|
35
|
+
collapseAll: "Ähli setirleri ýygna",
|
|
31
36
|
triggerDesc: "Kemelýän tertipde tertiple",
|
|
32
37
|
triggerAsc: "Artýan tertipde tertiple",
|
|
33
38
|
cancelSort: "Tertipleri arassala",
|
|
@@ -48,6 +53,10 @@ const localeValues = {
|
|
|
48
53
|
okText: "Bolýar",
|
|
49
54
|
cancelText: "Ýatyr"
|
|
50
55
|
},
|
|
56
|
+
Splitter: {
|
|
57
|
+
toggleStartPanel: "Başlangyç panelini çalyş",
|
|
58
|
+
toggleEndPanel: "Ahyrky paneli çalyş"
|
|
59
|
+
},
|
|
51
60
|
Transfer: {
|
|
52
61
|
titles: ["", ""],
|
|
53
62
|
searchPlaceholder: "Gözle",
|
package/dist/locale/tr_TR.js
CHANGED
|
@@ -24,9 +24,14 @@ const localeValues = {
|
|
|
24
24
|
selectAll: "Tüm sayfayı seç",
|
|
25
25
|
selectInvert: "Tersini seç",
|
|
26
26
|
selectionAll: "Tümünü seç",
|
|
27
|
+
selectRow: "Satırı seç",
|
|
28
|
+
selectedRow: "Satır seçildi",
|
|
29
|
+
selectionMenu: "Seçim menüsü",
|
|
27
30
|
sortTitle: "Sırala",
|
|
28
31
|
expand: "Satırı genişlet",
|
|
29
32
|
collapse: "Satırı daralt",
|
|
33
|
+
expandAll: "Tüm satırları genişlet",
|
|
34
|
+
collapseAll: "Tüm satırları daralt",
|
|
30
35
|
triggerDesc: "Azalan düzende sırala",
|
|
31
36
|
triggerAsc: "Artan düzende sırala",
|
|
32
37
|
cancelSort: "Sıralamayı kaldır",
|
|
@@ -48,6 +53,10 @@ const localeValues = {
|
|
|
48
53
|
okText: "Tamam",
|
|
49
54
|
cancelText: "İptal"
|
|
50
55
|
},
|
|
56
|
+
Splitter: {
|
|
57
|
+
toggleStartPanel: "Başlangıç panelini değiştir",
|
|
58
|
+
toggleEndPanel: "Bitiş panelini değiştir"
|
|
59
|
+
},
|
|
51
60
|
Transfer: {
|
|
52
61
|
titles: ["", ""],
|
|
53
62
|
searchPlaceholder: "Arama",
|
package/dist/locale/uk_UA.js
CHANGED
|
@@ -27,9 +27,14 @@ const localeValues = {
|
|
|
27
27
|
selectInvert: "Інвертувати вибір",
|
|
28
28
|
selectNone: "Очистити вибір",
|
|
29
29
|
selectionAll: "Обрати всі",
|
|
30
|
+
selectRow: "Вибрати рядок",
|
|
31
|
+
selectedRow: "Рядок вибрано",
|
|
32
|
+
selectionMenu: "Меню вибору",
|
|
30
33
|
sortTitle: "Сортувати",
|
|
31
34
|
expand: "Розгорнути рядок",
|
|
32
35
|
collapse: "Згорнути рядок",
|
|
36
|
+
expandAll: "Розгорнути всі рядки",
|
|
37
|
+
collapseAll: "Згорнути всі рядки",
|
|
33
38
|
triggerDesc: "Сортувати за спаданням",
|
|
34
39
|
triggerAsc: "Сортувати за зростанням",
|
|
35
40
|
cancelSort: "Відмінити сортування"
|
|
@@ -48,6 +53,10 @@ const localeValues = {
|
|
|
48
53
|
okText: "Гаразд",
|
|
49
54
|
cancelText: "Скасувати"
|
|
50
55
|
},
|
|
56
|
+
Splitter: {
|
|
57
|
+
toggleStartPanel: "Перемкнути початкову панель",
|
|
58
|
+
toggleEndPanel: "Перемкнути кінцеву панель"
|
|
59
|
+
},
|
|
51
60
|
Transfer: {
|
|
52
61
|
titles: ["", ""],
|
|
53
62
|
searchPlaceholder: "Введіть текст для пошуку",
|
package/dist/locale/ur_PK.js
CHANGED
|
@@ -25,9 +25,14 @@ const localeValues = {
|
|
|
25
25
|
selectInvert: "موجودہ صفحے کو الٹ دیں",
|
|
26
26
|
selectNone: "تمام ڈیٹا صاف کریں",
|
|
27
27
|
selectionAll: "تمام ڈیٹا کو منتخب کریں",
|
|
28
|
+
selectRow: "قطار منتخب کریں",
|
|
29
|
+
selectedRow: "قطار منتخب ہو گئی",
|
|
30
|
+
selectionMenu: "انتخابی مینو",
|
|
28
31
|
sortTitle: "ترتیب دیں",
|
|
29
32
|
expand: "پھیلائیں",
|
|
30
33
|
collapse: "سمیٹیں",
|
|
34
|
+
expandAll: "تمام قطاریں پھیلائیں",
|
|
35
|
+
collapseAll: "تمام قطاریں سمیٹیں",
|
|
31
36
|
triggerDesc: "نزولی کو ترتیب دینے کیلئے کلک کریں",
|
|
32
37
|
triggerAsc: "چڑھنے کو ترتیب دینے کیلئے کلک کریں",
|
|
33
38
|
cancelSort: "ترتیب کو منسوخ کرنے کیلئے دبائیں",
|
|
@@ -48,6 +53,10 @@ const localeValues = {
|
|
|
48
53
|
okText: "ٹھیک ہے",
|
|
49
54
|
cancelText: "منسوخ کریں"
|
|
50
55
|
},
|
|
56
|
+
Splitter: {
|
|
57
|
+
toggleStartPanel: "ابتدائی پینل ٹوگل کریں",
|
|
58
|
+
toggleEndPanel: "اختتامی پینل ٹوگل کریں"
|
|
59
|
+
},
|
|
51
60
|
Transfer: {
|
|
52
61
|
titles: ["", ""],
|
|
53
62
|
searchPlaceholder: "یہاں تلاش کریں",
|
|
@@ -2,5 +2,10 @@ import { Locale } from "./index.js";
|
|
|
2
2
|
//#region src/locale/useLocale.d.ts
|
|
3
3
|
type LocaleComponentName = Exclude<keyof Locale, 'locale'>;
|
|
4
4
|
declare function useLocale<C extends LocaleComponentName = LocaleComponentName>(componentName: C, defaultLocale?: Locale[C] | (() => Locale[C])): readonly [import("vue").ComputedRef<any>, import("vue").ComputedRef<string>];
|
|
5
|
+
/**
|
|
6
|
+
* Lightweight variant of `useLocale` that allocates no computed: returns a getter
|
|
7
|
+
* to read merged locale data during render. Prefer it in high-instance-count components.
|
|
8
|
+
*/
|
|
9
|
+
declare function useLocaleGetter<C extends LocaleComponentName = LocaleComponentName>(componentName: C): () => NonNullable<Locale[C]>;
|
|
5
10
|
//#endregion
|
|
6
|
-
export { LocaleComponentName, useLocale as default };
|
|
11
|
+
export { LocaleComponentName, useLocale as default, useLocaleGetter };
|
package/dist/locale/useLocale.js
CHANGED
|
@@ -17,5 +17,16 @@ function useLocale(componentName, defaultLocale) {
|
|
|
17
17
|
return localeCode;
|
|
18
18
|
})];
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Lightweight variant of `useLocale` that allocates no computed: returns a getter
|
|
22
|
+
* to read merged locale data during render. Prefer it in high-instance-count components.
|
|
23
|
+
*/
|
|
24
|
+
function useLocaleGetter(componentName) {
|
|
25
|
+
const { locale: fullLocale } = useLocaleContext();
|
|
26
|
+
return () => ({
|
|
27
|
+
...localeValues[componentName],
|
|
28
|
+
...fullLocale.value?.[componentName]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
20
31
|
//#endregion
|
|
21
|
-
export { useLocale as default };
|
|
32
|
+
export { useLocale as default, useLocaleGetter };
|
package/dist/locale/uz_UZ.js
CHANGED
|
@@ -27,9 +27,14 @@ const localeValues = {
|
|
|
27
27
|
selectInvert: "Tanlovni aylantirish",
|
|
28
28
|
selectNone: "Barcha ma'lumotlarni tozalang",
|
|
29
29
|
selectionAll: "Barchasini tanlash",
|
|
30
|
+
selectRow: "Qatorni tanlash",
|
|
31
|
+
selectedRow: "Qator tanlandi",
|
|
32
|
+
selectionMenu: "Tanlash menyusi",
|
|
30
33
|
sortTitle: "Tartiblash",
|
|
31
34
|
expand: "Satirni yozish",
|
|
32
35
|
collapse: "Satirni yig'ish",
|
|
36
|
+
expandAll: "Barcha satrlarni yozish",
|
|
37
|
+
collapseAll: "Barcha satrlarni yig'ish",
|
|
33
38
|
triggerDesc: "Kamayish tartibida tartiblash uchun bosing",
|
|
34
39
|
triggerAsc: "O'sish tartibida tartiblash uchun bosing",
|
|
35
40
|
cancelSort: "Tartiblshni rad etish uchun bosing"
|
|
@@ -48,6 +53,10 @@ const localeValues = {
|
|
|
48
53
|
okText: "OK",
|
|
49
54
|
cancelText: "Bekor qilish"
|
|
50
55
|
},
|
|
56
|
+
Splitter: {
|
|
57
|
+
toggleStartPanel: "Boshlang‘ich panelni almashtirish",
|
|
58
|
+
toggleEndPanel: "Yakuniy panelni almashtirish"
|
|
59
|
+
},
|
|
51
60
|
Transfer: {
|
|
52
61
|
titles: ["", ""],
|
|
53
62
|
searchPlaceholder: "Qidiruv",
|
package/dist/locale/vi_VN.js
CHANGED
|
@@ -27,9 +27,14 @@ const localeValues = {
|
|
|
27
27
|
selectInvert: "Chọn ngược lại",
|
|
28
28
|
selectNone: "Bỏ chọn tất cả",
|
|
29
29
|
selectionAll: "Chọn tất cả",
|
|
30
|
+
selectRow: "Chọn hàng",
|
|
31
|
+
selectedRow: "Hàng đã được chọn",
|
|
32
|
+
selectionMenu: "Menu lựa chọn",
|
|
30
33
|
sortTitle: "Sắp xếp",
|
|
31
34
|
expand: "Mở rộng dòng",
|
|
32
35
|
collapse: "Thu gọn dòng",
|
|
36
|
+
expandAll: "Mở rộng tất cả các dòng",
|
|
37
|
+
collapseAll: "Thu gọn tất cả các dòng",
|
|
33
38
|
triggerDesc: "Nhấp để sắp xếp giảm dần",
|
|
34
39
|
triggerAsc: "Nhấp để sắp xếp tăng dần",
|
|
35
40
|
cancelSort: "Nhấp để hủy sắp xếp"
|
|
@@ -48,6 +53,10 @@ const localeValues = {
|
|
|
48
53
|
okText: "Đồng ý",
|
|
49
54
|
cancelText: "Hủy"
|
|
50
55
|
},
|
|
56
|
+
Splitter: {
|
|
57
|
+
toggleStartPanel: "Chuyển đổi bảng bắt đầu",
|
|
58
|
+
toggleEndPanel: "Chuyển đổi bảng kết thúc"
|
|
59
|
+
},
|
|
51
60
|
Transfer: {
|
|
52
61
|
titles: ["", ""],
|
|
53
62
|
searchPlaceholder: "Tìm ở đây",
|
package/dist/locale/zh_CN.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import locale from "../time-picker/locale/zh_CN.js";
|
|
2
2
|
import locale$1 from "../date-picker/locale/zh_CN.js";
|
|
3
3
|
import zh_CN_default from "../calendar/locale/zh_CN.js";
|
|
4
|
-
import
|
|
4
|
+
import Pagination from "@v-c/pagination/locale/zh_CN";
|
|
5
5
|
//#region src/locale/zh_CN.ts
|
|
6
6
|
const typeTemplate = "${label}不是一个有效的${type}";
|
|
7
7
|
const localeValues = {
|
|
8
8
|
locale: "zh-cn",
|
|
9
|
-
Pagination
|
|
9
|
+
Pagination,
|
|
10
10
|
DatePicker: locale$1,
|
|
11
11
|
TimePicker: locale,
|
|
12
12
|
Calendar: zh_CN_default,
|
|
13
13
|
global: {
|
|
14
14
|
placeholder: "请选择",
|
|
15
15
|
close: "关闭",
|
|
16
|
-
sortable: "可排序"
|
|
16
|
+
sortable: "可排序",
|
|
17
|
+
clear: "清除"
|
|
17
18
|
},
|
|
18
19
|
Table: {
|
|
19
20
|
filterTitle: "筛选",
|
|
@@ -27,9 +28,14 @@ const localeValues = {
|
|
|
27
28
|
selectInvert: "反选当页",
|
|
28
29
|
selectNone: "清空所有",
|
|
29
30
|
selectionAll: "全选所有",
|
|
31
|
+
selectRow: "选择行",
|
|
32
|
+
selectedRow: "行已选择",
|
|
33
|
+
selectionMenu: "选择菜单",
|
|
30
34
|
sortTitle: "排序",
|
|
31
35
|
expand: "展开行",
|
|
32
36
|
collapse: "关闭行",
|
|
37
|
+
expandAll: "展开所有行",
|
|
38
|
+
collapseAll: "收起所有行",
|
|
33
39
|
triggerDesc: "点击降序",
|
|
34
40
|
triggerAsc: "点击升序",
|
|
35
41
|
cancelSort: "取消排序"
|
|
@@ -48,6 +54,10 @@ const localeValues = {
|
|
|
48
54
|
cancelText: "取消",
|
|
49
55
|
okText: "确定"
|
|
50
56
|
},
|
|
57
|
+
Splitter: {
|
|
58
|
+
toggleStartPanel: "切换起始面板",
|
|
59
|
+
toggleEndPanel: "切换结束面板"
|
|
60
|
+
},
|
|
51
61
|
Transfer: {
|
|
52
62
|
titles: ["", ""],
|
|
53
63
|
searchPlaceholder: "请输入搜索内容",
|
package/dist/locale/zh_HK.js
CHANGED
|
@@ -13,7 +13,8 @@ const localeValues = {
|
|
|
13
13
|
global: {
|
|
14
14
|
placeholder: "請選擇",
|
|
15
15
|
close: "關閉",
|
|
16
|
-
sortable: "可排序"
|
|
16
|
+
sortable: "可排序",
|
|
17
|
+
clear: "清除"
|
|
17
18
|
},
|
|
18
19
|
Table: {
|
|
19
20
|
filterTitle: "篩選器",
|
|
@@ -27,9 +28,14 @@ const localeValues = {
|
|
|
27
28
|
selectInvert: "反向選取",
|
|
28
29
|
selectNone: "清空所有",
|
|
29
30
|
selectionAll: "全選所有",
|
|
31
|
+
selectRow: "選取列",
|
|
32
|
+
selectedRow: "列已選取",
|
|
33
|
+
selectionMenu: "選取選單",
|
|
30
34
|
sortTitle: "排序",
|
|
31
35
|
expand: "展開行",
|
|
32
36
|
collapse: "關閉行",
|
|
37
|
+
expandAll: "展開所有行",
|
|
38
|
+
collapseAll: "收起所有行",
|
|
33
39
|
triggerDesc: "點擊降序",
|
|
34
40
|
triggerAsc: "點擊升序",
|
|
35
41
|
cancelSort: "取消排序"
|
|
@@ -48,6 +54,10 @@ const localeValues = {
|
|
|
48
54
|
okText: "確定",
|
|
49
55
|
cancelText: "取消"
|
|
50
56
|
},
|
|
57
|
+
Splitter: {
|
|
58
|
+
toggleStartPanel: "切換起始面板",
|
|
59
|
+
toggleEndPanel: "切換結束面板"
|
|
60
|
+
},
|
|
51
61
|
Transfer: {
|
|
52
62
|
titles: ["", ""],
|
|
53
63
|
searchPlaceholder: "搜尋資料",
|
package/dist/locale/zh_TW.js
CHANGED
|
@@ -13,7 +13,8 @@ const localeValues = {
|
|
|
13
13
|
global: {
|
|
14
14
|
placeholder: "請選擇",
|
|
15
15
|
close: "關閉",
|
|
16
|
-
sortable: "可排序"
|
|
16
|
+
sortable: "可排序",
|
|
17
|
+
clear: "清除"
|
|
17
18
|
},
|
|
18
19
|
Table: {
|
|
19
20
|
filterTitle: "篩選器",
|
|
@@ -27,9 +28,14 @@ const localeValues = {
|
|
|
27
28
|
selectInvert: "反向選取目前頁面",
|
|
28
29
|
selectNone: "清除全部資料",
|
|
29
30
|
selectionAll: "選取所有資料",
|
|
31
|
+
selectRow: "選取列",
|
|
32
|
+
selectedRow: "列已選取",
|
|
33
|
+
selectionMenu: "選取選單",
|
|
30
34
|
sortTitle: "排序",
|
|
31
35
|
expand: "展開列",
|
|
32
36
|
collapse: "收合列",
|
|
37
|
+
expandAll: "展開所有列",
|
|
38
|
+
collapseAll: "收合所有列",
|
|
33
39
|
triggerDesc: "點擊以遞減排序",
|
|
34
40
|
triggerAsc: "點擊以遞增排序",
|
|
35
41
|
cancelSort: "點擊以取消排序"
|
|
@@ -48,6 +54,10 @@ const localeValues = {
|
|
|
48
54
|
okText: "確定",
|
|
49
55
|
cancelText: "取消"
|
|
50
56
|
},
|
|
57
|
+
Splitter: {
|
|
58
|
+
toggleStartPanel: "切換起始面板",
|
|
59
|
+
toggleEndPanel: "切換結束面板"
|
|
60
|
+
},
|
|
51
61
|
Transfer: {
|
|
52
62
|
titles: ["", ""],
|
|
53
63
|
searchPlaceholder: "在此搜尋",
|
package/dist/masonry/Masonry.js
CHANGED
|
@@ -153,7 +153,7 @@ const Masonry = /* @__PURE__ */ defineComponent((props, { expose, emit, attrs, s
|
|
|
153
153
|
"index": itemIndex,
|
|
154
154
|
"itemRender": itemRender,
|
|
155
155
|
"column": columnIndex
|
|
156
|
-
}, { onResize: fresh ? collectItemSize : null }),
|
|
156
|
+
}, { onResize: fresh ? collectItemSize : null }), { default: () => [item.children] });
|
|
157
157
|
})) ? _slot : { default: () => [_slot] })])] });
|
|
158
158
|
};
|
|
159
159
|
}, {
|
package/dist/mentions/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMe
|
|
|
3
3
|
import "../_util/hooks/index.js";
|
|
4
4
|
import { SizeType } from "../config-provider/SizeContext.js";
|
|
5
5
|
import { InputStatus } from "../_util/statusUtils.js";
|
|
6
|
+
import { AllowClear } from "../_util/hooks/useAllowClear.js";
|
|
6
7
|
import { ComponentBaseProps, Variant } from "../config-provider/context.js";
|
|
7
8
|
import { App, CSSProperties, SlotsType } from "vue";
|
|
8
9
|
import { DataDrivenOptionProps, MentionsProps as MentionsProps$1, MentionsRef as MentionsRef$1, Option } from "@v-c/mentions";
|
|
@@ -48,9 +49,7 @@ interface MentionProps extends Omit<MentionsProps$1, 'suffix' | 'classNames' | '
|
|
|
48
49
|
option: MentionsOptionProps;
|
|
49
50
|
index: number;
|
|
50
51
|
}) => any;
|
|
51
|
-
allowClear?:
|
|
52
|
-
clearIcon?: VueNode;
|
|
53
|
-
};
|
|
52
|
+
allowClear?: AllowClear;
|
|
54
53
|
disabled?: boolean;
|
|
55
54
|
}
|
|
56
55
|
interface MentionsEmits {
|
package/dist/mentions/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
2
|
+
import { useFormItemInputContext } from "../form/context.js";
|
|
2
3
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
4
|
import { useSize } from "../config-provider/hooks/useSize.js";
|
|
4
5
|
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
@@ -9,10 +10,9 @@ import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
|
9
10
|
import genPurePanel from "../_util/PurePanel.js";
|
|
10
11
|
import { getMergedStatus, getStatusClassNames } from "../_util/statusUtils.js";
|
|
11
12
|
import { DefaultRenderEmpty } from "../config-provider/defaultRenderEmpty.js";
|
|
12
|
-
import { useFormItemInputContext } from "../form/context.js";
|
|
13
13
|
import useVariant from "../form/hooks/useVariant.js";
|
|
14
14
|
import usePopupRender from "../select/usePopupRender.js";
|
|
15
|
-
import
|
|
15
|
+
import useAllowClear, { useAllowClearLabel } from "../_util/hooks/useAllowClear.js";
|
|
16
16
|
import toList from "../_util/toList.js";
|
|
17
17
|
import Spin from "../spin/index.js";
|
|
18
18
|
import style_default from "./style/index.js";
|
|
@@ -49,7 +49,7 @@ const omitKeys = [
|
|
|
49
49
|
];
|
|
50
50
|
const Mentions = /* @__PURE__ */ defineComponent((props, { slots, emit, expose, attrs }) => {
|
|
51
51
|
if (isDev) devUseWarning("Mentions").deprecated(!slots.default, "Mentions.Option", "options");
|
|
52
|
-
const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, renderEmpty, getPopupContainer } = useComponentBaseConfig("mentions", props);
|
|
52
|
+
const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, renderEmpty, getPopupContainer, allowClear: contextAllowClear } = useComponentBaseConfig("mentions", props, ["allowClear"]);
|
|
53
53
|
const { classes, styles, rootClass, size: customSize, disabled: customDisabled, status: customStatus, variant: customVariant } = toPropsRefs$1(props, "classes", "styles", "rootClass", "size", "disabled", "status", "variant");
|
|
54
54
|
const rootCls = useCSSVarCls(prefixCls);
|
|
55
55
|
const [hashId, cssVarCls] = style_default(prefixCls, rootCls);
|
|
@@ -72,7 +72,12 @@ const Mentions = /* @__PURE__ */ defineComponent((props, { slots, emit, expose,
|
|
|
72
72
|
});
|
|
73
73
|
const contextStyleRoot = useSemanticRootStyle(contextStyle);
|
|
74
74
|
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, contextStyleRoot, styles), useToProps(mergedProps));
|
|
75
|
-
const
|
|
75
|
+
const getClearLabel = useAllowClearLabel();
|
|
76
|
+
const mergedAllowClear = computed(() => useAllowClear({
|
|
77
|
+
allowClear: props.allowClear,
|
|
78
|
+
contextAllowClear: contextAllowClear.value,
|
|
79
|
+
defaultLabel: getClearLabel()
|
|
80
|
+
}));
|
|
76
81
|
const [mergedVariant, enableVariantCls] = useVariant("mentions", customVariant);
|
|
77
82
|
const focused = shallowRef(false);
|
|
78
83
|
const setFocusState = (value) => {
|
|
@@ -38,7 +38,7 @@ const genDropdownStyle = (token) => {
|
|
|
38
38
|
padding: `${unit(itemPaddingVertical)} ${unit(controlPaddingHorizontal)}`,
|
|
39
39
|
color: colorText,
|
|
40
40
|
borderRadius,
|
|
41
|
-
fontWeight:
|
|
41
|
+
fontWeight: 400,
|
|
42
42
|
lineHeight,
|
|
43
43
|
cursor: "pointer",
|
|
44
44
|
transition: `background-color ${motionDurationSlow} ease`,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TooltipProps } from "../tooltip/index.js";
|
|
1
2
|
import { MenuPopupSemanticClassNames, MenuPopupSemanticStyles, MenuSemanticClassNames, MenuSemanticStyles, SubMenuSemanticClassNames, SubMenuSemanticStyles } from "./menu.js";
|
|
2
3
|
import { DirectionType } from "../config-provider/context.js";
|
|
3
4
|
import { Ref } from "vue";
|
|
@@ -11,6 +12,7 @@ interface MenuContextProps {
|
|
|
11
12
|
firstLevel: boolean;
|
|
12
13
|
/** @internal Safe to remove */
|
|
13
14
|
disableMenuItemTitleTooltip?: boolean;
|
|
15
|
+
tooltip?: false | TooltipProps;
|
|
14
16
|
classes: MenuSemanticClassNames & {
|
|
15
17
|
popup?: MenuPopupSemanticClassNames;
|
|
16
18
|
subMenu?: SubMenuSemanticClassNames;
|
package/dist/menu/MenuItem.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getAttrStyleAndClass, pureAttrs } from "../_util/hooks/useMergeSemantic.js";
|
|
2
2
|
import { getSlotPropsFnRun } from "../_util/tools.js";
|
|
3
3
|
import InternalTooltip from "../tooltip/index.js";
|
|
4
|
+
import { isFunction } from "../_util/is.js";
|
|
4
5
|
import { omitUndefined } from "../_util/omitUndefined.js";
|
|
5
6
|
import { useSiderCtx } from "../layout/Sider.js";
|
|
6
7
|
import { useMenuContext } from "./MenuContext.js";
|
|
@@ -27,7 +28,7 @@ const MenuItem = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
27
28
|
const title = getSlotPropsFnRun(slots, props, "title", false);
|
|
28
29
|
const { className, style } = getAttrStyleAndClass(attrs);
|
|
29
30
|
const { danger } = props;
|
|
30
|
-
const { prefixCls, firstLevel, direction, disableMenuItemTitleTooltip, inlineCollapsed: isInlineCollapsed, styles, classes } = menuContext.value;
|
|
31
|
+
const { prefixCls, firstLevel, direction, disableMenuItemTitleTooltip, tooltip, inlineCollapsed: isInlineCollapsed, styles, classes } = menuContext.value;
|
|
31
32
|
const children = filterEmpty(slots?.default?.());
|
|
32
33
|
const renderItemChildren = (inlineCollapsed) => {
|
|
33
34
|
const label = children?.[0];
|
|
@@ -44,14 +45,20 @@ const MenuItem = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
44
45
|
let tooltipTitle = title;
|
|
45
46
|
if (typeof title === "undefined") tooltipTitle = firstLevel ? children : "";
|
|
46
47
|
else if (title === false) tooltipTitle = "";
|
|
47
|
-
const
|
|
48
|
+
const tooltipConfig = tooltip === false ? void 0 : tooltip;
|
|
49
|
+
const mergedTooltipTitle = tooltipConfig && tooltipConfig.title !== void 0 ? tooltipConfig.title : tooltipTitle;
|
|
50
|
+
const tooltipProps = {
|
|
51
|
+
...tooltipConfig ?? {},
|
|
52
|
+
title: mergedTooltipTitle
|
|
53
|
+
};
|
|
48
54
|
if (!mergedCollapsed.value) {
|
|
49
55
|
tooltipProps.title = null;
|
|
50
56
|
tooltipProps.open = false;
|
|
51
57
|
} else {
|
|
52
|
-
tooltipProps.open = tooltipOpen.value;
|
|
58
|
+
tooltipProps.open = tooltipConfig?.open ?? tooltipOpen.value;
|
|
53
59
|
tooltipProps.onOpenChange = (open) => {
|
|
54
60
|
tooltipOpen.value = open;
|
|
61
|
+
tooltipConfig?.onOpenChange?.(open);
|
|
55
62
|
};
|
|
56
63
|
}
|
|
57
64
|
const childrenLength = children.length;
|
|
@@ -71,13 +78,23 @@ const MenuItem = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
71
78
|
class: clsx(`${prefixCls}-item-icon`, firstLevel ? classes?.itemIcon : classes?.subMenu?.itemIcon),
|
|
72
79
|
style: firstLevel ? styles?.itemIcon : styles?.subMenu?.itemIcon
|
|
73
80
|
}) : null, renderItemChildren(isInlineCollapsed)] });
|
|
74
|
-
if (!disableMenuItemTitleTooltip) {
|
|
81
|
+
if (!disableMenuItemTitleTooltip && tooltip !== false) {
|
|
82
|
+
const mergedTooltipPlacement = tooltipConfig && tooltipConfig.placement ? tooltipConfig.placement : direction === "rtl" ? "left" : "right";
|
|
83
|
+
const baseTooltipClassName = `${prefixCls}-inline-collapsed-tooltip`;
|
|
84
|
+
const mergeTooltipRootClassName = (classNames) => ({
|
|
85
|
+
...classNames,
|
|
86
|
+
root: clsx(baseTooltipClassName, classNames?.root)
|
|
87
|
+
});
|
|
88
|
+
const mergedTooltipClassNames = isFunction(tooltipConfig?.classes) ? (info) => {
|
|
89
|
+
const resolvedClassNames = tooltipConfig.classes(info);
|
|
90
|
+
return mergeTooltipRootClassName(resolvedClassNames);
|
|
91
|
+
} : mergeTooltipRootClassName(tooltipConfig?.classes);
|
|
75
92
|
const _returnNode = function() {
|
|
76
93
|
return returnNode;
|
|
77
94
|
}();
|
|
78
95
|
returnNode = createVNode(InternalTooltip, mergeProps(tooltipProps, {
|
|
79
|
-
"placement":
|
|
80
|
-
"classes":
|
|
96
|
+
"placement": mergedTooltipPlacement,
|
|
97
|
+
"classes": mergedTooltipClassNames
|
|
81
98
|
}), _isSlot(returnNode) ? returnNode : { default: () => [_returnNode] });
|
|
82
99
|
}
|
|
83
100
|
return returnNode;
|
package/dist/menu/index.js
CHANGED
|
@@ -35,6 +35,11 @@ const Menu = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit, expos
|
|
|
35
35
|
type: Number,
|
|
36
36
|
required: false
|
|
37
37
|
},
|
|
38
|
+
tooltip: {
|
|
39
|
+
type: [Boolean, Object],
|
|
40
|
+
required: false,
|
|
41
|
+
default: void 0
|
|
42
|
+
},
|
|
38
43
|
_internalDisableMenuItemTitleTooltip: {
|
|
39
44
|
type: Boolean,
|
|
40
45
|
required: false,
|
package/dist/menu/menu.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TooltipProps } from "../tooltip/index.js";
|
|
1
2
|
import { ItemType } from "./interface.js";
|
|
2
3
|
import { MenuTheme } from "./MenuContext.js";
|
|
3
4
|
import { CSSProperties, SlotsType } from "vue";
|
|
@@ -69,9 +70,11 @@ interface RenderItem {
|
|
|
69
70
|
interface MenuProps extends Omit<MenuProps$1, 'items' | '_internalComponents' | 'classes' | 'styles' | 'activeKey' | 'defaultActiveFirst' | 'onClick' | 'onDeselect' | 'onSelect' | 'onOpenChange' | 'rootClass' | 'labelRender' | 'extraRender' | 'itemIcon' | 'iconRender'> {
|
|
70
71
|
theme?: MenuTheme;
|
|
71
72
|
inlineIndent?: number;
|
|
73
|
+
tooltip?: false | TooltipProps;
|
|
72
74
|
/**
|
|
73
75
|
* @private Internal Usage. Not promise crash if used in production. Connect with chenshuai2144
|
|
74
76
|
* for removing.
|
|
77
|
+
* @deprecated Will be removed in next version. Use `tooltip={false}` instead.
|
|
75
78
|
*/
|
|
76
79
|
_internalDisableMenuItemTitleTooltip?: boolean;
|
|
77
80
|
items?: ItemType[];
|
package/dist/menu/menu.js
CHANGED
|
@@ -22,6 +22,7 @@ const omitPropKeys = [
|
|
|
22
22
|
"theme",
|
|
23
23
|
"expandIcon",
|
|
24
24
|
"_internalDisableMenuItemTitleTooltip",
|
|
25
|
+
"tooltip",
|
|
25
26
|
"inlineCollapsed",
|
|
26
27
|
"siderCollapsed",
|
|
27
28
|
"rootClass",
|
|
@@ -93,6 +94,7 @@ const InternalMenu = /* @__PURE__ */ defineComponent((props, { slots, emit, attr
|
|
|
93
94
|
theme: props.theme,
|
|
94
95
|
mode: mergedMode.value,
|
|
95
96
|
disableMenuItemTitleTooltip: props._internalDisableMenuItemTitleTooltip,
|
|
97
|
+
tooltip: props.tooltip,
|
|
96
98
|
classes: mergedClassNames.value,
|
|
97
99
|
styles: mergedStyles.value
|
|
98
100
|
}));
|
|
@@ -174,6 +176,11 @@ const InternalMenu = /* @__PURE__ */ defineComponent((props, { slots, emit, attr
|
|
|
174
176
|
type: Number,
|
|
175
177
|
required: false
|
|
176
178
|
},
|
|
179
|
+
tooltip: {
|
|
180
|
+
type: [Boolean, Object],
|
|
181
|
+
required: false,
|
|
182
|
+
default: void 0
|
|
183
|
+
},
|
|
177
184
|
_internalDisableMenuItemTitleTooltip: {
|
|
178
185
|
type: Boolean,
|
|
179
186
|
required: false,
|