naive-ui 2.40.2 → 2.40.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +427 -368
- package/dist/index.mjs +427 -368
- package/dist/index.prod.js +1 -1
- package/dist/index.prod.mjs +1 -1
- package/es/_internal/icons/Attach.mjs +1 -1
- package/es/_internal/icons/Cancel.mjs +1 -1
- package/es/_internal/icons/Clear.mjs +1 -1
- package/es/_internal/icons/Close.mjs +1 -1
- package/es/_internal/icons/Date.mjs +1 -1
- package/es/_internal/icons/Download.mjs +1 -1
- package/es/_internal/icons/Error.mjs +1 -1
- package/es/_internal/icons/Info.mjs +1 -1
- package/es/_internal/icons/Retry.mjs +1 -1
- package/es/_internal/icons/RotateClockwise.mjs +1 -1
- package/es/_internal/icons/RotateCounterclockwise.mjs +1 -1
- package/es/_internal/icons/Success.mjs +1 -1
- package/es/_internal/icons/Time.mjs +1 -1
- package/es/_internal/icons/To.mjs +1 -1
- package/es/_internal/icons/Trash.mjs +1 -1
- package/es/_internal/icons/Warning.mjs +1 -1
- package/es/_internal/icons/ZoomIn.mjs +1 -1
- package/es/_internal/icons/ZoomOut.mjs +1 -1
- package/es/_internal/icons/replaceable.d.ts +2 -1
- package/es/_internal/icons/replaceable.mjs +7 -2
- package/es/_internal/scrollbar/src/Scrollbar.d.ts +16 -4
- package/es/_internal/scrollbar/src/Scrollbar.mjs +41 -5
- package/es/_internal/scrollbar/src/styles/index.cssr.mjs +16 -4
- package/es/_mixins/index.d.ts +1 -1
- package/es/_mixins/index.mjs +1 -1
- package/es/_utils/composable/use-resize.mjs +9 -1
- package/es/_utils/css/rtl-inset.mjs +1 -1
- package/es/back-top/src/BackTop.mjs +2 -2
- package/es/back-top/src/BackTopIcon.d.ts +1 -1
- package/es/back-top/src/BackTopIcon.mjs +1 -1
- package/es/carousel/src/CarouselArrow.mjs +24 -20
- package/es/checkbox/src/CheckMark.d.ts +2 -1
- package/es/checkbox/src/CheckMark.mjs +1 -1
- package/es/checkbox/src/Checkbox.mjs +4 -4
- package/es/checkbox/src/LineMark.d.ts +2 -1
- package/es/checkbox/src/LineMark.mjs +1 -1
- package/es/config-provider/src/internal-interface.d.ts +7 -7
- package/es/data-table/index.d.ts +1 -1
- package/es/descriptions/index.d.ts +2 -2
- package/es/descriptions/index.mjs +2 -2
- package/es/divider/index.d.ts +1 -1
- package/es/divider/index.mjs +1 -1
- package/es/drawer/index.d.ts +2 -2
- package/es/drawer/index.mjs +2 -2
- package/es/drawer/src/DrawerBodyWrapper.mjs +1 -1
- package/es/dropdown/index.d.ts +2 -2
- package/es/dropdown/index.mjs +1 -1
- package/es/dynamic-input/index.d.ts +1 -1
- package/es/dynamic-input/index.mjs +1 -1
- package/es/dynamic-input/styles/rtl.mjs +2 -2
- package/es/dynamic-tags/index.d.ts +1 -1
- package/es/dynamic-tags/index.mjs +1 -1
- package/es/element/index.d.ts +1 -1
- package/es/element/index.mjs +1 -1
- package/es/ellipsis/index.d.ts +1 -1
- package/es/ellipsis/index.mjs +1 -1
- package/es/empty/index.d.ts +1 -1
- package/es/empty/index.mjs +1 -1
- package/es/equation/index.d.ts +1 -1
- package/es/equation/index.mjs +1 -1
- package/es/flex/index.d.ts +1 -1
- package/es/flex/index.mjs +1 -1
- package/es/float-button/index.d.ts +1 -1
- package/es/float-button/index.mjs +1 -1
- package/es/float-button/src/styles/index.cssr.mjs +8 -2
- package/es/float-button-group/index.d.ts +1 -1
- package/es/float-button-group/index.mjs +1 -1
- package/es/float-button-group/src/styles/index.cssr.mjs +7 -1
- package/es/form/index.d.ts +3 -3
- package/es/form/index.mjs +3 -3
- package/es/gradient-text/index.d.ts +1 -1
- package/es/gradient-text/index.mjs +1 -1
- package/es/grid/index.d.ts +3 -3
- package/es/grid/index.mjs +3 -3
- package/es/highlight/index.d.ts +1 -1
- package/es/highlight/index.mjs +1 -1
- package/es/image/index.d.ts +2 -2
- package/es/image/index.mjs +2 -2
- package/es/image/src/ImagePreview.mjs +4 -4
- package/es/image/src/icons.d.ts +3 -3
- package/es/image/src/icons.mjs +30 -24
- package/es/image/src/styles/index.cssr.mjs +1 -1
- package/es/infinite-scroll/index.d.ts +1 -1
- package/es/infinite-scroll/index.mjs +1 -1
- package/es/input/index.d.ts +3 -3
- package/es/input/index.mjs +3 -3
- package/es/input-number/index.d.ts +1 -1
- package/es/input-number/index.mjs +1 -1
- package/es/layout/index.d.ts +6 -6
- package/es/layout/index.mjs +4 -4
- package/es/legacy-transfer/index.d.ts +1 -1
- package/es/legacy-transfer/index.mjs +1 -1
- package/es/list/index.d.ts +1 -1
- package/es/list/index.mjs +1 -1
- package/es/loading-bar/index.d.ts +1 -1
- package/es/loading-bar/index.mjs +1 -1
- package/es/log/index.d.ts +1 -1
- package/es/log/index.mjs +1 -1
- package/es/marquee/index.d.ts +1 -1
- package/es/marquee/index.mjs +1 -1
- package/es/mention/index.d.ts +1 -1
- package/es/mention/index.mjs +1 -1
- package/es/menu/index.d.ts +1 -1
- package/es/menu/index.mjs +1 -1
- package/es/message/index.d.ts +1 -1
- package/es/message/index.mjs +1 -1
- package/es/modal/index.d.ts +1 -1
- package/es/modal/index.mjs +1 -1
- package/es/modal/src/styles/index.cssr.mjs +1 -1
- package/es/popover/src/Popover.mjs +4 -1
- package/es/rate/src/Rate.mjs +2 -2
- package/es/rate/src/StarIcon.d.ts +1 -1
- package/es/rate/src/StarIcon.mjs +1 -1
- package/es/result/src/403.d.ts +1 -2
- package/es/result/src/403.mjs +12 -10
- package/es/result/src/404.d.ts +1 -2
- package/es/result/src/404.mjs +32 -30
- package/es/result/src/418.d.ts +1 -2
- package/es/result/src/418.mjs +33 -31
- package/es/result/src/500.d.ts +1 -2
- package/es/result/src/500.mjs +18 -16
- package/es/result/src/Result.mjs +8 -8
- package/es/styles.d.ts +5 -5
- package/es/styles.mjs +5 -5
- package/es/theme-editor/src/ThemeEditor.mjs +25 -23
- package/es/themes/dark.mjs +7 -7
- package/es/themes/light.mjs +7 -7
- package/es/upload/src/UploadFile.mjs +3 -3
- package/es/upload/src/icons.d.ts +2 -2
- package/es/upload/src/icons.mjs +2 -2
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/_internal/icons/Attach.js +2 -2
- package/lib/_internal/icons/Cancel.js +2 -2
- package/lib/_internal/icons/Clear.js +2 -2
- package/lib/_internal/icons/Close.js +2 -2
- package/lib/_internal/icons/Date.js +2 -2
- package/lib/_internal/icons/Download.js +2 -2
- package/lib/_internal/icons/Error.js +2 -2
- package/lib/_internal/icons/Info.js +2 -2
- package/lib/_internal/icons/Retry.js +2 -2
- package/lib/_internal/icons/RotateClockwise.js +2 -2
- package/lib/_internal/icons/RotateCounterclockwise.js +2 -2
- package/lib/_internal/icons/Success.js +2 -2
- package/lib/_internal/icons/Time.js +2 -2
- package/lib/_internal/icons/To.js +2 -2
- package/lib/_internal/icons/Trash.js +2 -2
- package/lib/_internal/icons/Warning.js +2 -2
- package/lib/_internal/icons/ZoomIn.js +2 -2
- package/lib/_internal/icons/ZoomOut.js +2 -2
- package/lib/_internal/icons/replaceable.d.ts +2 -1
- package/lib/_internal/icons/replaceable.js +6 -1
- package/lib/_internal/scrollbar/src/Scrollbar.d.ts +16 -4
- package/lib/_internal/scrollbar/src/Scrollbar.js +24 -8
- package/lib/_internal/scrollbar/src/styles/index.cssr.js +16 -4
- package/lib/_mixins/index.d.ts +1 -1
- package/lib/_mixins/index.js +2 -2
- package/lib/_utils/composable/use-resize.js +8 -0
- package/lib/_utils/css/rtl-inset.js +1 -1
- package/lib/back-top/src/BackTop.js +1 -1
- package/lib/back-top/src/BackTopIcon.d.ts +1 -1
- package/lib/back-top/src/BackTopIcon.js +1 -1
- package/lib/carousel/src/CarouselArrow.js +12 -8
- package/lib/checkbox/src/CheckMark.d.ts +2 -1
- package/lib/checkbox/src/CheckMark.js +1 -1
- package/lib/checkbox/src/Checkbox.js +1 -1
- package/lib/checkbox/src/LineMark.d.ts +2 -1
- package/lib/checkbox/src/LineMark.js +1 -1
- package/lib/config-provider/src/internal-interface.d.ts +7 -7
- package/lib/data-table/index.d.ts +1 -1
- package/lib/descriptions/index.d.ts +2 -2
- package/lib/descriptions/index.js +3 -3
- package/lib/divider/index.d.ts +1 -1
- package/lib/divider/index.js +2 -2
- package/lib/drawer/index.d.ts +2 -2
- package/lib/drawer/index.js +3 -3
- package/lib/drawer/src/DrawerBodyWrapper.js +1 -1
- package/lib/dropdown/index.d.ts +2 -2
- package/lib/dropdown/index.js +2 -2
- package/lib/dynamic-input/index.d.ts +1 -1
- package/lib/dynamic-input/index.js +2 -2
- package/lib/dynamic-input/styles/rtl.js +5 -5
- package/lib/dynamic-tags/index.d.ts +1 -1
- package/lib/dynamic-tags/index.js +2 -2
- package/lib/element/index.d.ts +1 -1
- package/lib/element/index.js +2 -2
- package/lib/ellipsis/index.d.ts +1 -1
- package/lib/ellipsis/index.js +2 -2
- package/lib/empty/index.d.ts +1 -1
- package/lib/empty/index.js +2 -2
- package/lib/equation/index.d.ts +1 -1
- package/lib/equation/index.js +2 -2
- package/lib/flex/index.d.ts +1 -1
- package/lib/flex/index.js +2 -2
- package/lib/float-button/index.d.ts +1 -1
- package/lib/float-button/index.js +2 -2
- package/lib/float-button/src/styles/index.cssr.js +8 -2
- package/lib/float-button-group/index.d.ts +1 -1
- package/lib/float-button-group/index.js +2 -2
- package/lib/float-button-group/src/styles/index.cssr.js +7 -1
- package/lib/form/index.d.ts +3 -3
- package/lib/form/index.js +5 -5
- package/lib/gradient-text/index.d.ts +1 -1
- package/lib/gradient-text/index.js +2 -2
- package/lib/grid/index.d.ts +3 -3
- package/lib/grid/index.js +4 -4
- package/lib/highlight/index.d.ts +1 -1
- package/lib/highlight/index.js +2 -2
- package/lib/image/index.d.ts +2 -2
- package/lib/image/index.js +3 -3
- package/lib/image/src/ImagePreview.js +3 -3
- package/lib/image/src/icons.d.ts +3 -3
- package/lib/image/src/icons.js +15 -7
- package/lib/image/src/styles/index.cssr.js +1 -1
- package/lib/infinite-scroll/index.d.ts +1 -1
- package/lib/infinite-scroll/index.js +2 -2
- package/lib/input/index.d.ts +3 -3
- package/lib/input/index.js +4 -4
- package/lib/input-number/index.d.ts +1 -1
- package/lib/input-number/index.js +2 -2
- package/lib/layout/index.d.ts +6 -6
- package/lib/layout/index.js +6 -6
- package/lib/legacy-transfer/index.d.ts +1 -1
- package/lib/legacy-transfer/index.js +2 -2
- package/lib/list/index.d.ts +1 -1
- package/lib/list/index.js +2 -2
- package/lib/loading-bar/index.d.ts +1 -1
- package/lib/loading-bar/index.js +2 -2
- package/lib/log/index.d.ts +1 -1
- package/lib/log/index.js +2 -2
- package/lib/marquee/index.d.ts +1 -1
- package/lib/marquee/index.js +2 -2
- package/lib/mention/index.d.ts +1 -1
- package/lib/mention/index.js +2 -2
- package/lib/menu/index.d.ts +1 -1
- package/lib/menu/index.js +2 -2
- package/lib/message/index.d.ts +1 -1
- package/lib/message/index.js +2 -2
- package/lib/modal/index.d.ts +1 -1
- package/lib/modal/index.js +2 -2
- package/lib/modal/src/styles/index.cssr.js +1 -1
- package/lib/popover/src/Popover.js +7 -1
- package/lib/rate/src/Rate.js +1 -1
- package/lib/rate/src/StarIcon.d.ts +1 -1
- package/lib/rate/src/StarIcon.js +1 -1
- package/lib/result/src/403.d.ts +1 -2
- package/lib/result/src/403.js +6 -3
- package/lib/result/src/404.d.ts +1 -2
- package/lib/result/src/404.js +10 -7
- package/lib/result/src/418.d.ts +1 -2
- package/lib/result/src/418.js +10 -7
- package/lib/result/src/500.d.ts +1 -2
- package/lib/result/src/500.js +7 -4
- package/lib/result/src/Result.js +8 -8
- package/lib/styles.d.ts +5 -5
- package/lib/styles.js +29 -29
- package/lib/theme-editor/src/ThemeEditor.js +8 -6
- package/lib/themes/dark.js +28 -28
- package/lib/themes/light.js +28 -28
- package/lib/upload/src/UploadFile.js +1 -1
- package/lib/upload/src/icons.d.ts +2 -2
- package/lib/upload/src/icons.js +3 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +4 -4
- package/volar.d.ts +1 -1
- package/web-types.json +7 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from 'vue';
|
|
2
2
|
import { replaceable } from "./replaceable.mjs";
|
|
3
|
-
export default replaceable('rotateClockwise', h("svg", {
|
|
3
|
+
export default replaceable('rotateClockwise', () => h("svg", {
|
|
4
4
|
viewBox: "0 0 20 20",
|
|
5
5
|
fill: "none",
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from 'vue';
|
|
2
2
|
import { replaceable } from "./replaceable.mjs";
|
|
3
|
-
export default replaceable('rotateClockwise', h("svg", {
|
|
3
|
+
export default replaceable('rotateClockwise', () => h("svg", {
|
|
4
4
|
viewBox: "0 0 20 20",
|
|
5
5
|
fill: "none",
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg"
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import type { VNode } from 'vue';
|
|
1
2
|
import type { GlobalIconConfig } from '../../config-provider/src/internal-interface';
|
|
2
|
-
export declare function replaceable(name: keyof GlobalIconConfig, icon:
|
|
3
|
+
export declare function replaceable(name: keyof GlobalIconConfig, icon: () => VNode): import("vue").DefineComponent<{}, () => import("vue").VNodeChild, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { upperFirst } from 'lodash-es';
|
|
2
|
-
import { defineComponent, inject } from 'vue';
|
|
2
|
+
import { defineComponent, h, inject } from 'vue';
|
|
3
3
|
import { configProviderInjectionKey } from "../../config-provider/src/context.mjs";
|
|
4
4
|
export function replaceable(name, icon) {
|
|
5
|
+
const IconComponent = defineComponent({
|
|
6
|
+
render() {
|
|
7
|
+
return icon();
|
|
8
|
+
}
|
|
9
|
+
});
|
|
5
10
|
return defineComponent({
|
|
6
11
|
name: upperFirst(name),
|
|
7
12
|
setup() {
|
|
@@ -10,7 +15,7 @@ export function replaceable(name, icon) {
|
|
|
10
15
|
return () => {
|
|
11
16
|
var _a;
|
|
12
17
|
const iconOverride = (_a = mergedIconsRef === null || mergedIconsRef === void 0 ? void 0 : mergedIconsRef.value) === null || _a === void 0 ? void 0 : _a[name];
|
|
13
|
-
return iconOverride ? iconOverride() :
|
|
18
|
+
return iconOverride ? iconOverride() : h(IconComponent, null);
|
|
14
19
|
};
|
|
15
20
|
}
|
|
16
21
|
});
|
|
@@ -226,10 +226,22 @@ declare const Scrollbar: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
226
226
|
'--n-scrollbar-border-radius': string;
|
|
227
227
|
'--n-scrollbar-width': string;
|
|
228
228
|
'--n-scrollbar-height': string;
|
|
229
|
-
'--n-scrollbar-rail-
|
|
230
|
-
'--n-scrollbar-rail-
|
|
231
|
-
'--n-scrollbar-rail-
|
|
232
|
-
'--n-scrollbar-rail-
|
|
229
|
+
'--n-scrollbar-rail-top-horizontal-top': string;
|
|
230
|
+
'--n-scrollbar-rail-right-horizontal-top': string;
|
|
231
|
+
'--n-scrollbar-rail-bottom-horizontal-top': string;
|
|
232
|
+
'--n-scrollbar-rail-left-horizontal-top': string;
|
|
233
|
+
'--n-scrollbar-rail-top-horizontal-bottom': string;
|
|
234
|
+
'--n-scrollbar-rail-right-horizontal-bottom': string;
|
|
235
|
+
'--n-scrollbar-rail-bottom-horizontal-bottom': string;
|
|
236
|
+
'--n-scrollbar-rail-left-horizontal-bottom': string;
|
|
237
|
+
'--n-scrollbar-rail-top-vertical-right': string;
|
|
238
|
+
'--n-scrollbar-rail-right-vertical-right': string;
|
|
239
|
+
'--n-scrollbar-rail-bottom-vertical-right': string;
|
|
240
|
+
'--n-scrollbar-rail-left-vertical-right': string;
|
|
241
|
+
'--n-scrollbar-rail-top-vertical-left': string;
|
|
242
|
+
'--n-scrollbar-rail-right-vertical-left': string;
|
|
243
|
+
'--n-scrollbar-rail-bottom-vertical-left': string;
|
|
244
|
+
'--n-scrollbar-rail-left-vertical-left': string;
|
|
233
245
|
'--n-scrollbar-rail-color': string;
|
|
234
246
|
}> | undefined;
|
|
235
247
|
themeClass: import("vue").Ref<string, string> | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { off, on } from 'evtd';
|
|
2
|
-
import { depx, getPreciseEventTarget } from 'seemly';
|
|
2
|
+
import { depx, getPadding, getPreciseEventTarget } from 'seemly';
|
|
3
3
|
import { useIsIos } from 'vooks';
|
|
4
4
|
import { computed, defineComponent, Fragment, h, mergeProps, onBeforeUnmount, onMounted, ref, Transition, watchEffect } from 'vue';
|
|
5
5
|
import { VResizeObserver } from 'vueuc';
|
|
@@ -613,6 +613,30 @@ const Scrollbar = defineComponent({
|
|
|
613
613
|
railColor
|
|
614
614
|
}
|
|
615
615
|
} = themeRef.value;
|
|
616
|
+
const {
|
|
617
|
+
top: railTopHorizontalTop,
|
|
618
|
+
right: railRightHorizontalTop,
|
|
619
|
+
bottom: railBottomHorizontalTop,
|
|
620
|
+
left: railLeftHorizontalTop
|
|
621
|
+
} = getPadding(railInsetHorizontalTop);
|
|
622
|
+
const {
|
|
623
|
+
top: railTopHorizontalBottom,
|
|
624
|
+
right: railRightHorizontalBottom,
|
|
625
|
+
bottom: railBottomHorizontalBottom,
|
|
626
|
+
left: railLeftHorizontalBottom
|
|
627
|
+
} = getPadding(railInsetHorizontalBottom);
|
|
628
|
+
const {
|
|
629
|
+
top: railTopVerticalRight,
|
|
630
|
+
right: railRightVerticalRight,
|
|
631
|
+
bottom: railBottomVerticalRight,
|
|
632
|
+
left: railLeftVerticalRight
|
|
633
|
+
} = getPadding((rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? rtlInset(railInsetVerticalRight) : railInsetVerticalRight);
|
|
634
|
+
const {
|
|
635
|
+
top: railTopVerticalLeft,
|
|
636
|
+
right: railRightVerticalLeft,
|
|
637
|
+
bottom: railBottomVerticalLeft,
|
|
638
|
+
left: railLeftVerticalLeft
|
|
639
|
+
} = getPadding((rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? rtlInset(railInsetVerticalLeft) : railInsetVerticalLeft);
|
|
616
640
|
return {
|
|
617
641
|
'--n-scrollbar-bezier': cubicBezierEaseInOut,
|
|
618
642
|
'--n-scrollbar-color': color,
|
|
@@ -620,10 +644,22 @@ const Scrollbar = defineComponent({
|
|
|
620
644
|
'--n-scrollbar-border-radius': borderRadius,
|
|
621
645
|
'--n-scrollbar-width': width,
|
|
622
646
|
'--n-scrollbar-height': height,
|
|
623
|
-
'--n-scrollbar-rail-
|
|
624
|
-
'--n-scrollbar-rail-
|
|
625
|
-
'--n-scrollbar-rail-
|
|
626
|
-
'--n-scrollbar-rail-
|
|
647
|
+
'--n-scrollbar-rail-top-horizontal-top': railTopHorizontalTop,
|
|
648
|
+
'--n-scrollbar-rail-right-horizontal-top': railRightHorizontalTop,
|
|
649
|
+
'--n-scrollbar-rail-bottom-horizontal-top': railBottomHorizontalTop,
|
|
650
|
+
'--n-scrollbar-rail-left-horizontal-top': railLeftHorizontalTop,
|
|
651
|
+
'--n-scrollbar-rail-top-horizontal-bottom': railTopHorizontalBottom,
|
|
652
|
+
'--n-scrollbar-rail-right-horizontal-bottom': railRightHorizontalBottom,
|
|
653
|
+
'--n-scrollbar-rail-bottom-horizontal-bottom': railBottomHorizontalBottom,
|
|
654
|
+
'--n-scrollbar-rail-left-horizontal-bottom': railLeftHorizontalBottom,
|
|
655
|
+
'--n-scrollbar-rail-top-vertical-right': railTopVerticalRight,
|
|
656
|
+
'--n-scrollbar-rail-right-vertical-right': railRightVerticalRight,
|
|
657
|
+
'--n-scrollbar-rail-bottom-vertical-right': railBottomVerticalRight,
|
|
658
|
+
'--n-scrollbar-rail-left-vertical-right': railLeftVerticalRight,
|
|
659
|
+
'--n-scrollbar-rail-top-vertical-left': railTopVerticalLeft,
|
|
660
|
+
'--n-scrollbar-rail-right-vertical-left': railRightVerticalLeft,
|
|
661
|
+
'--n-scrollbar-rail-bottom-vertical-left': railBottomVerticalLeft,
|
|
662
|
+
'--n-scrollbar-rail-left-vertical-left': railLeftVerticalLeft,
|
|
627
663
|
'--n-scrollbar-rail-color': railColor
|
|
628
664
|
};
|
|
629
665
|
});
|
|
@@ -45,9 +45,15 @@ cB('scrollbar-content', `
|
|
|
45
45
|
border-radius: var(--n-scrollbar-border-radius);
|
|
46
46
|
right: 0;
|
|
47
47
|
`)])]), cM('horizontal--top', `
|
|
48
|
-
|
|
48
|
+
top: var(--n-scrollbar-rail-top-horizontal-top);
|
|
49
|
+
right: var(--n-scrollbar-rail-right-horizontal-top);
|
|
50
|
+
bottom: var(--n-scrollbar-rail-bottom-horizontal-top);
|
|
51
|
+
left: var(--n-scrollbar-rail-left-horizontal-top);
|
|
49
52
|
`), cM('horizontal--bottom', `
|
|
50
|
-
|
|
53
|
+
top: var(--n-scrollbar-rail-top-horizontal-bottom);
|
|
54
|
+
right: var(--n-scrollbar-rail-right-horizontal-bottom);
|
|
55
|
+
bottom: var(--n-scrollbar-rail-bottom-horizontal-bottom);
|
|
56
|
+
left: var(--n-scrollbar-rail-left-horizontal-bottom);
|
|
51
57
|
`), cM('vertical', `
|
|
52
58
|
width: var(--n-scrollbar-width);
|
|
53
59
|
`, [c('>', [cE('scrollbar', `
|
|
@@ -55,9 +61,15 @@ cB('scrollbar-content', `
|
|
|
55
61
|
border-radius: var(--n-scrollbar-border-radius);
|
|
56
62
|
bottom: 0;
|
|
57
63
|
`)])]), cM('vertical--left', `
|
|
58
|
-
|
|
64
|
+
top: var(--n-scrollbar-rail-top-vertical-left);
|
|
65
|
+
right: var(--n-scrollbar-rail-right-vertical-left);
|
|
66
|
+
bottom: var(--n-scrollbar-rail-bottom-vertical-left);
|
|
67
|
+
left: var(--n-scrollbar-rail-left-vertical-left);
|
|
59
68
|
`), cM('vertical--right', `
|
|
60
|
-
|
|
69
|
+
top: var(--n-scrollbar-rail-top-vertical-right);
|
|
70
|
+
right: var(--n-scrollbar-rail-right-vertical-right);
|
|
71
|
+
bottom: var(--n-scrollbar-rail-bottom-vertical-right);
|
|
72
|
+
left: var(--n-scrollbar-rail-left-vertical-right);
|
|
61
73
|
`), cM('disabled', [c('>', [cE('scrollbar', 'pointer-events: none;')])]), c('>', [cE('scrollbar', `
|
|
62
74
|
z-index: 1;
|
|
63
75
|
position: absolute;
|
package/es/_mixins/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as useConfig
|
|
1
|
+
export { defaultClsPrefix, default as useConfig } from './use-config';
|
|
2
2
|
export { useThemeClass } from './use-css-vars-class';
|
|
3
3
|
export { default as useFormItem } from './use-form-item';
|
|
4
4
|
export { default as useHljs } from './use-hljs';
|
package/es/_mixins/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as useConfig
|
|
1
|
+
export { defaultClsPrefix, default as useConfig } from "./use-config.mjs";
|
|
2
2
|
export { useThemeClass } from "./use-css-vars-class.mjs";
|
|
3
3
|
export { default as useFormItem } from "./use-form-item.mjs";
|
|
4
4
|
export { default as useHljs } from "./use-hljs.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { onBeforeUnmount, onMounted } from 'vue';
|
|
1
|
+
import { onBeforeUnmount, onMounted, watch } from 'vue';
|
|
2
2
|
import { resizeObserverManager } from 'vueuc';
|
|
3
3
|
export function useOnResize(elRef, onResize) {
|
|
4
4
|
// it needn't be reactive since it's for internal usage
|
|
@@ -11,6 +11,14 @@ export function useOnResize(elRef, onResize) {
|
|
|
11
11
|
resizeObserverManager.registerHandler(el, onResize);
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
|
+
// avoid memory leak
|
|
15
|
+
watch(elRef, (_, oldEl) => {
|
|
16
|
+
if (oldEl) {
|
|
17
|
+
resizeObserverManager.unregisterHandler(oldEl);
|
|
18
|
+
}
|
|
19
|
+
}, {
|
|
20
|
+
deep: false
|
|
21
|
+
});
|
|
14
22
|
onBeforeUnmount(() => {
|
|
15
23
|
const {
|
|
16
24
|
value: el
|
|
@@ -6,7 +6,7 @@ import { NBaseIcon } from "../../_internal/index.mjs";
|
|
|
6
6
|
import { useConfig, useTheme, useThemeClass } from "../../_mixins/index.mjs";
|
|
7
7
|
import { formatLength, isDocument, lockHtmlScrollRightCompensationRef, resolveSlot, warn, warnOnce } from "../../_utils/index.mjs";
|
|
8
8
|
import { backTopLight } from "../styles/index.mjs";
|
|
9
|
-
import
|
|
9
|
+
import renderBackTopIcon from "./BackTopIcon.mjs";
|
|
10
10
|
import style from "./styles/index.cssr.mjs";
|
|
11
11
|
export const backTopProps = Object.assign(Object.assign({}, useTheme.props), {
|
|
12
12
|
show: {
|
|
@@ -236,7 +236,7 @@ export default defineComponent({
|
|
|
236
236
|
}), resolveSlot(this.$slots.default, () => [h(NBaseIcon, {
|
|
237
237
|
clsPrefix: mergedClsPrefix
|
|
238
238
|
}, {
|
|
239
|
-
default:
|
|
239
|
+
default: renderBackTopIcon
|
|
240
240
|
})])) : null;
|
|
241
241
|
}
|
|
242
242
|
})
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: JSX.Element;
|
|
1
|
+
declare const _default: () => JSX.Element;
|
|
2
2
|
export default _default;
|
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
import { defineComponent, h } from 'vue';
|
|
2
2
|
import { useConfig } from "../../_mixins/index.mjs";
|
|
3
3
|
import { useCarouselContext } from "./CarouselContext.mjs";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
4
|
+
function renderBackwardIcon() {
|
|
5
|
+
return h("svg", {
|
|
6
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
+
viewBox: "0 0 16 16"
|
|
8
|
+
}, h("g", {
|
|
9
|
+
fill: "none"
|
|
10
|
+
}, h("path", {
|
|
11
|
+
d: "M10.26 3.2a.75.75 0 0 1 .04 1.06L6.773 8l3.527 3.74a.75.75 0 1 1-1.1 1.02l-4-4.25a.75.75 0 0 1 0-1.02l4-4.25a.75.75 0 0 1 1.06-.04z",
|
|
12
|
+
fill: "currentColor"
|
|
13
|
+
})));
|
|
14
|
+
}
|
|
15
|
+
function renderForwardIcon() {
|
|
16
|
+
return h("svg", {
|
|
17
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18
|
+
viewBox: "0 0 16 16"
|
|
19
|
+
}, h("g", {
|
|
20
|
+
fill: "none"
|
|
21
|
+
}, h("path", {
|
|
22
|
+
d: "M5.74 3.2a.75.75 0 0 0-.04 1.06L9.227 8L5.7 11.74a.75.75 0 1 0 1.1 1.02l4-4.25a.75.75 0 0 0 0-1.02l-4-4.25a.75.75 0 0 0-1.06-.04z",
|
|
23
|
+
fill: "currentColor"
|
|
24
|
+
})));
|
|
25
|
+
}
|
|
22
26
|
export default defineComponent({
|
|
23
27
|
name: 'CarouselArrow',
|
|
24
28
|
setup(props) {
|
|
@@ -51,10 +55,10 @@ export default defineComponent({
|
|
|
51
55
|
class: [`${mergedClsPrefix}-carousel__arrow`, this.isPrevDisabled() && `${mergedClsPrefix}-carousel__arrow--disabled`],
|
|
52
56
|
role: "button",
|
|
53
57
|
onClick: this.prev
|
|
54
|
-
},
|
|
58
|
+
}, renderBackwardIcon()), h("div", {
|
|
55
59
|
class: [`${mergedClsPrefix}-carousel__arrow`, this.isNextDisabled() && `${mergedClsPrefix}-carousel__arrow--disabled`],
|
|
56
60
|
role: "button",
|
|
57
61
|
onClick: this.next
|
|
58
|
-
},
|
|
62
|
+
}, renderForwardIcon()));
|
|
59
63
|
}
|
|
60
64
|
});
|
|
@@ -8,8 +8,8 @@ import { useRtl } from "../../_mixins/use-rtl.mjs";
|
|
|
8
8
|
import { call, createKey, resolveWrappedSlot, warnOnce } from "../../_utils/index.mjs";
|
|
9
9
|
import { checkboxLight } from "../styles/index.mjs";
|
|
10
10
|
import { checkboxGroupInjectionKey } from "./CheckboxGroup.mjs";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
11
|
+
import renderCheckMark from "./CheckMark.mjs";
|
|
12
|
+
import renderLineMark from "./LineMark.mjs";
|
|
13
13
|
import style from "./styles/index.cssr.mjs";
|
|
14
14
|
export const checkboxProps = Object.assign(Object.assign({}, useTheme.props), {
|
|
15
15
|
size: String,
|
|
@@ -326,10 +326,10 @@ export default defineComponent({
|
|
|
326
326
|
default: () => this.indeterminate ? h("div", {
|
|
327
327
|
key: "indeterminate",
|
|
328
328
|
class: `${mergedClsPrefix}-checkbox-icon`
|
|
329
|
-
},
|
|
329
|
+
}, renderLineMark()) : h("div", {
|
|
330
330
|
key: "check",
|
|
331
331
|
class: `${mergedClsPrefix}-checkbox-icon`
|
|
332
|
-
},
|
|
332
|
+
}, renderCheckMark())
|
|
333
333
|
}), h("div", {
|
|
334
334
|
class: `${mergedClsPrefix}-checkbox-box__border`
|
|
335
335
|
}))), labelNode);
|
|
@@ -7,22 +7,22 @@ import type { Hljs } from '../../_mixins';
|
|
|
7
7
|
import type { AlertTheme } from '../../alert/styles';
|
|
8
8
|
import type { AnchorTheme } from '../../anchor/styles';
|
|
9
9
|
import type { AutoCompleteTheme } from '../../auto-complete/styles';
|
|
10
|
-
import type { AvatarTheme } from '../../avatar/styles';
|
|
11
10
|
import type { AvatarGroupTheme } from '../../avatar-group/styles';
|
|
11
|
+
import type { AvatarTheme } from '../../avatar/styles';
|
|
12
12
|
import type { BackTopTheme } from '../../back-top/styles';
|
|
13
13
|
import type { BadgeTheme } from '../../badge/styles';
|
|
14
14
|
import type { BreadcrumbTheme } from '../../breadcrumb/styles';
|
|
15
|
+
import type { ButtonGroupTheme } from '../../button-group/styles/light';
|
|
15
16
|
import type { Size as ButtonSize } from '../../button/src/interface';
|
|
16
17
|
import type { ButtonTheme } from '../../button/styles';
|
|
17
|
-
import type { ButtonGroupTheme } from '../../button-group/styles/light';
|
|
18
18
|
import type { CalendarTheme } from '../../calendar/styles';
|
|
19
19
|
import type { CardTheme } from '../../card/styles';
|
|
20
20
|
import type { CarouselTheme } from '../../carousel/styles';
|
|
21
21
|
import type { CascaderTheme } from '../../cascader/styles';
|
|
22
22
|
import type { CheckboxTheme } from '../../checkbox/styles';
|
|
23
23
|
import type { CodeTheme } from '../../code/styles';
|
|
24
|
-
import type { CollapseTheme } from '../../collapse/styles';
|
|
25
24
|
import type { CollapseTransitionTheme } from '../../collapse-transition/styles';
|
|
25
|
+
import type { CollapseTheme } from '../../collapse/styles';
|
|
26
26
|
import type { ColorPickerTheme } from '../../color-picker/styles';
|
|
27
27
|
import type { DataTableRenderFilter, DataTableRenderSorter } from '../../data-table';
|
|
28
28
|
import type { DataTableTheme } from '../../data-table/styles';
|
|
@@ -41,16 +41,16 @@ import type { EmptyProps } from '../../empty';
|
|
|
41
41
|
import type { EmptyTheme } from '../../empty/styles';
|
|
42
42
|
import type { EquationTheme } from '../../equation/styles';
|
|
43
43
|
import type { FlexTheme } from '../../flex/styles';
|
|
44
|
-
import type { FloatButtonTheme } from '../../float-button/styles';
|
|
45
44
|
import type { FloatButtonGroupTheme } from '../../float-button-group/styles';
|
|
45
|
+
import type { FloatButtonTheme } from '../../float-button/styles';
|
|
46
46
|
import type { FormTheme } from '../../form/styles';
|
|
47
47
|
import type { GradientTextTheme } from '../../gradient-text/styles';
|
|
48
|
-
import type { IconTheme } from '../../icon/styles';
|
|
49
48
|
import type { IconWrapperTheme } from '../../icon-wrapper/styles';
|
|
49
|
+
import type { IconTheme } from '../../icon/styles';
|
|
50
50
|
import type { ImageTheme } from '../../image/styles';
|
|
51
|
+
import type { InputNumberTheme } from '../../input-number/styles';
|
|
51
52
|
import type { Size as InputSize } from '../../input/src/interface';
|
|
52
53
|
import type { InputTheme } from '../../input/styles';
|
|
53
|
-
import type { InputNumberTheme } from '../../input-number/styles';
|
|
54
54
|
import type { LayoutTheme } from '../../layout/styles';
|
|
55
55
|
import type { RowTheme } from '../../legacy-grid/styles';
|
|
56
56
|
import type { LegacyTransferTheme } from '../../legacy-transfer/styles';
|
|
@@ -93,8 +93,8 @@ import type { TimePickerTheme } from '../../time-picker/styles';
|
|
|
93
93
|
import type { TimelineTheme } from '../../timeline/styles';
|
|
94
94
|
import type { TooltipTheme } from '../../tooltip/styles';
|
|
95
95
|
import type { TransferTheme } from '../../transfer/styles';
|
|
96
|
-
import type { TreeTheme } from '../../tree/styles';
|
|
97
96
|
import type { TreeSelectTheme } from '../../tree-select/styles';
|
|
97
|
+
import type { TreeTheme } from '../../tree/styles';
|
|
98
98
|
import type { TypographyTheme } from '../../typography/styles';
|
|
99
99
|
import type { UploadTheme } from '../../upload/styles';
|
|
100
100
|
import type { WatermarkTheme } from '../../watermark/styles';
|
package/es/data-table/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as NDataTable } from './src/DataTable';
|
|
2
2
|
export { dataTableProps } from './src/interface';
|
|
3
|
-
export type { ColumnKey as DataTableColumnKey, CreateRowClassName as DataTableCreateRowClassName, CreateRowKey as DataTableCreateRowKey, CreateRowProps as DataTableCreateRowProps, CreateSummary as DataTableCreateSummary,
|
|
3
|
+
export type { TableBaseColumn as DataTableBaseColumn, TableColumn as DataTableColumn, TableColumnGroup as DataTableColumnGroup, ColumnKey as DataTableColumnKey, TableColumns as DataTableColumns, CreateRowClassName as DataTableCreateRowClassName, CreateRowKey as DataTableCreateRowKey, CreateRowProps as DataTableCreateRowProps, CreateSummary as DataTableCreateSummary, TableExpandColumn as DataTableExpandColumn, FilterState as DataTableFilterState, DataTableInst, DataTableProps, RenderFilter as DataTableRenderFilter, RenderFilterIcon as DataTableRenderFilterIcon, RenderSorter as DataTableRenderSorter, RenderSorterIcon as DataTableRenderSorterIcon, RowData as DataTableRowData, RowKey as DataTableRowKey, TableSelectionColumn as DataTableSelectionColumn, SortState as DataTableSortState } from './src/interface';
|
|
4
4
|
export * from './src/publicTypes';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as NDescriptions
|
|
1
|
+
export { descriptionsProps, default as NDescriptions } from './src/Descriptions';
|
|
2
2
|
export type { DescriptionProps, DescriptionsProps } from './src/Descriptions';
|
|
3
|
-
export { default as NDescriptionsItem
|
|
3
|
+
export { descriptionsItemProps, default as NDescriptionsItem } from './src/DescriptionsItem';
|
|
4
4
|
export type { DescriptionItemProps } from './src/DescriptionsItem';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as NDescriptions
|
|
2
|
-
export { default as NDescriptionsItem
|
|
1
|
+
export { descriptionsProps, default as NDescriptions } from "./src/Descriptions.mjs";
|
|
2
|
+
export { descriptionsItemProps, default as NDescriptionsItem } from "./src/DescriptionsItem.mjs";
|
package/es/divider/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as NDivider
|
|
1
|
+
export { dividerProps, default as NDivider } from './src/Divider';
|
|
2
2
|
export type { DividerProps } from './src/Divider';
|
package/es/divider/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as NDivider
|
|
1
|
+
export { dividerProps, default as NDivider } from "./src/Divider.mjs";
|
package/es/drawer/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default as NDrawer
|
|
1
|
+
export { drawerProps, default as NDrawer } from './src/Drawer';
|
|
2
2
|
export type { DrawerProps } from './src/Drawer';
|
|
3
3
|
export type { Placement as DrawerPlacement } from './src/DrawerBodyWrapper';
|
|
4
|
-
export { default as NDrawerContent
|
|
4
|
+
export { drawerContentProps, default as NDrawerContent } from './src/DrawerContent';
|
|
5
5
|
export type { DrawerContentProps } from './src/DrawerContent';
|