naive-ui 2.41.0 → 2.42.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.
Files changed (209) hide show
  1. package/dist/index.js +930 -428
  2. package/dist/index.mjs +927 -430
  3. package/dist/index.prod.js +1 -1
  4. package/dist/index.prod.mjs +1 -1
  5. package/es/_internal/icon/src/styles/index.cssr.mjs +0 -1
  6. package/es/_internal/selection/src/Selection.d.ts +1 -1
  7. package/es/_mixins/use-form-item.d.ts +1 -1
  8. package/es/_utils/dom/download.d.ts +1 -0
  9. package/es/_utils/dom/download.mjs +3 -0
  10. package/es/_utils/index.d.ts +1 -1
  11. package/es/_utils/index.mjs +1 -1
  12. package/es/_utils/naive/index.d.ts +1 -0
  13. package/es/_utils/naive/index.mjs +1 -0
  14. package/es/_utils/naive/value.d.ts +1 -0
  15. package/es/_utils/naive/value.mjs +13 -0
  16. package/es/anchor/index.d.ts +1 -0
  17. package/es/anchor/src/Link.d.ts +3 -2
  18. package/es/anchor/src/Link.mjs +5 -2
  19. package/es/anchor/src/public-types.d.ts +5 -0
  20. package/es/anchor/src/public-types.mjs +1 -0
  21. package/es/auto-complete/src/AutoComplete.d.ts +1 -1
  22. package/es/cascader/src/Cascader.d.ts +1 -1
  23. package/es/components.d.ts +1 -0
  24. package/es/components.mjs +1 -0
  25. package/es/config-provider/src/internal-interface.d.ts +2 -0
  26. package/es/data-table/src/DataTable.d.ts +6 -6
  27. package/es/data-table/src/DataTable.mjs +6 -6
  28. package/es/data-table/src/styles/index.cssr.mjs +1 -0
  29. package/es/date-picker/src/DatePicker.d.ts +5 -5
  30. package/es/date-picker/src/DatePicker.mjs +1 -1
  31. package/es/date-picker/src/panel/date.d.ts +2 -2
  32. package/es/date-picker/src/panel/daterange.d.ts +3 -3
  33. package/es/date-picker/src/panel/datetime.d.ts +2 -2
  34. package/es/date-picker/src/panel/datetime.mjs +1 -1
  35. package/es/date-picker/src/panel/datetimerange.d.ts +3 -3
  36. package/es/date-picker/src/panel/datetimerange.mjs +2 -2
  37. package/es/date-picker/src/panel/month.d.ts +2 -2
  38. package/es/date-picker/src/panel/monthrange.d.ts +3 -3
  39. package/es/date-picker/src/panel/panelHeader.d.ts +4 -4
  40. package/es/date-picker/src/panel/use-calendar.d.ts +1 -1
  41. package/es/date-picker/src/panel/use-dual-calendar.d.ts +2 -2
  42. package/es/date-picker/src/panel/use-dual-calendar.mjs +3 -3
  43. package/es/date-picker/src/panel/use-panel-common.d.ts +1 -1
  44. package/es/date-picker/src/panel/use-panel-common.mjs +1 -1
  45. package/es/date-picker/src/props.d.ts +2 -2
  46. package/es/date-picker/src/props.mjs +1 -1
  47. package/es/descriptions/src/Descriptions.d.ts +1 -1
  48. package/es/form/index.d.ts +1 -0
  49. package/es/form/src/FormItem.d.ts +1 -1
  50. package/es/form/src/FormItemCol.d.ts +1 -1
  51. package/es/form/src/FormItemGridItem.d.ts +1 -1
  52. package/es/form/src/interface.d.ts +0 -1
  53. package/es/form/src/public-types.d.ts +1 -0
  54. package/es/form/src/public-types.mjs +1 -0
  55. package/es/icon/src/styles/index.cssr.mjs +0 -1
  56. package/es/input/src/Input.d.ts +1 -1
  57. package/es/input/src/Input.mjs +1 -8
  58. package/es/input-number/src/InputNumber.d.ts +1 -1
  59. package/es/input-otp/index.d.ts +3 -0
  60. package/es/input-otp/index.mjs +1 -0
  61. package/es/input-otp/src/InputOtp.d.ts +875 -0
  62. package/es/input-otp/src/InputOtp.mjs +322 -0
  63. package/es/input-otp/src/public-types.d.ts +24 -0
  64. package/es/input-otp/src/public-types.mjs +1 -0
  65. package/es/input-otp/src/styles/index.cssr.d.ts +2 -0
  66. package/es/input-otp/src/styles/index.cssr.mjs +20 -0
  67. package/es/input-otp/src/styles/input-otp-rtl.cssr.d.ts +2 -0
  68. package/es/input-otp/src/styles/input-otp-rtl.cssr.mjs +5 -0
  69. package/es/input-otp/styles/dark.d.ts +3 -0
  70. package/es/input-otp/styles/dark.mjs +12 -0
  71. package/es/input-otp/styles/index.d.ts +4 -0
  72. package/es/input-otp/styles/index.mjs +3 -0
  73. package/es/input-otp/styles/light.d.ts +81 -0
  74. package/es/input-otp/styles/light.mjs +22 -0
  75. package/es/input-otp/styles/rtl.d.ts +2 -0
  76. package/es/input-otp/styles/rtl.mjs +5 -0
  77. package/es/mention/src/Mention.d.ts +1 -1
  78. package/es/progress/src/Circle.d.ts +1 -1
  79. package/es/progress/src/MultipleCircle.d.ts +1 -1
  80. package/es/progress/src/Progress.d.ts +2 -2
  81. package/es/radio/src/Radio.mjs +5 -5
  82. package/es/radio/src/styles/radio.cssr.mjs +3 -7
  83. package/es/select/src/Select.d.ts +1 -1
  84. package/es/styles.d.ts +1 -0
  85. package/es/styles.mjs +1 -0
  86. package/es/tabs/src/TabPane.d.ts +1 -0
  87. package/es/themes/dark.mjs +2 -1
  88. package/es/themes/light.mjs +2 -0
  89. package/es/time-picker/src/TimePicker.d.ts +1 -1
  90. package/es/transfer/src/Transfer.d.ts +1 -1
  91. package/es/tree/src/Tree.d.ts +21 -17
  92. package/es/tree/src/Tree.mjs +4 -4
  93. package/es/tree/src/styles/index.cssr.mjs +0 -1
  94. package/es/tree-select/src/TreeSelect.d.ts +14 -1
  95. package/es/tree-select/src/TreeSelect.mjs +1 -0
  96. package/es/typography/src/text.d.ts +1 -1
  97. package/es/upload/index.d.ts +1 -0
  98. package/es/upload/index.mjs +1 -0
  99. package/es/upload/src/Upload.d.ts +11 -8
  100. package/es/upload/src/Upload.mjs +2 -0
  101. package/es/upload/src/UploadFile.mjs +8 -1
  102. package/es/upload/src/interface.d.ts +1 -0
  103. package/es/version.d.ts +1 -1
  104. package/es/version.mjs +1 -1
  105. package/es/watermark/src/Watermark.d.ts +1 -1
  106. package/lib/_internal/icon/src/styles/index.cssr.js +0 -1
  107. package/lib/_internal/selection/src/Selection.d.ts +1 -1
  108. package/lib/_mixins/use-form-item.d.ts +1 -1
  109. package/lib/_utils/dom/download.d.ts +1 -0
  110. package/lib/_utils/dom/download.js +4 -0
  111. package/lib/_utils/index.d.ts +1 -1
  112. package/lib/_utils/index.js +2 -1
  113. package/lib/_utils/naive/index.d.ts +1 -0
  114. package/lib/_utils/naive/index.js +3 -1
  115. package/lib/_utils/naive/value.d.ts +1 -0
  116. package/lib/_utils/naive/value.js +18 -0
  117. package/lib/anchor/index.d.ts +1 -0
  118. package/lib/anchor/src/Link.d.ts +3 -2
  119. package/lib/anchor/src/Link.js +4 -1
  120. package/lib/anchor/src/public-types.d.ts +5 -0
  121. package/lib/anchor/src/public-types.js +2 -0
  122. package/lib/auto-complete/src/AutoComplete.d.ts +1 -1
  123. package/lib/cascader/src/Cascader.d.ts +1 -1
  124. package/lib/components.d.ts +1 -0
  125. package/lib/components.js +1 -0
  126. package/lib/config-provider/src/internal-interface.d.ts +2 -0
  127. package/lib/data-table/src/DataTable.d.ts +6 -6
  128. package/lib/data-table/src/DataTable.js +6 -6
  129. package/lib/data-table/src/styles/index.cssr.js +1 -0
  130. package/lib/date-picker/src/DatePicker.d.ts +5 -5
  131. package/lib/date-picker/src/DatePicker.js +1 -1
  132. package/lib/date-picker/src/panel/date.d.ts +2 -2
  133. package/lib/date-picker/src/panel/daterange.d.ts +3 -3
  134. package/lib/date-picker/src/panel/datetime.d.ts +2 -2
  135. package/lib/date-picker/src/panel/datetime.js +1 -1
  136. package/lib/date-picker/src/panel/datetimerange.d.ts +3 -3
  137. package/lib/date-picker/src/panel/datetimerange.js +2 -2
  138. package/lib/date-picker/src/panel/month.d.ts +2 -2
  139. package/lib/date-picker/src/panel/monthrange.d.ts +3 -3
  140. package/lib/date-picker/src/panel/panelHeader.d.ts +4 -4
  141. package/lib/date-picker/src/panel/use-calendar.d.ts +1 -1
  142. package/lib/date-picker/src/panel/use-dual-calendar.d.ts +2 -2
  143. package/lib/date-picker/src/panel/use-dual-calendar.js +3 -3
  144. package/lib/date-picker/src/panel/use-panel-common.d.ts +1 -1
  145. package/lib/date-picker/src/panel/use-panel-common.js +1 -1
  146. package/lib/date-picker/src/props.d.ts +2 -2
  147. package/lib/date-picker/src/props.js +1 -1
  148. package/lib/descriptions/src/Descriptions.d.ts +1 -1
  149. package/lib/form/index.d.ts +1 -0
  150. package/lib/form/src/FormItem.d.ts +1 -1
  151. package/lib/form/src/FormItemCol.d.ts +1 -1
  152. package/lib/form/src/FormItemGridItem.d.ts +1 -1
  153. package/lib/form/src/interface.d.ts +0 -1
  154. package/lib/form/src/public-types.d.ts +1 -0
  155. package/lib/form/src/public-types.js +2 -0
  156. package/lib/icon/src/styles/index.cssr.js +0 -1
  157. package/lib/input/src/Input.d.ts +1 -1
  158. package/lib/input/src/Input.js +0 -7
  159. package/lib/input-number/src/InputNumber.d.ts +1 -1
  160. package/lib/input-otp/index.d.ts +3 -0
  161. package/lib/input-otp/index.js +9 -0
  162. package/lib/input-otp/src/InputOtp.d.ts +875 -0
  163. package/lib/input-otp/src/InputOtp.js +248 -0
  164. package/lib/input-otp/src/public-types.d.ts +24 -0
  165. package/lib/input-otp/src/public-types.js +2 -0
  166. package/lib/input-otp/src/styles/index.cssr.d.ts +2 -0
  167. package/lib/input-otp/src/styles/index.cssr.js +25 -0
  168. package/lib/input-otp/src/styles/input-otp-rtl.cssr.d.ts +2 -0
  169. package/lib/input-otp/src/styles/input-otp-rtl.cssr.js +10 -0
  170. package/lib/input-otp/styles/dark.d.ts +3 -0
  171. package/lib/input-otp/styles/dark.js +14 -0
  172. package/lib/input-otp/styles/index.d.ts +4 -0
  173. package/lib/input-otp/styles/index.js +12 -0
  174. package/lib/input-otp/styles/light.d.ts +81 -0
  175. package/lib/input-otp/styles/light.js +25 -0
  176. package/lib/input-otp/styles/rtl.d.ts +2 -0
  177. package/lib/input-otp/styles/rtl.js +11 -0
  178. package/lib/mention/src/Mention.d.ts +1 -1
  179. package/lib/progress/src/Circle.d.ts +1 -1
  180. package/lib/progress/src/MultipleCircle.d.ts +1 -1
  181. package/lib/progress/src/Progress.d.ts +2 -2
  182. package/lib/radio/src/Radio.js +2 -2
  183. package/lib/radio/src/styles/radio.cssr.js +3 -7
  184. package/lib/select/src/Select.d.ts +1 -1
  185. package/lib/styles.d.ts +1 -0
  186. package/lib/styles.js +99 -96
  187. package/lib/tabs/src/TabPane.d.ts +1 -0
  188. package/lib/themes/dark.js +1 -0
  189. package/lib/themes/light.js +92 -90
  190. package/lib/time-picker/src/TimePicker.d.ts +1 -1
  191. package/lib/transfer/src/Transfer.d.ts +1 -1
  192. package/lib/tree/src/Tree.d.ts +21 -17
  193. package/lib/tree/src/Tree.js +5 -4
  194. package/lib/tree/src/styles/index.cssr.js +0 -1
  195. package/lib/tree-select/src/TreeSelect.d.ts +14 -1
  196. package/lib/tree-select/src/TreeSelect.js +1 -1
  197. package/lib/typography/src/text.d.ts +1 -1
  198. package/lib/upload/index.d.ts +1 -0
  199. package/lib/upload/index.js +3 -1
  200. package/lib/upload/src/Upload.d.ts +11 -8
  201. package/lib/upload/src/Upload.js +2 -1
  202. package/lib/upload/src/UploadFile.js +7 -2
  203. package/lib/upload/src/interface.d.ts +1 -0
  204. package/lib/version.d.ts +1 -1
  205. package/lib/version.js +1 -1
  206. package/lib/watermark/src/Watermark.d.ts +1 -1
  207. package/package.json +1 -1
  208. package/volar.d.ts +3 -2
  209. package/web-types.json +139 -10
