naive-ui 2.25.1 → 2.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/_internal/select-menu/src/SelectMenu.d.ts +6 -1
- package/es/_internal/select-menu/src/SelectMenu.js +17 -8
- package/es/_internal/selection/src/Selection.d.ts +31 -26
- package/es/_internal/selection/src/Selection.js +78 -80
- package/es/_internal/selection/styles/dark.js +3 -3
- package/es/_internal/selection/styles/light.d.ts +6 -6
- package/es/_internal/selection/styles/light.js +3 -3
- package/es/_mixins/index.d.ts +1 -1
- package/es/_mixins/index.js +1 -1
- package/es/_mixins/use-css-vars-class.d.ts +9 -2
- package/es/_mixins/use-css-vars-class.js +29 -13
- package/es/_mixins/use-form-item.d.ts +1 -1
- package/es/_utils/css/color-to-class.d.ts +1 -0
- package/es/_utils/css/color-to-class.js +3 -0
- package/es/_utils/css/format-length.d.ts +2 -2
- package/es/_utils/css/format-length.js +1 -2
- package/es/_utils/css/index.d.ts +2 -1
- package/es/_utils/css/index.js +2 -1
- package/es/_utils/index.d.ts +1 -1
- package/es/_utils/index.js +1 -1
- package/es/_utils/vue/resolve-slot.js +0 -1
- package/es/alert/src/Alert.d.ts +4 -4
- package/es/auto-complete/src/AutoComplete.d.ts +1 -1
- package/es/badge/src/Badge.d.ts +4 -4
- package/es/button/src/Button.d.ts +3 -2
- package/es/button/src/Button.js +13 -24
- package/es/button/styles/index.d.ts +1 -1
- package/es/button/styles/index.js +1 -1
- package/es/button/styles/rtl.d.ts +2 -5
- package/es/button/styles/rtl.js +1 -1
- package/es/card/src/Card.d.ts +3 -1
- package/es/card/src/Card.js +41 -38
- package/es/card/styles/index.d.ts +1 -1
- package/es/card/styles/index.js +1 -1
- package/es/card/styles/rtl.d.ts +2 -5
- package/es/card/styles/rtl.js +1 -1
- package/es/cascader/src/Cascader.d.ts +30 -30
- package/es/cascader/src/CascaderMenu.d.ts +3 -3
- package/es/cascader/src/CascaderOption.d.ts +3 -3
- package/es/cascader/src/CascaderSelectMenu.d.ts +3 -3
- package/es/cascader/src/CascaderSubmenu.d.ts +3 -3
- package/es/cascader/styles/light.d.ts +3 -3
- package/es/checkbox/src/styles/index.cssr.js +12 -12
- package/es/data-table/src/DataTable.d.ts +34 -34
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +6 -6
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +6 -6
- package/es/data-table/src/TableParts/Body.d.ts +6 -6
- package/es/data-table/src/TableParts/Cell.d.ts +12 -12
- package/es/data-table/src/TableParts/Header.d.ts +6 -6
- package/es/data-table/styles/light.d.ts +3 -3
- package/es/descriptions/src/Descriptions.d.ts +1 -1
- package/es/dialog/src/Dialog.d.ts +4 -4
- package/es/dialog/src/DialogEnvironment.d.ts +5 -5
- package/es/dialog/src/DialogProvider.d.ts +2 -2
- package/es/dialog/src/dialogProps.d.ts +2 -2
- package/es/dynamic-tags/src/DynamicTags.d.ts +4 -4
- package/es/form/src/FormItem.d.ts +4 -4
- package/es/form/src/FormItemCol.d.ts +3 -3
- package/es/form/src/FormItemGridItem.d.ts +5 -5
- package/es/form/src/FormItemRow.d.ts +3 -3
- package/es/form/src/utils.d.ts +1 -1
- package/es/gradient-text/src/GradientText.d.ts +5 -5
- package/es/icon-wrapper/src/IconWrapper.js +7 -5
- package/es/image/src/Image.d.ts +1 -1
- package/es/input/src/Input.d.ts +1 -1
- package/es/input-number/src/InputNumber.d.ts +1 -1
- package/es/locales/common/eo.d.ts +109 -0
- package/es/locales/common/eo.js +109 -0
- package/es/locales/common/plPL.d.ts +3 -0
- package/es/locales/common/plPL.js +109 -0
- package/es/locales/date/eo.d.ts +3 -0
- package/es/locales/date/eo.js +6 -0
- package/es/locales/date/plPL.d.ts +3 -0
- package/es/locales/date/plPL.js +6 -0
- package/es/locales/index.d.ts +4 -0
- package/es/locales/index.js +4 -0
- package/es/mention/src/Mention.d.ts +1 -1
- package/es/menu/src/Menu.d.ts +1 -1
- package/es/modal/src/BodyWrapper.d.ts +6 -6
- package/es/modal/src/Modal.d.ts +8 -8
- package/es/modal/src/presetProps.d.ts +2 -2
- package/es/notification/src/Notification.d.ts +4 -4
- package/es/notification/src/NotificationEnvironment.d.ts +4 -4
- package/es/notification/src/NotificationProvider.d.ts +1 -1
- package/es/pagination/src/Pagination.d.ts +33 -33
- package/es/pagination/styles/light.d.ts +3 -3
- package/es/progress/src/Circle.d.ts +19 -3
- package/es/progress/src/Circle.js +41 -22
- package/es/progress/src/Progress.d.ts +14 -5
- package/es/progress/src/Progress.js +43 -29
- package/es/progress/src/styles/index.cssr.js +1 -1
- package/es/result/src/Result.d.ts +4 -4
- package/es/select/src/Select.d.ts +45 -31
- package/es/select/src/Select.js +13 -8
- package/es/select/styles/light.d.ts +3 -3
- package/es/tag/src/Tag.d.ts +7 -5
- package/es/tag/src/Tag.js +60 -40
- package/es/tag/src/common-props.d.ts +1 -1
- package/es/tag/src/styles/index.cssr.js +1 -1
- package/es/tag/styles/index.d.ts +1 -1
- package/es/tag/styles/index.js +1 -1
- package/es/tag/styles/rtl.d.ts +2 -5
- package/es/tag/styles/rtl.js +1 -1
- package/es/timeline/src/TimelineItem.d.ts +4 -4
- package/es/tree/src/utils.js +1 -1
- package/es/tree-select/src/TreeSelect.d.ts +30 -30
- package/es/tree-select/styles/light.d.ts +3 -3
- package/es/typography/src/create-header.d.ts +4 -4
- package/es/typography/src/headers.d.ts +18 -18
- package/es/upload/src/UploadFile.d.ts +1 -1
- package/es/upload/src/UploadProgress.d.ts +2 -2
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +6 -1
- package/lib/_internal/select-menu/src/SelectMenu.js +16 -7
- package/lib/_internal/selection/src/Selection.d.ts +31 -26
- package/lib/_internal/selection/src/Selection.js +77 -79
- package/lib/_internal/selection/styles/dark.js +3 -3
- package/lib/_internal/selection/styles/light.d.ts +6 -6
- package/lib/_internal/selection/styles/light.js +3 -3
- package/lib/_mixins/index.d.ts +1 -1
- package/lib/_mixins/index.js +3 -2
- package/lib/_mixins/use-css-vars-class.d.ts +9 -2
- package/lib/_mixins/use-css-vars-class.js +31 -15
- package/lib/_mixins/use-form-item.d.ts +1 -1
- package/lib/_utils/css/color-to-class.d.ts +1 -0
- package/lib/_utils/css/color-to-class.js +7 -0
- package/lib/_utils/css/format-length.d.ts +2 -2
- package/lib/_utils/css/format-length.js +2 -1
- package/lib/_utils/css/index.d.ts +2 -1
- package/lib/_utils/css/index.js +4 -5
- package/lib/_utils/index.d.ts +1 -1
- package/lib/_utils/index.js +2 -1
- package/lib/_utils/vue/resolve-slot.js +0 -1
- package/lib/alert/src/Alert.d.ts +4 -4
- package/lib/auto-complete/src/AutoComplete.d.ts +1 -1
- package/lib/badge/src/Badge.d.ts +4 -4
- package/lib/button/src/Button.d.ts +3 -2
- package/lib/button/src/Button.js +11 -22
- package/lib/button/styles/index.d.ts +1 -1
- package/lib/button/styles/index.js +1 -1
- package/lib/button/styles/rtl.d.ts +2 -5
- package/lib/button/styles/rtl.js +2 -1
- package/lib/card/src/Card.d.ts +3 -1
- package/lib/card/src/Card.js +40 -37
- package/lib/card/styles/index.d.ts +1 -1
- package/lib/card/styles/index.js +1 -1
- package/lib/card/styles/rtl.d.ts +2 -5
- package/lib/card/styles/rtl.js +2 -1
- package/lib/cascader/src/Cascader.d.ts +30 -30
- package/lib/cascader/src/CascaderMenu.d.ts +3 -3
- package/lib/cascader/src/CascaderOption.d.ts +3 -3
- package/lib/cascader/src/CascaderSelectMenu.d.ts +3 -3
- package/lib/cascader/src/CascaderSubmenu.d.ts +3 -3
- package/lib/cascader/styles/light.d.ts +3 -3
- package/lib/checkbox/src/styles/index.cssr.js +12 -12
- package/lib/data-table/src/DataTable.d.ts +34 -34
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +6 -6
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +6 -6
- package/lib/data-table/src/TableParts/Body.d.ts +6 -6
- package/lib/data-table/src/TableParts/Cell.d.ts +12 -12
- package/lib/data-table/src/TableParts/Header.d.ts +6 -6
- package/lib/data-table/styles/light.d.ts +3 -3
- package/lib/descriptions/src/Descriptions.d.ts +1 -1
- package/lib/dialog/src/Dialog.d.ts +4 -4
- package/lib/dialog/src/DialogEnvironment.d.ts +5 -5
- package/lib/dialog/src/DialogProvider.d.ts +2 -2
- package/lib/dialog/src/dialogProps.d.ts +2 -2
- package/lib/dynamic-tags/src/DynamicTags.d.ts +4 -4
- package/lib/form/src/FormItem.d.ts +4 -4
- package/lib/form/src/FormItemCol.d.ts +3 -3
- package/lib/form/src/FormItemGridItem.d.ts +5 -5
- package/lib/form/src/FormItemRow.d.ts +3 -3
- package/lib/form/src/utils.d.ts +1 -1
- package/lib/gradient-text/src/GradientText.d.ts +5 -5
- package/lib/icon-wrapper/src/IconWrapper.js +6 -4
- package/lib/image/src/Image.d.ts +1 -1
- package/lib/input/src/Input.d.ts +1 -1
- package/lib/input-number/src/InputNumber.d.ts +1 -1
- package/lib/locales/common/eo.d.ts +109 -0
- package/lib/locales/common/eo.js +111 -0
- package/lib/locales/common/plPL.d.ts +3 -0
- package/lib/locales/common/plPL.js +111 -0
- package/lib/locales/date/eo.d.ts +3 -0
- package/lib/locales/date/eo.js +11 -0
- package/lib/locales/date/plPL.d.ts +3 -0
- package/lib/locales/date/plPL.js +11 -0
- package/lib/locales/index.d.ts +4 -0
- package/lib/locales/index.js +9 -1
- package/lib/mention/src/Mention.d.ts +1 -1
- package/lib/menu/src/Menu.d.ts +1 -1
- package/lib/modal/src/BodyWrapper.d.ts +6 -6
- package/lib/modal/src/Modal.d.ts +8 -8
- package/lib/modal/src/presetProps.d.ts +2 -2
- package/lib/notification/src/Notification.d.ts +4 -4
- package/lib/notification/src/NotificationEnvironment.d.ts +4 -4
- package/lib/notification/src/NotificationProvider.d.ts +1 -1
- package/lib/pagination/src/Pagination.d.ts +33 -33
- package/lib/pagination/styles/light.d.ts +3 -3
- package/lib/progress/src/Circle.d.ts +19 -3
- package/lib/progress/src/Circle.js +40 -21
- package/lib/progress/src/Progress.d.ts +14 -5
- package/lib/progress/src/Progress.js +42 -28
- package/lib/progress/src/styles/index.cssr.js +1 -1
- package/lib/result/src/Result.d.ts +4 -4
- package/lib/select/src/Select.d.ts +45 -31
- package/lib/select/src/Select.js +13 -8
- package/lib/select/styles/light.d.ts +3 -3
- package/lib/tag/src/Tag.d.ts +7 -5
- package/lib/tag/src/Tag.js +58 -38
- package/lib/tag/src/common-props.d.ts +1 -1
- package/lib/tag/src/styles/index.cssr.js +1 -1
- package/lib/tag/styles/index.d.ts +1 -1
- package/lib/tag/styles/index.js +1 -1
- package/lib/tag/styles/rtl.d.ts +2 -5
- package/lib/tag/styles/rtl.js +2 -1
- package/lib/timeline/src/TimelineItem.d.ts +4 -4
- package/lib/tree/src/utils.js +1 -1
- package/lib/tree-select/src/TreeSelect.d.ts +30 -30
- package/lib/tree-select/styles/light.d.ts +3 -3
- package/lib/typography/src/create-header.d.ts +4 -4
- package/lib/typography/src/headers.d.ts +18 -18
- package/lib/upload/src/UploadFile.d.ts +1 -1
- package/lib/upload/src/UploadProgress.d.ts +2 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +4 -4
- package/web-types.json +28 -1
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.emptyThemeClassHandle = exports.useThemeClass = void 0;
|
|
4
4
|
const vue_1 = require("vue");
|
|
5
5
|
const css_render_1 = require("css-render");
|
|
6
|
+
const vue3_ssr_1 = require("@css-render/vue3-ssr");
|
|
6
7
|
const context_1 = require("../config-provider/src/context");
|
|
7
8
|
const _utils_1 = require("../_utils");
|
|
8
9
|
const cssr_1 = require("../_utils/cssr");
|
|
9
|
-
function
|
|
10
|
+
function useThemeClass(componentName, hashRef, cssVarsRef, props) {
|
|
10
11
|
var _a;
|
|
11
12
|
if (!cssVarsRef)
|
|
12
|
-
(0, _utils_1.throwError)('
|
|
13
|
+
(0, _utils_1.throwError)('useThemeClass', 'cssVarsRef is not passed');
|
|
13
14
|
const mergedThemeHashRef = (_a = (0, vue_1.inject)(context_1.configProviderInjectionKey, null)) === null || _a === void 0 ? void 0 : _a.mergedThemeHashRef;
|
|
14
|
-
const
|
|
15
|
+
const themeClassRef = (0, vue_1.ref)('');
|
|
16
|
+
const ssrAdapter = (0, vue3_ssr_1.useSsrAdapter)();
|
|
17
|
+
let renderCallback;
|
|
15
18
|
const mountStyle = () => {
|
|
16
|
-
const cssVars = cssVarsRef.value;
|
|
17
|
-
let style = '';
|
|
18
|
-
for (const key in cssVars) {
|
|
19
|
-
style += `${key}: ${cssVars[key]};`;
|
|
20
|
-
}
|
|
21
19
|
let finalThemeHash = componentName;
|
|
22
20
|
const hashValue = hashRef ? hashRef.value : undefined;
|
|
23
21
|
const themeHash = mergedThemeHashRef === null || mergedThemeHashRef === void 0 ? void 0 : mergedThemeHashRef.value;
|
|
@@ -28,14 +26,32 @@ function useCssVarsClass(componentName, hashRef, cssVarsRef, props) {
|
|
|
28
26
|
if (props.themeOverrides) {
|
|
29
27
|
finalThemeHash += '-' + (0, css_render_1.hash)(JSON.stringify(props.themeOverrides));
|
|
30
28
|
}
|
|
31
|
-
|
|
32
|
-
(
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
themeClassRef.value = finalThemeHash;
|
|
30
|
+
renderCallback = () => {
|
|
31
|
+
const cssVars = cssVarsRef.value;
|
|
32
|
+
let style = '';
|
|
33
|
+
for (const key in cssVars) {
|
|
34
|
+
style += `${key}: ${cssVars[key]};`;
|
|
35
|
+
}
|
|
36
|
+
(0, cssr_1.c)(`.${finalThemeHash}`, style).mount({
|
|
37
|
+
id: finalThemeHash,
|
|
38
|
+
ssr: ssrAdapter
|
|
39
|
+
});
|
|
40
|
+
renderCallback = undefined;
|
|
41
|
+
};
|
|
35
42
|
};
|
|
36
43
|
(0, vue_1.watchEffect)(() => {
|
|
37
44
|
mountStyle();
|
|
38
45
|
});
|
|
39
|
-
return
|
|
46
|
+
return {
|
|
47
|
+
themeClass: themeClassRef,
|
|
48
|
+
onRender: () => {
|
|
49
|
+
renderCallback === null || renderCallback === void 0 ? void 0 : renderCallback();
|
|
50
|
+
}
|
|
51
|
+
};
|
|
40
52
|
}
|
|
41
|
-
exports.
|
|
53
|
+
exports.useThemeClass = useThemeClass;
|
|
54
|
+
exports.emptyThemeClassHandle = {
|
|
55
|
+
themeClass: undefined,
|
|
56
|
+
onRender: undefined
|
|
57
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComputedRef, Ref } from 'vue';
|
|
2
|
-
import { FormValidationStatus } from '../form/src/interface';
|
|
2
|
+
import type { FormValidationStatus } from '../form/src/interface';
|
|
3
3
|
declare type FormItemSize = 'small' | 'medium' | 'large';
|
|
4
4
|
declare type AllowedSize = 'tiny' | 'small' | 'medium' | 'large' | 'huge' | number;
|
|
5
5
|
export interface FormItemInjection {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function color2Class(color: string): string;
|
|
@@ -3,5 +3,5 @@ interface FormatLengthOptions {
|
|
|
3
3
|
offset?: number;
|
|
4
4
|
attachPx?: boolean;
|
|
5
5
|
}
|
|
6
|
-
declare function formatLength<T extends number | string | null | undefined | any>(length: T, { c, offset, attachPx }?: FormatLengthOptions): T extends null ? null : T extends undefined ? undefined : T extends string | number ? string : T;
|
|
7
|
-
export
|
|
6
|
+
export declare function formatLength<T extends number | string | null | undefined | any>(length: T, { c, offset, attachPx }?: FormatLengthOptions): T extends null ? null : T extends undefined ? undefined : T extends string | number ? string : T;
|
|
7
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatLength = void 0;
|
|
3
4
|
const pureNumberRegex = /^(\d|\.)+$/;
|
|
4
5
|
const numberRegex = /(\d|\.)+/;
|
|
5
6
|
function formatLength(length, { c = 1, offset = 0, attachPx = true } = {}) {
|
|
@@ -30,4 +31,4 @@ function formatLength(length, { c = 1, offset = 0, attachPx = true } = {}) {
|
|
|
30
31
|
}
|
|
31
32
|
return length;
|
|
32
33
|
}
|
|
33
|
-
exports.
|
|
34
|
+
exports.formatLength = formatLength;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { formatLength } from './format-length';
|
|
2
|
+
export { color2Class } from './color-to-class';
|
package/lib/_utils/css/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.formatLength = void 0;
|
|
3
|
+
exports.color2Class = exports.formatLength = void 0;
|
|
7
4
|
var format_length_1 = require("./format-length");
|
|
8
|
-
Object.defineProperty(exports, "formatLength", { enumerable: true, get: function () { return
|
|
5
|
+
Object.defineProperty(exports, "formatLength", { enumerable: true, get: function () { return format_length_1.formatLength; } });
|
|
6
|
+
var color_to_class_1 = require("./color-to-class");
|
|
7
|
+
Object.defineProperty(exports, "color2Class", { enumerable: true, get: function () { return color_to_class_1.color2Class; } });
|
package/lib/_utils/index.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ export { call, keep, omit, flatten, getSlot, getVNodeChildren, keysOf, render, g
|
|
|
2
2
|
export type { MaybeArray } from './vue';
|
|
3
3
|
export { warn, warnOnce, throwError, smallerSize, largerSize, getTitleAttribute } from './naive';
|
|
4
4
|
export type { ExtractPublicPropTypes, ExtractInternalPropTypes, Mutable } from './naive';
|
|
5
|
-
export { formatLength } from './css';
|
|
5
|
+
export { formatLength, color2Class } from './css';
|
|
6
6
|
export { createKey } from './cssr';
|
|
7
7
|
export * from './composable';
|
package/lib/_utils/index.js
CHANGED
|
@@ -10,7 +10,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.createKey = exports.formatLength = exports.getTitleAttribute = exports.largerSize = exports.smallerSize = exports.throwError = exports.warnOnce = exports.warn = exports.isSlotEmpty = exports.resolveWrappedSlot = exports.resolveSlotWithProps = exports.resolveSlot = exports.createInjectionKey = exports.createRefSetter = exports.createDataKey = exports.getFirstSlotVNode = exports.render = exports.keysOf = exports.getVNodeChildren = exports.getSlot = exports.flatten = exports.omit = exports.keep = exports.call = void 0;
|
|
13
|
+
exports.createKey = exports.color2Class = exports.formatLength = exports.getTitleAttribute = exports.largerSize = exports.smallerSize = exports.throwError = exports.warnOnce = exports.warn = exports.isSlotEmpty = exports.resolveWrappedSlot = exports.resolveSlotWithProps = exports.resolveSlot = exports.createInjectionKey = exports.createRefSetter = exports.createDataKey = exports.getFirstSlotVNode = exports.render = exports.keysOf = exports.getVNodeChildren = exports.getSlot = exports.flatten = exports.omit = exports.keep = exports.call = void 0;
|
|
14
14
|
var vue_1 = require("./vue");
|
|
15
15
|
Object.defineProperty(exports, "call", { enumerable: true, get: function () { return vue_1.call; } });
|
|
16
16
|
Object.defineProperty(exports, "keep", { enumerable: true, get: function () { return vue_1.keep; } });
|
|
@@ -37,6 +37,7 @@ Object.defineProperty(exports, "largerSize", { enumerable: true, get: function (
|
|
|
37
37
|
Object.defineProperty(exports, "getTitleAttribute", { enumerable: true, get: function () { return naive_1.getTitleAttribute; } });
|
|
38
38
|
var css_1 = require("./css");
|
|
39
39
|
Object.defineProperty(exports, "formatLength", { enumerable: true, get: function () { return css_1.formatLength; } });
|
|
40
|
+
Object.defineProperty(exports, "color2Class", { enumerable: true, get: function () { return css_1.color2Class; } });
|
|
40
41
|
var cssr_1 = require("./cssr");
|
|
41
42
|
Object.defineProperty(exports, "createKey", { enumerable: true, get: function () { return cssr_1.createKey; } });
|
|
42
43
|
__exportStar(require("./composable"), exports);
|
|
@@ -27,7 +27,6 @@ function resolveSlot(slot, fallback) {
|
|
|
27
27
|
}
|
|
28
28
|
exports.resolveSlot = resolveSlot;
|
|
29
29
|
function resolveSlotWithProps(slot, props, fallback) {
|
|
30
|
-
console.log(slot && ensureValidVNode(slot(props)));
|
|
31
30
|
return (slot && ensureValidVNode(slot(props))) || fallback(props);
|
|
32
31
|
}
|
|
33
32
|
exports.resolveSlotWithProps = resolveSlotWithProps;
|
package/lib/alert/src/Alert.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ declare const alertProps: {
|
|
|
10
10
|
default: boolean;
|
|
11
11
|
};
|
|
12
12
|
type: {
|
|
13
|
-
type: PropType<"default" | "
|
|
13
|
+
type: PropType<"default" | "error" | "info" | "success" | "warning">;
|
|
14
14
|
default: string;
|
|
15
15
|
};
|
|
16
16
|
closable: {
|
|
@@ -192,7 +192,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
192
192
|
default: boolean;
|
|
193
193
|
};
|
|
194
194
|
type: {
|
|
195
|
-
type: PropType<"default" | "
|
|
195
|
+
type: PropType<"default" | "error" | "info" | "success" | "warning">;
|
|
196
196
|
default: string;
|
|
197
197
|
};
|
|
198
198
|
closable: {
|
|
@@ -559,7 +559,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
559
559
|
default: boolean;
|
|
560
560
|
};
|
|
561
561
|
type: {
|
|
562
|
-
type: PropType<"default" | "
|
|
562
|
+
type: PropType<"default" | "error" | "info" | "success" | "warning">;
|
|
563
563
|
default: string;
|
|
564
564
|
};
|
|
565
565
|
closable: {
|
|
@@ -730,7 +730,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
730
730
|
padding: string;
|
|
731
731
|
}, any>>>;
|
|
732
732
|
}>>, {
|
|
733
|
-
type: "default" | "
|
|
733
|
+
type: "default" | "error" | "info" | "success" | "warning";
|
|
734
734
|
onAfterLeave: Function;
|
|
735
735
|
title: string;
|
|
736
736
|
showIcon: boolean;
|
|
@@ -1486,8 +1486,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1486
1486
|
disabled: boolean | undefined;
|
|
1487
1487
|
to: string | boolean | HTMLElement;
|
|
1488
1488
|
options: AutoCompleteOptions;
|
|
1489
|
-
bordered: boolean | undefined;
|
|
1490
1489
|
loading: boolean;
|
|
1490
|
+
bordered: boolean | undefined;
|
|
1491
1491
|
placement: FollowerPlacement;
|
|
1492
1492
|
clearable: boolean;
|
|
1493
1493
|
defaultValue: string | null;
|
package/lib/badge/src/Badge.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ declare const badgeProps: {
|
|
|
8
8
|
readonly default: false;
|
|
9
9
|
};
|
|
10
10
|
readonly type: {
|
|
11
|
-
readonly type: PropType<"default" | "
|
|
11
|
+
readonly type: PropType<"default" | "error" | "info" | "success" | "warning">;
|
|
12
12
|
readonly default: "default";
|
|
13
13
|
};
|
|
14
14
|
readonly show: {
|
|
@@ -61,7 +61,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
61
61
|
readonly default: false;
|
|
62
62
|
};
|
|
63
63
|
readonly type: {
|
|
64
|
-
readonly type: PropType<"default" | "
|
|
64
|
+
readonly type: PropType<"default" | "error" | "info" | "success" | "warning">;
|
|
65
65
|
readonly default: "default";
|
|
66
66
|
};
|
|
67
67
|
readonly show: {
|
|
@@ -126,7 +126,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
126
126
|
readonly default: false;
|
|
127
127
|
};
|
|
128
128
|
readonly type: {
|
|
129
|
-
readonly type: PropType<"default" | "
|
|
129
|
+
readonly type: PropType<"default" | "error" | "info" | "success" | "warning">;
|
|
130
130
|
readonly default: "default";
|
|
131
131
|
};
|
|
132
132
|
readonly show: {
|
|
@@ -170,7 +170,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
170
170
|
fontFamily: string;
|
|
171
171
|
}, any>>>;
|
|
172
172
|
}>>, {
|
|
173
|
-
type: "default" | "
|
|
173
|
+
type: "default" | "error" | "info" | "success" | "warning";
|
|
174
174
|
show: boolean;
|
|
175
175
|
dot: boolean;
|
|
176
176
|
showZero: boolean;
|
|
@@ -1320,6 +1320,8 @@ declare const Button: import("vue").DefineComponent<{
|
|
|
1320
1320
|
rippleDuration: string;
|
|
1321
1321
|
}, any>>>;
|
|
1322
1322
|
}, {
|
|
1323
|
+
themeClass?: import("vue").Ref<string> | undefined;
|
|
1324
|
+
onRender?: (() => void) | undefined;
|
|
1323
1325
|
selfElRef: import("vue").Ref<HTMLElement | null>;
|
|
1324
1326
|
waveElRef: import("vue").Ref<{
|
|
1325
1327
|
play: () => void;
|
|
@@ -1342,7 +1344,6 @@ declare const Button: import("vue").DefineComponent<{
|
|
|
1342
1344
|
'--n-border-color-focus': string;
|
|
1343
1345
|
'--n-border-color-disabled': string;
|
|
1344
1346
|
} | null>;
|
|
1345
|
-
themeClass: import("vue").Ref<string> | undefined;
|
|
1346
1347
|
cssVars: import("vue").ComputedRef<{
|
|
1347
1348
|
'--n-width': string;
|
|
1348
1349
|
'--n-height': string;
|
|
@@ -2043,8 +2044,8 @@ declare const Button: import("vue").DefineComponent<{
|
|
|
2043
2044
|
disabled: boolean;
|
|
2044
2045
|
focusable: boolean;
|
|
2045
2046
|
strong: boolean;
|
|
2046
|
-
bordered: boolean;
|
|
2047
2047
|
loading: boolean;
|
|
2048
|
+
bordered: boolean;
|
|
2048
2049
|
tertiary: boolean;
|
|
2049
2050
|
keyboard: boolean;
|
|
2050
2051
|
ghost: boolean;
|
package/lib/button/src/Button.js
CHANGED
|
@@ -366,8 +366,8 @@ const Button = (0, vue_1.defineComponent)({
|
|
|
366
366
|
};
|
|
367
367
|
return Object.assign(Object.assign(Object.assign(Object.assign({ '--n-bezier': cubicBezierEaseInOut, '--n-bezier-ease-out': cubicBezierEaseOut, '--n-ripple-duration': rippleDuration, '--n-opacity-disabled': opacityDisabled, '--n-wave-opacity': waveOpacity }, fontProps), colorProps), borderProps), sizeProps);
|
|
368
368
|
});
|
|
369
|
-
const
|
|
370
|
-
? (0, _mixins_1.
|
|
369
|
+
const themeClassHandle = disableInlineTheme
|
|
370
|
+
? (0, _mixins_1.useThemeClass)('button', (0, vue_1.computed)(() => {
|
|
371
371
|
let hash = '';
|
|
372
372
|
const { dashed, type, ghost, text, color, round, circle, textColor, secondary, tertiary, quaternary, strong } = props;
|
|
373
373
|
if (dashed)
|
|
@@ -389,30 +389,21 @@ const Button = (0, vue_1.defineComponent)({
|
|
|
389
389
|
if (strong)
|
|
390
390
|
hash += 'i';
|
|
391
391
|
if (color)
|
|
392
|
-
hash += 'j' +
|
|
392
|
+
hash += 'j' + (0, _utils_1.color2Class)(color);
|
|
393
393
|
if (textColor)
|
|
394
|
-
hash += 'k' +
|
|
394
|
+
hash += 'k' + (0, _utils_1.color2Class)(textColor);
|
|
395
395
|
const { value: size } = mergedSizeRef;
|
|
396
396
|
hash += 'l' + size[0];
|
|
397
397
|
hash += 'm' + type[0];
|
|
398
398
|
return hash;
|
|
399
399
|
}), cssVarsRef, props)
|
|
400
|
-
:
|
|
401
|
-
return {
|
|
402
|
-
|
|
403
|
-
waveElRef,
|
|
404
|
-
mergedClsPrefix: mergedClsPrefixRef,
|
|
405
|
-
mergedFocusable: mergedFocusableRef,
|
|
406
|
-
mergedSize: mergedSizeRef,
|
|
407
|
-
showBorder: showBorderRef,
|
|
408
|
-
enterPressed: enterPressedRef,
|
|
409
|
-
rtlEnabled: rtlEnabledRef,
|
|
410
|
-
handleMousedown,
|
|
400
|
+
: _mixins_1.emptyThemeClassHandle;
|
|
401
|
+
return Object.assign({ selfElRef,
|
|
402
|
+
waveElRef, mergedClsPrefix: mergedClsPrefixRef, mergedFocusable: mergedFocusableRef, mergedSize: mergedSizeRef, showBorder: showBorderRef, enterPressed: enterPressedRef, rtlEnabled: rtlEnabledRef, handleMousedown,
|
|
411
403
|
handleKeydown,
|
|
412
404
|
handleBlur,
|
|
413
405
|
handleKeyup,
|
|
414
|
-
handleClick,
|
|
415
|
-
customColorCssVars: (0, vue_1.computed)(() => {
|
|
406
|
+
handleClick, customColorCssVars: (0, vue_1.computed)(() => {
|
|
416
407
|
const { color } = props;
|
|
417
408
|
if (!color)
|
|
418
409
|
return null;
|
|
@@ -424,13 +415,11 @@ const Button = (0, vue_1.defineComponent)({
|
|
|
424
415
|
'--n-border-color-focus': hoverColor,
|
|
425
416
|
'--n-border-color-disabled': color
|
|
426
417
|
};
|
|
427
|
-
}),
|
|
428
|
-
themeClass: themeClassRef,
|
|
429
|
-
cssVars: disableInlineTheme ? undefined : cssVarsRef
|
|
430
|
-
};
|
|
418
|
+
}), cssVars: disableInlineTheme ? undefined : cssVarsRef }, themeClassHandle);
|
|
431
419
|
},
|
|
432
420
|
render() {
|
|
433
|
-
const { $slots, mergedClsPrefix, tag: Component } = this;
|
|
421
|
+
const { $slots, mergedClsPrefix, tag: Component, onRender } = this;
|
|
422
|
+
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
434
423
|
return ((0, vue_1.h)(Component, { ref: "selfElRef", class: [
|
|
435
424
|
this.themeClass,
|
|
436
425
|
`${mergedClsPrefix}-button`,
|
|
@@ -9,4 +9,4 @@ Object.defineProperty(exports, "buttonDark", { enumerable: true, get: function (
|
|
|
9
9
|
var light_1 = require("./light");
|
|
10
10
|
Object.defineProperty(exports, "buttonLight", { enumerable: true, get: function () { return __importDefault(light_1).default; } });
|
|
11
11
|
var rtl_1 = require("./rtl");
|
|
12
|
-
Object.defineProperty(exports, "buttonRtl", { enumerable: true, get: function () { return
|
|
12
|
+
Object.defineProperty(exports, "buttonRtl", { enumerable: true, get: function () { return rtl_1.buttonRtl; } });
|
package/lib/button/styles/rtl.js
CHANGED
|
@@ -3,8 +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.buttonRtl = void 0;
|
|
6
7
|
const button_rtl_cssr_1 = __importDefault(require("../src/styles/button-rtl.cssr"));
|
|
7
|
-
exports.
|
|
8
|
+
exports.buttonRtl = {
|
|
8
9
|
name: 'Button',
|
|
9
10
|
style: button_rtl_cssr_1.default
|
|
10
11
|
};
|
package/lib/card/src/Card.d.ts
CHANGED
|
@@ -274,6 +274,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
274
274
|
closeSize: string;
|
|
275
275
|
}, any>>>;
|
|
276
276
|
}, {
|
|
277
|
+
themeClass?: import("vue").Ref<string> | undefined;
|
|
278
|
+
onRender?: (() => void) | undefined;
|
|
277
279
|
rtlEnabled: import("vue").Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined;
|
|
278
280
|
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
279
281
|
mergedTheme: import("vue").ComputedRef<{
|
|
@@ -440,7 +442,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
440
442
|
'--n-font-size': string;
|
|
441
443
|
'--n-title-font-size': string;
|
|
442
444
|
'--n-close-size': string;
|
|
443
|
-
}
|
|
445
|
+
}> | undefined;
|
|
444
446
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
445
447
|
title: StringConstructor;
|
|
446
448
|
contentStyle: PropType<string | CSSProperties>;
|
package/lib/card/src/Card.js
CHANGED
|
@@ -51,49 +51,52 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
51
51
|
(0, _utils_1.call)(onClose);
|
|
52
52
|
};
|
|
53
53
|
const { mergedClsPrefixRef, NConfigProvider } = (0, _mixins_1.useConfig)(props);
|
|
54
|
+
const disableInlineTheme = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.disableInlineTheme;
|
|
54
55
|
const themeRef = (0, _mixins_1.useTheme)('Card', '-card', index_cssr_1.default, styles_1.cardLight, props, mergedClsPrefixRef);
|
|
55
56
|
const rtlEnabledRef = (0, use_rtl_1.default)('Card', NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedRtlRef, mergedClsPrefixRef);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
};
|
|
57
|
+
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
58
|
+
const { size } = props;
|
|
59
|
+
const { self: { color, colorModal, colorTarget, textColor, titleTextColor, titleFontWeight, borderColor, actionColor, borderRadius, closeColor, closeColorHover, closeColorPressed, lineHeight, closeSize, boxShadow, colorPopover, colorEmbedded, [(0, _utils_1.createKey)('padding', size)]: padding, [(0, _utils_1.createKey)('fontSize', size)]: fontSize, [(0, _utils_1.createKey)('titleFontSize', size)]: titleFontSize }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
60
|
+
const { top: paddingTop, left: paddingLeft, bottom: paddingBottom } = (0, seemly_1.getPadding)(padding);
|
|
61
|
+
return {
|
|
62
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
63
|
+
'--n-border-radius': borderRadius,
|
|
64
|
+
'--n-color': props.embedded ? colorEmbedded : color,
|
|
65
|
+
'--n-color-modal': colorModal,
|
|
66
|
+
'--n-color-popover': colorPopover,
|
|
67
|
+
'--n-color-target': colorTarget,
|
|
68
|
+
'--n-text-color': textColor,
|
|
69
|
+
'--n-line-height': lineHeight,
|
|
70
|
+
'--n-action-color': actionColor,
|
|
71
|
+
'--n-title-text-color': titleTextColor,
|
|
72
|
+
'--n-title-font-weight': titleFontWeight,
|
|
73
|
+
'--n-close-color': closeColor,
|
|
74
|
+
'--n-close-color-hover': closeColorHover,
|
|
75
|
+
'--n-close-color-pressed': closeColorPressed,
|
|
76
|
+
'--n-border-color': borderColor,
|
|
77
|
+
'--n-box-shadow': boxShadow,
|
|
78
|
+
// size
|
|
79
|
+
'--n-padding-top': paddingTop,
|
|
80
|
+
'--n-padding-bottom': paddingBottom,
|
|
81
|
+
'--n-padding-left': paddingLeft,
|
|
82
|
+
'--n-font-size': fontSize,
|
|
83
|
+
'--n-title-font-size': titleFontSize,
|
|
84
|
+
'--n-close-size': closeSize
|
|
85
|
+
};
|
|
86
|
+
});
|
|
87
|
+
const themeClassHandle = disableInlineTheme
|
|
88
|
+
? (0, _mixins_1.useThemeClass)('card', (0, vue_1.computed)(() => {
|
|
89
|
+
return props.size[0];
|
|
90
|
+
}), cssVarsRef, props)
|
|
91
|
+
: _mixins_1.emptyThemeClassHandle;
|
|
92
|
+
return Object.assign({ rtlEnabled: rtlEnabledRef, mergedClsPrefix: mergedClsPrefixRef, mergedTheme: themeRef, handleCloseClick, cssVars: disableInlineTheme ? undefined : cssVarsRef }, themeClassHandle);
|
|
92
93
|
},
|
|
93
94
|
render() {
|
|
94
|
-
const { segmented, bordered, hoverable, mergedClsPrefix, rtlEnabled, $slots } = this;
|
|
95
|
+
const { segmented, bordered, hoverable, mergedClsPrefix, rtlEnabled, onRender, $slots } = this;
|
|
96
|
+
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
95
97
|
return ((0, vue_1.h)("div", { class: [
|
|
96
98
|
`${mergedClsPrefix}-card`,
|
|
99
|
+
this.themeClass,
|
|
97
100
|
{
|
|
98
101
|
[`${mergedClsPrefix}-card--rtl`]: rtlEnabled,
|
|
99
102
|
[`${mergedClsPrefix}-card--content${typeof segmented !== 'boolean' && segmented.content === 'soft'
|
package/lib/card/styles/index.js
CHANGED
|
@@ -9,4 +9,4 @@ Object.defineProperty(exports, "cardDark", { enumerable: true, get: function ()
|
|
|
9
9
|
var light_1 = require("./light");
|
|
10
10
|
Object.defineProperty(exports, "cardLight", { enumerable: true, get: function () { return __importDefault(light_1).default; } });
|
|
11
11
|
var rtl_1 = require("./rtl");
|
|
12
|
-
Object.defineProperty(exports, "cardRtl", { enumerable: true, get: function () { return
|
|
12
|
+
Object.defineProperty(exports, "cardRtl", { enumerable: true, get: function () { return rtl_1.cardRtl; } });
|
package/lib/card/styles/rtl.d.ts
CHANGED
package/lib/card/styles/rtl.js
CHANGED
|
@@ -3,8 +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.cardRtl = void 0;
|
|
6
7
|
const rtl_cssr_1 = __importDefault(require("../src/styles/rtl.cssr"));
|
|
7
|
-
exports.
|
|
8
|
+
exports.cardRtl = {
|
|
8
9
|
name: 'Card',
|
|
9
10
|
style: rtl_cssr_1.default
|
|
10
11
|
};
|