first commit
This commit is contained in:
61
node_modules/vant/lib/progress/Progress.d.ts
generated
vendored
Normal file
61
node_modules/vant/lib/progress/Progress.d.ts
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
import { type ExtractPropTypes } from 'vue';
|
||||
import { type Numeric } from '../utils';
|
||||
export declare const progressProps: {
|
||||
color: StringConstructor;
|
||||
inactive: BooleanConstructor;
|
||||
pivotText: StringConstructor;
|
||||
textColor: StringConstructor;
|
||||
showPivot: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
pivotColor: StringConstructor;
|
||||
trackColor: StringConstructor;
|
||||
strokeWidth: (NumberConstructor | StringConstructor)[];
|
||||
percentage: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: number;
|
||||
validator: (value: Numeric) => boolean;
|
||||
};
|
||||
};
|
||||
export type ProgressProps = ExtractPropTypes<typeof progressProps>;
|
||||
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
||||
color: StringConstructor;
|
||||
inactive: BooleanConstructor;
|
||||
pivotText: StringConstructor;
|
||||
textColor: StringConstructor;
|
||||
showPivot: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
pivotColor: StringConstructor;
|
||||
trackColor: StringConstructor;
|
||||
strokeWidth: (NumberConstructor | StringConstructor)[];
|
||||
percentage: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: number;
|
||||
validator: (value: Numeric) => boolean;
|
||||
};
|
||||
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
||||
color: StringConstructor;
|
||||
inactive: BooleanConstructor;
|
||||
pivotText: StringConstructor;
|
||||
textColor: StringConstructor;
|
||||
showPivot: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
pivotColor: StringConstructor;
|
||||
trackColor: StringConstructor;
|
||||
strokeWidth: (NumberConstructor | StringConstructor)[];
|
||||
percentage: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: number;
|
||||
validator: (value: Numeric) => boolean;
|
||||
};
|
||||
}>> & Readonly<{}>, {
|
||||
inactive: boolean;
|
||||
showPivot: boolean;
|
||||
percentage: string | number;
|
||||
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
||||
export default _default;
|
||||
98
node_modules/vant/lib/progress/Progress.js
generated
vendored
Normal file
98
node_modules/vant/lib/progress/Progress.js
generated
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name2 in all)
|
||||
__defProp(target, name2, { get: all[name2], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var stdin_exports = {};
|
||||
__export(stdin_exports, {
|
||||
default: () => stdin_default,
|
||||
progressProps: () => progressProps
|
||||
});
|
||||
module.exports = __toCommonJS(stdin_exports);
|
||||
var import_vue = require("vue");
|
||||
var import_utils = require("../utils");
|
||||
const [name, bem] = (0, import_utils.createNamespace)("progress");
|
||||
const progressProps = {
|
||||
color: String,
|
||||
inactive: Boolean,
|
||||
pivotText: String,
|
||||
textColor: String,
|
||||
showPivot: import_utils.truthProp,
|
||||
pivotColor: String,
|
||||
trackColor: String,
|
||||
strokeWidth: import_utils.numericProp,
|
||||
percentage: {
|
||||
type: import_utils.numericProp,
|
||||
default: 0,
|
||||
validator: (value) => +value >= 0 && +value <= 100
|
||||
}
|
||||
};
|
||||
var stdin_default = (0, import_vue.defineComponent)({
|
||||
name,
|
||||
props: progressProps,
|
||||
setup(props) {
|
||||
const background = (0, import_vue.computed)(() => props.inactive ? void 0 : props.color);
|
||||
const format = (rate) => Math.min(Math.max(+rate, 0), 100);
|
||||
const renderPivot = () => {
|
||||
const {
|
||||
textColor,
|
||||
pivotText,
|
||||
pivotColor,
|
||||
percentage
|
||||
} = props;
|
||||
const safePercentage = format(percentage);
|
||||
const text = pivotText != null ? pivotText : `${percentage}%`;
|
||||
if (props.showPivot && text) {
|
||||
const style = {
|
||||
color: textColor,
|
||||
left: `${safePercentage}%`,
|
||||
transform: `translate(-${safePercentage}%,-50%)`,
|
||||
background: pivotColor || background.value
|
||||
};
|
||||
return (0, import_vue.createVNode)("span", {
|
||||
"style": style,
|
||||
"class": bem("pivot", {
|
||||
inactive: props.inactive
|
||||
})
|
||||
}, [text]);
|
||||
}
|
||||
};
|
||||
return () => {
|
||||
const {
|
||||
trackColor,
|
||||
percentage,
|
||||
strokeWidth
|
||||
} = props;
|
||||
const safePercentage = format(percentage);
|
||||
const rootStyle = {
|
||||
background: trackColor,
|
||||
height: (0, import_utils.addUnit)(strokeWidth)
|
||||
};
|
||||
const portionStyle = {
|
||||
width: `${safePercentage}%`,
|
||||
background: background.value
|
||||
};
|
||||
return (0, import_vue.createVNode)("div", {
|
||||
"class": bem(),
|
||||
"style": rootStyle
|
||||
}, [(0, import_vue.createVNode)("span", {
|
||||
"class": bem("portion", {
|
||||
inactive: props.inactive
|
||||
}),
|
||||
"style": portionStyle
|
||||
}, null), renderPivot()]);
|
||||
};
|
||||
}
|
||||
});
|
||||
1
node_modules/vant/lib/progress/index.css
generated
vendored
Normal file
1
node_modules/vant/lib/progress/index.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
:root,:host{--van-progress-height: 4px;--van-progress-color: var(--van-primary-color);--van-progress-inactive-color: var(--van-gray-5);--van-progress-background: var(--van-gray-3);--van-progress-pivot-padding: 0 5px;--van-progress-pivot-text-color: var(--van-white);--van-progress-pivot-font-size: var(--van-font-size-xs);--van-progress-pivot-line-height: 1.6;--van-progress-pivot-background: var(--van-primary-color)}.van-progress{position:relative;height:var(--van-progress-height);background:var(--van-progress-background);border-radius:var(--van-progress-height)}.van-progress__portion{position:absolute;left:0;width:100%;height:100%;background:var(--van-progress-color);border-radius:inherit;transform-origin:0;transition:all var(--van-duration-base) var(--van-ease-out)}.van-progress__portion--inactive{background:var(--van-progress-inactive-color)}.van-progress__pivot{position:absolute;top:50%;box-sizing:border-box;min-width:3.6em;padding:var(--van-progress-pivot-padding);color:var(--van-progress-pivot-text-color);font-size:var(--van-progress-pivot-font-size);line-height:var(--van-progress-pivot-line-height);text-align:center;word-break:keep-all;background:var(--van-progress-pivot-background);border-radius:1em;transition:all var(--van-duration-base) var(--van-ease-out)}.van-progress__pivot--inactive{background:var(--van-progress-inactive-color)}
|
||||
49
node_modules/vant/lib/progress/index.d.ts
generated
vendored
Normal file
49
node_modules/vant/lib/progress/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
import { ProgressProps } from './Progress';
|
||||
export declare const Progress: import("../utils").WithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
||||
color: StringConstructor;
|
||||
inactive: BooleanConstructor;
|
||||
pivotText: StringConstructor;
|
||||
textColor: StringConstructor;
|
||||
showPivot: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
pivotColor: StringConstructor;
|
||||
trackColor: StringConstructor;
|
||||
strokeWidth: (NumberConstructor | StringConstructor)[];
|
||||
percentage: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: number;
|
||||
validator: (value: import("../utils").Numeric) => boolean;
|
||||
};
|
||||
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
||||
color: StringConstructor;
|
||||
inactive: BooleanConstructor;
|
||||
pivotText: StringConstructor;
|
||||
textColor: StringConstructor;
|
||||
showPivot: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
pivotColor: StringConstructor;
|
||||
trackColor: StringConstructor;
|
||||
strokeWidth: (NumberConstructor | StringConstructor)[];
|
||||
percentage: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: number;
|
||||
validator: (value: import("../utils").Numeric) => boolean;
|
||||
};
|
||||
}>> & Readonly<{}>, {
|
||||
inactive: boolean;
|
||||
showPivot: boolean;
|
||||
percentage: string | number;
|
||||
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
||||
export default Progress;
|
||||
export { progressProps } from './Progress';
|
||||
export type { ProgressProps };
|
||||
export type { ProgressInstance, ProgressThemeVars } from './types';
|
||||
declare module 'vue' {
|
||||
interface GlobalComponents {
|
||||
VanProgress: typeof Progress;
|
||||
}
|
||||
}
|
||||
39
node_modules/vant/lib/progress/index.js
generated
vendored
Normal file
39
node_modules/vant/lib/progress/index.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var stdin_exports = {};
|
||||
__export(stdin_exports, {
|
||||
Progress: () => Progress,
|
||||
default: () => stdin_default,
|
||||
progressProps: () => import_Progress2.progressProps
|
||||
});
|
||||
module.exports = __toCommonJS(stdin_exports);
|
||||
var import_utils = require("../utils");
|
||||
var import_Progress = __toESM(require("./Progress"));
|
||||
var import_Progress2 = require("./Progress");
|
||||
const Progress = (0, import_utils.withInstall)(import_Progress.default);
|
||||
var stdin_default = Progress;
|
||||
1
node_modules/vant/lib/progress/style/index.d.ts
generated
vendored
Normal file
1
node_modules/vant/lib/progress/style/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
2
node_modules/vant/lib/progress/style/index.js
generated
vendored
Normal file
2
node_modules/vant/lib/progress/style/index.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
require("../../style/base.css");
|
||||
require("../index.css");
|
||||
14
node_modules/vant/lib/progress/types.d.ts
generated
vendored
Normal file
14
node_modules/vant/lib/progress/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import type { ComponentPublicInstance } from 'vue';
|
||||
import type { ProgressProps } from './Progress';
|
||||
export type ProgressInstance = ComponentPublicInstance<ProgressProps>;
|
||||
export type ProgressThemeVars = {
|
||||
progressHeight?: string;
|
||||
progressColor?: string;
|
||||
progressInactiveColor?: string;
|
||||
progressBackground?: string;
|
||||
progressPivotPadding?: string;
|
||||
progressPivotTextColor?: string;
|
||||
progressPivotFontSize?: string;
|
||||
progressPivotLineHeight?: number | string;
|
||||
progressPivotBackground?: string;
|
||||
};
|
||||
15
node_modules/vant/lib/progress/types.js
generated
vendored
Normal file
15
node_modules/vant/lib/progress/types.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var stdin_exports = {};
|
||||
module.exports = __toCommonJS(stdin_exports);
|
||||
Reference in New Issue
Block a user