@@ -1,4 +1,4 @@
1
- import type { FormValidationStatus } from '../../form/src/interface';
1
+ import type { FormValidationStatus } from '../../form/src/public-types';
2
2
  import type { PopoverProps } from '../../popover';
3
3
  import type { SelectBaseOption, SelectOption } from '../../select/src/interface';
4
4
  import type { GetChildren, InternalTreeInst, Key, TreeOption, TreeOverrideNodeClickBehaviorReturn } from '../../tree/src/interface';
@@ -51,6 +51,10 @@ export declare const treeSelectProps: {
51
51
  readonly type: PropType<Key[]>;
52
52
  readonly default: () => never[];
53
53
  };
54
+ readonly indent: {
55
+ readonly type: NumberConstructor;
56
+ readonly default: 24;
57
+ };
54
58
  readonly indeterminateKeys: PropType<Key[]>;
55
59
  readonly renderSwitcherIcon: PropType<import("../../tree/src/interface").RenderSwitcherIcon>;
56
60
  readonly onUpdateIndeterminateKeys: PropType<MaybeArray<import("../../tree/src/Tree").OnUpdateIndeterminateKeys>>;
@@ -691,6 +695,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
691
695
  readonly type: PropType<Key[]>;
692
696
  readonly default: () => never[];
693
697
  };
698
+ readonly indent: {
699
+ readonly type: NumberConstructor;
700
+ readonly default: 24;
701
+ };
694
702
  readonly indeterminateKeys: PropType<Key[]>;
695
703
  readonly renderSwitcherIcon: PropType<import("../../tree/src/interface").RenderSwitcherIcon>;
696
704
  readonly onUpdateIndeterminateKeys: PropType<MaybeArray<import("../../tree/src/Tree").OnUpdateIndeterminateKeys>>;
@@ -1695,6 +1703,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1695
1703
  readonly type: PropType<Key[]>;
1696
1704
  readonly default: () => never[];
1697
1705
  };
1706
+ readonly indent: {
1707
+ readonly type: NumberConstructor;
1708
+ readonly default: 24;
1709
+ };
1698
1710
  readonly indeterminateKeys: PropType<Key[]>;
1699
1711
  readonly renderSwitcherIcon: PropType<import("../../tree/src/interface").RenderSwitcherIcon>;
1700
1712
  readonly onUpdateIndeterminateKeys: PropType<MaybeArray<import("../../tree/src/Tree").OnUpdateIndeterminateKeys>>;
@@ -2309,6 +2321,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
2309
2321
  readonly defaultExpandAll: boolean;
2310
2322
  readonly allowCheckingNotLoaded: boolean;
2311
2323
  readonly cascade: boolean;
2324
+ readonly indent: number;
2312
2325
  readonly checkStrategy: CheckStrategy;
2313
2326
  readonly disabledField: string;
2314
2327
  readonly leafOnly: boolean;
@@ -603,7 +603,7 @@ exports.default = (0, vue_1.defineComponent)({
603
603
  (0, _utils_1.resolveWrappedSlot)($slots.header, (children) => {
604
604
  return children ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-tree-select-menu__header`, "data-header": true }, children)) : null;
605
605
  }),
606
- (0, vue_1.h)(tree_1.NTree, { ref: "treeInstRef", blockLine: true, allowCheckingNotLoaded: this.allowCheckingNotLoaded, showIrrelevantNodes: false, animated: false, pattern: this.pattern, getChildren: this.getChildren, filter: this.mergedFilter, data: options, cancelable: multiple, labelField: this.labelField, keyField: this.keyField, disabledField: this.disabledField, childrenField: this.childrenField, theme: mergedTheme.peers.Tree, themeOverrides: mergedTheme.peerOverrides.Tree, defaultExpandAll: this.defaultExpandAll, defaultExpandedKeys: this.defaultExpandedKeys, expandedKeys: this.mergedExpandedKeys, checkedKeys: this.treeCheckedKeys, selectedKeys: this.treeSelectedKeys, checkable: checkable, checkStrategy: this.checkStrategy, cascade: this.mergedCascade, leafOnly: this.leafOnly, multiple: this.multiple, renderLabel: this.renderLabel, renderPrefix: this.renderPrefix, renderSuffix: this.renderSuffix, renderSwitcherIcon: this.renderSwitcherIcon, nodeProps: this.nodeProps, watchProps: this.watchProps, virtualScroll: this.consistentMenuWidth && this.virtualScroll, overrideDefaultNodeClickBehavior: this.overrideDefaultNodeClickBehavior, internalTreeSelect: true, internalUnifySelectCheck: true, internalScrollable: true, internalScrollablePadding: this.menuPadding, internalFocusable: false, internalCheckboxFocusable: false, internalRenderEmpty: () => ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-tree-select-menu__empty` }, (0, _utils_1.resolveSlot)($slots.empty, () => [
606
+ (0, vue_1.h)(tree_1.NTree, { ref: "treeInstRef", blockLine: true, allowCheckingNotLoaded: this.allowCheckingNotLoaded, showIrrelevantNodes: false, animated: false, pattern: this.pattern, getChildren: this.getChildren, filter: this.mergedFilter, data: options, cancelable: multiple, labelField: this.labelField, keyField: this.keyField, disabledField: this.disabledField, childrenField: this.childrenField, theme: mergedTheme.peers.Tree, themeOverrides: mergedTheme.peerOverrides.Tree, defaultExpandAll: this.defaultExpandAll, defaultExpandedKeys: this.defaultExpandedKeys, indent: this.indent, expandedKeys: this.mergedExpandedKeys, checkedKeys: this.treeCheckedKeys, selectedKeys: this.treeSelectedKeys, checkable: checkable, checkStrategy: this.checkStrategy, cascade: this.mergedCascade, leafOnly: this.leafOnly, multiple: this.multiple, renderLabel: this.renderLabel, renderPrefix: this.renderPrefix, renderSuffix: this.renderSuffix, renderSwitcherIcon: this.renderSwitcherIcon, nodeProps: this.nodeProps, watchProps: this.watchProps, virtualScroll: this.consistentMenuWidth && this.virtualScroll, overrideDefaultNodeClickBehavior: this.overrideDefaultNodeClickBehavior, internalTreeSelect: true, internalUnifySelectCheck: true, internalScrollable: true, internalScrollablePadding: this.menuPadding, internalFocusable: false, internalCheckboxFocusable: false, internalRenderEmpty: () => ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-tree-select-menu__empty` }, (0, _utils_1.resolveSlot)($slots.empty, () => [
607
607
  (0, vue_1.h)(empty_1.NEmpty, { theme: mergedTheme.peers.Empty, themeOverrides: mergedTheme.peerOverrides.Empty })
608
608
  ]))), onLoad: this.onLoad, onUpdateCheckedKeys: this.handleUpdateCheckedKeys, onUpdateIndeterminateKeys: this.handleUpdateIndeterminateKeys, onUpdateExpandedKeys: this.doUpdateExpandedKeys }),
609
609
  (0, _utils_1.resolveWrappedSlot)($slots.action, (children) => {
@@ -663,8 +663,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
663
663
  ulPadding: string;
664
664
  }, any>>>;
665
665
  }>> & Readonly<{}>, {
666
- readonly delete: boolean;
667
666
  readonly type: string;
667
+ readonly delete: boolean;
668
668
  readonly code: boolean;
669
669
  readonly strong: boolean;
670
670
  readonly italic: boolean;
@@ -1,3 +1,4 @@
1
+ export { publicDownload as uploadDownload } from '../_utils/dom/download';
1
2
  export type * from './src/public-types';
2
3
  export { default as NUpload, uploadProps } from './src/Upload';
3
4
  export { default as NUploadDragger } from './src/UploadDragger';
@@ -3,7 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.NUploadTrigger = exports.NUploadFileList = exports.NUploadDragger = exports.uploadProps = exports.NUpload = void 0;
6
+ exports.NUploadTrigger = exports.NUploadFileList = exports.NUploadDragger = exports.uploadProps = exports.NUpload = exports.uploadDownload = void 0;
7
+ var download_1 = require("../_utils/dom/download");
8
+ Object.defineProperty(exports, "uploadDownload", { enumerable: true, get: function () { return download_1.publicDownload; } });
7
9
  var Upload_1 = require("./src/Upload");
8
10
  Object.defineProperty(exports, "NUpload", { enumerable: true, get: function () { return __importDefault(Upload_1).default; } });
9
11
  Object.defineProperty(exports, "uploadProps", { enumerable: true, get: function () { return Upload_1.uploadProps; } });
@@ -45,6 +45,7 @@ export declare const uploadProps: {
45
45
  readonly isErrorState: PropType<(xhr: XMLHttpRequest) => boolean>;
46
46
  /** currently not used */
47
47
  readonly onDownload: PropType<UploadOnDownload>;
48
+ readonly customDownload: PropType<UploadOnDownload>;
48
49
  readonly defaultUpload: {
49
50
  readonly type: BooleanConstructor;
50
51
  readonly default: true;
@@ -875,6 +876,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
875
876
  readonly isErrorState: PropType<(xhr: XMLHttpRequest) => boolean>;
876
877
  /** currently not used */
877
878
  readonly onDownload: PropType<UploadOnDownload>;
879
+ readonly customDownload: PropType<UploadOnDownload>;
878
880
  readonly defaultUpload: {
879
881
  readonly type: BooleanConstructor;
880
882
  readonly default: true;
@@ -1979,6 +1981,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1979
1981
  readonly isErrorState: PropType<(xhr: XMLHttpRequest) => boolean>;
1980
1982
  /** currently not used */
1981
1983
  readonly onDownload: PropType<UploadOnDownload>;
1984
+ readonly customDownload: PropType<UploadOnDownload>;
1982
1985
  readonly defaultUpload: {
1983
1986
  readonly type: BooleanConstructor;
1984
1987
  readonly default: true;
@@ -2772,19 +2775,19 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
2772
2775
  readonly disabled: boolean | undefined;
2773
2776
  readonly multiple: boolean;
2774
2777
  readonly showTrigger: boolean;
2775
- readonly listType: ListType;
2778
+ readonly directory: boolean;
2779
+ readonly directoryDnd: boolean;
2780
+ readonly showFileList: boolean;
2781
+ readonly withCredentials: boolean;
2782
+ readonly responseType: XMLHttpRequestResponseType;
2783
+ readonly defaultUpload: boolean;
2784
+ readonly defaultFileList: UploadFileInfo[];
2776
2785
  readonly showCancelButton: boolean;
2777
2786
  readonly showRemoveButton: boolean;
2778
2787
  readonly showDownloadButton: boolean;
2779
2788
  readonly showRetryButton: boolean;
2780
2789
  readonly showPreviewButton: boolean;
2790
+ readonly listType: ListType;
2781
2791
  readonly shouldUseThumbnailUrl: ShouldUseThumbnailUrl;
2782
- readonly withCredentials: boolean;
2783
- readonly responseType: XMLHttpRequestResponseType;
2784
- readonly directory: boolean;
2785
- readonly directoryDnd: boolean;
2786
- readonly showFileList: boolean;
2787
- readonly defaultUpload: boolean;
2788
- readonly defaultFileList: UploadFileInfo[];
2789
2792
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2790
2793
  export default _default;
@@ -198,7 +198,7 @@ exports.uploadProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props),
198
198
  default: undefined
199
199
  }, onChange: Function, onRemove: Function, onFinish: Function, onError: Function, onRetry: Function, onBeforeUpload: Function, isErrorState: Function,
200
200
  /** currently not used */
201
- onDownload: Function, defaultUpload: {
201
+ onDownload: Function, customDownload: Function, defaultUpload: {
202
202
  type: Boolean,
203
203
  default: true
204
204
  }, fileList: Array, 'onUpdate:fileList': [Function, Array], onUpdateFileList: [Function, Array], fileListClass: String, fileListStyle: [String, Object], defaultFileList: {
@@ -468,6 +468,7 @@ exports.default = (0, vue_1.defineComponent)({
468
468
  showRetryButtonRef: (0, vue_1.toRef)(props, 'showRetryButton'),
469
469
  onRemoveRef: (0, vue_1.toRef)(props, 'onRemove'),
470
470
  onDownloadRef: (0, vue_1.toRef)(props, 'onDownload'),
471
+ customDownloadRef: (0, vue_1.toRef)(props, 'customDownload'),
471
472
  mergedFileListRef,
472
473
  triggerClassRef: (0, vue_1.toRef)(props, 'triggerClass'),
473
474
  triggerStyleRef: (0, vue_1.toRef)(props, 'triggerStyle'),
@@ -155,10 +155,15 @@ exports.default = (0, vue_1.defineComponent)({
155
155
  });
156
156
  }
157
157
  function handleDownload(file) {
158
- const { onDownloadRef: { value: onDownload } } = NUpload;
158
+ const { onDownloadRef: { value: onDownload }, customDownloadRef: { value: customDownload } } = NUpload;
159
159
  void Promise.resolve(onDownload ? onDownload(Object.assign({}, file)) : true).then((res) => {
160
160
  if (res !== false) {
161
- (0, _utils_1.download)(file.url, file.name);
161
+ if (customDownload) {
162
+ customDownload(Object.assign({}, file));
163
+ }
164
+ else {
165
+ (0, _utils_1.download)(file.url, file.name);
166
+ }
162
167
  }
163
168
  });
164
169
  }
@@ -31,6 +31,7 @@ export interface UploadInjection {
31
31
  mergedFileListRef: Ref<UploadSettledFileInfo[]>;
32
32
  onRemoveRef: Ref<UploadOnRemove | undefined>;
33
33
  onDownloadRef: Ref<UploadOnDownload | undefined>;
34
+ customDownloadRef: Ref<UploadOnDownload | undefined>;
34
35
  xhrMap: Map<string, XMLHttpRequest>;
35
36
  showPreviewButtonRef: Ref<boolean>;
36
37
  onPreviewRef: Ref<OnPreview | undefined>;
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "2.41.0";
1
+ declare const _default: "2.42.0";
2
2
  export default _default;
package/lib/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = '2.41.0';
3
+ exports.default = '2.42.0';
@@ -300,8 +300,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
300
300
  readonly xGap: number;
301
301
  readonly yGap: number;
302
302
  readonly selectable: boolean;
303
- readonly fullscreen: boolean;
304
303
  readonly debug: boolean;
304
+ readonly fullscreen: boolean;
305
305
  readonly yOffset: number;
306
306
  readonly xOffset: number;
307
307
  readonly imageOpacity: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "naive-ui",
3
- "version": "2.41.0",
3
+ "version": "2.42.0",
4
4
  "description": "A Vue 3 Component Library. Fairly Complete, Theme Customizable, Uses TypeScript, Fast",
5
5
  "author": "07akioni",
6
6
  "license": "MIT",
package/volar.d.ts CHANGED
@@ -68,6 +68,7 @@ declare module 'vue' {
68
68
  NH4: (typeof import('naive-ui'))['NH4']
69
69
  NH5: (typeof import('naive-ui'))['NH5']
70
70
  NH6: (typeof import('naive-ui'))['NH6']
71
+ NHighlight: (typeof import('naive-ui'))['NHighlight']
71
72
  NHr: (typeof import('naive-ui'))['NHr']
72
73
  NIcon: (typeof import('naive-ui'))['NIcon']
73
74
  NIconWrapper: (typeof import('naive-ui'))['NIconWrapper']
@@ -78,6 +79,7 @@ declare module 'vue' {
78
79
  NInputGroup: (typeof import('naive-ui'))['NInputGroup']
79
80
  NInputGroupLabel: (typeof import('naive-ui'))['NInputGroupLabel']
80
81
  NInputNumber: (typeof import('naive-ui'))['NInputNumber']
82
+ NInputOtp: (typeof import('naive-ui'))['NInputOtp']
81
83
  NLayout: (typeof import('naive-ui'))['NLayout']
82
84
  NLayoutContent: (typeof import('naive-ui'))['NLayoutContent']
83
85
  NLayoutFooter: (typeof import('naive-ui'))['NLayoutFooter']
@@ -89,6 +91,7 @@ declare module 'vue' {
89
91
  NListItem: (typeof import('naive-ui'))['NListItem']
90
92
  NLoadingBarProvider: (typeof import('naive-ui'))['NLoadingBarProvider']
91
93
  NLog: (typeof import('naive-ui'))['NLog']
94
+ NMarquee: (typeof import('naive-ui'))['NMarquee']
92
95
  NMention: (typeof import('naive-ui'))['NMention']
93
96
  NMenu: (typeof import('naive-ui'))['NMenu']
94
97
  NMessageProvider: (typeof import('naive-ui'))['NMessageProvider']
@@ -150,8 +153,6 @@ declare module 'vue' {
150
153
  NUploadTrigger: (typeof import('naive-ui'))['NUploadTrigger']
151
154
  NVirtualList: (typeof import('naive-ui'))['NVirtualList']
152
155
  NWatermark: (typeof import('naive-ui'))['NWatermark']
153
- NHighlight: (typeof import('naive-ui'))['NHighlight']
154
- NMarquee: (typeof import('naive-ui'))['NMarquee']
155
156
  }
156
157
  }
157
158
  export {}
package/web-types.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
4
  "name": "naive-ui",
5
- "version": "2.41.0",
5
+ "version": "2.42.0",
6
6
  "js-types-syntax": "typescript",
7
7
  "contributions": {
8
8
  "html": {
@@ -282,13 +282,22 @@
282
282
  "source": {
283
283
  "symbol": "NAnchorLink"
284
284
  },
285
- "slots": [],
285
+ "slots": [
286
+ {
287
+ "name": "title",
288
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/anchor",
289
+ "description": "The title of the link.",
290
+ "description-sections": {
291
+ "since": "2.42.0"
292
+ }
293
+ }
294
+ ],
286
295
  "attributes": [],
287
296
  "props": [
288
297
  {
289
298
  "name": "title",
290
299
  "doc-url": "https://www.naiveui.com/en-US/os-theme/components/anchor",
291
- "type": "stirng",
300
+ "type": "string",
292
301
  "description": "The content of link",
293
302
  "default": "undefined"
294
303
  },
@@ -3889,7 +3898,7 @@
3889
3898
  "type": "string"
3890
3899
  },
3891
3900
  {
3892
- "name": "timer-picker-format",
3901
+ "name": "time-picker-format",
3893
3902
  "doc-url": "https://www.naiveui.com/en-US/os-theme/components/date-picker",
3894
3903
  "type": "string"
3895
3904
  },
@@ -8560,6 +8569,101 @@
8560
8569
  ]
8561
8570
  }
8562
8571
  },
8572
+ {
8573
+ "name": "NInputOtp",
8574
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
8575
+ "source": {
8576
+ "symbol": "NInputOtp"
8577
+ },
8578
+ "slots": [],
8579
+ "attributes": [],
8580
+ "props": [
8581
+ {
8582
+ "name": "default-value",
8583
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
8584
+ "type": "Array"
8585
+ },
8586
+ {
8587
+ "name": "value",
8588
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
8589
+ "type": "Array"
8590
+ },
8591
+ {
8592
+ "name": "length",
8593
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
8594
+ "type": "number"
8595
+ },
8596
+ {
8597
+ "name": "block",
8598
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
8599
+ "type": "boolean"
8600
+ },
8601
+ {
8602
+ "name": "size",
8603
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
8604
+ "type": "string"
8605
+ },
8606
+ {
8607
+ "name": "disabled",
8608
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
8609
+ "type": "boolean"
8610
+ },
8611
+ {
8612
+ "name": "mask",
8613
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
8614
+ "type": "boolean"
8615
+ },
8616
+ {
8617
+ "name": "readonly",
8618
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
8619
+ "type": "boolean"
8620
+ },
8621
+ {
8622
+ "name": "status",
8623
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
8624
+ "type": "string"
8625
+ },
8626
+ {
8627
+ "name": "gap",
8628
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
8629
+ "type": "string | number"
8630
+ },
8631
+ {
8632
+ "name": "placeholder",
8633
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
8634
+ "type": "string"
8635
+ },
8636
+ {
8637
+ "name": "allow-input",
8638
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
8639
+ "type": "Function"
8640
+ }
8641
+ ],
8642
+ "js": {
8643
+ "events": [
8644
+ {
8645
+ "name": "blur",
8646
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp"
8647
+ },
8648
+ {
8649
+ "name": "focus",
8650
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp"
8651
+ },
8652
+ {
8653
+ "name": "update-value",
8654
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp"
8655
+ },
8656
+ {
8657
+ "name": "update-value",
8658
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp"
8659
+ },
8660
+ {
8661
+ "name": "finish",
8662
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp"
8663
+ }
8664
+ ]
8665
+ }
8666
+ },
8563
8667
  {
8564
8668
  "name": "NLayout",
8565
8669
  "description": "<!--single-column-->\n\nLayout is for layout.\n\nThe component is a bit complicated to use. But like a manual gear car, it worths a shot.\n\nIf you are use version before v2.3.0, you may want to know about <n-a href=\"#Changes-After-v2.3.0\">Changes After v2.3.0</n-a>.",
@@ -13311,7 +13415,7 @@
13311
13415
  },
13312
13416
  {
13313
13417
  "name": "NSpace",
13314
- "description": "A great invention (which is not invented by me).\n\nIf you don't have compitable issue for `gap` CSS property, it's suggested to use [Flex](flex).",
13418
+ "description": "A great invention (which is not invented by me).\n\nIf you don't have compatibility issues for `gap` CSS property, it's suggested to use [Flex](flex).",
13315
13419
  "doc-url": "https://www.naiveui.com/en-US/os-theme/components/space",
13316
13420
  "source": {
13317
13421
  "symbol": "NSpace"
@@ -16022,11 +16126,6 @@
16022
16126
  "description": "See [Scrollbar props](scrollbar#Scrollbar-Props)",
16023
16127
  "default": "undefined"
16024
16128
  },
16025
- {
16026
- "name": "indent",
16027
- "doc-url": "https://www.naiveui.com/en-US/os-theme/components/tree",
16028
- "type": "number"
16029
- },
16030
16129
  {
16031
16130
  "name": "allow-drop",
16032
16131
  "doc-url": "https://www.naiveui.com/en-US/os-theme/components/tree",
@@ -16188,6 +16287,16 @@
16188
16287
  "description": "Expanded items by default.",
16189
16288
  "default": "[]"
16190
16289
  },
16290
+ {
16291
+ "name": "indent",
16292
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/tree",
16293
+ "type": "number",
16294
+ "description": "Indent of per level of the tree.",
16295
+ "default": "24",
16296
+ "description-sections": {
16297
+ "since": "2.9.0"
16298
+ }
16299
+ },
16191
16300
  {
16192
16301
  "name": "indeterminate-keys",
16193
16302
  "doc-url": "https://www.naiveui.com/en-US/os-theme/components/tree",
@@ -16673,6 +16782,16 @@
16673
16782
  "description": "Expand specific keys by default.",
16674
16783
  "default": "[]"
16675
16784
  },
16785
+ {
16786
+ "name": "indent",
16787
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/tree-select",
16788
+ "type": "number",
16789
+ "description": "Indent of per level of the tree.",
16790
+ "default": "24",
16791
+ "description-sections": {
16792
+ "since": "2.41.1"
16793
+ }
16794
+ },
16676
16795
  {
16677
16796
  "name": "indeterminate-keys",
16678
16797
  "doc-url": "https://www.naiveui.com/en-US/os-theme/components/tree-select",
@@ -17392,6 +17511,16 @@
17392
17511
  "since": "2.29.1"
17393
17512
  }
17394
17513
  },
17514
+ {
17515
+ "name": "custom-download",
17516
+ "doc-url": "https://www.naiveui.com/en-US/os-theme/components/upload",
17517
+ "type": "(file: FileInfo) => void",
17518
+ "description": "Customize download request",
17519
+ "default": "undefined",
17520
+ "description-sections": {
17521
+ "since": "2.41.1"
17522
+ }
17523
+ },
17395
17524
  {
17396
17525
  "name": "default-upload",
17397
17526
  "doc-url": "https://www.naiveui.com/en-US/os-theme/components/upload",