first commit
This commit is contained in:
68
node_modules/vant/lib/checkbox/Checkbox.d.ts
generated
vendored
Normal file
68
node_modules/vant/lib/checkbox/Checkbox.d.ts
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
import { type PropType, type ExtractPropTypes } from 'vue';
|
||||
import { type CheckerShape } from './Checker';
|
||||
export declare const checkboxProps: {
|
||||
name: PropType<unknown>;
|
||||
disabled: BooleanConstructor;
|
||||
iconSize: (NumberConstructor | StringConstructor)[];
|
||||
modelValue: PropType<unknown>;
|
||||
checkedColor: StringConstructor;
|
||||
labelPosition: PropType<import("./Checker").CheckerLabelPosition>;
|
||||
labelDisabled: BooleanConstructor;
|
||||
} & {
|
||||
shape: PropType<CheckerShape>;
|
||||
bindGroup: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
indeterminate: {
|
||||
type: PropType<boolean | null>;
|
||||
default: null;
|
||||
};
|
||||
};
|
||||
export type CheckboxProps = ExtractPropTypes<typeof checkboxProps>;
|
||||
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
||||
name: PropType<unknown>;
|
||||
disabled: BooleanConstructor;
|
||||
iconSize: (NumberConstructor | StringConstructor)[];
|
||||
modelValue: PropType<unknown>;
|
||||
checkedColor: StringConstructor;
|
||||
labelPosition: PropType<import("./Checker").CheckerLabelPosition>;
|
||||
labelDisabled: BooleanConstructor;
|
||||
} & {
|
||||
shape: PropType<CheckerShape>;
|
||||
bindGroup: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
indeterminate: {
|
||||
type: PropType<boolean | null>;
|
||||
default: null;
|
||||
};
|
||||
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
||||
name: PropType<unknown>;
|
||||
disabled: BooleanConstructor;
|
||||
iconSize: (NumberConstructor | StringConstructor)[];
|
||||
modelValue: PropType<unknown>;
|
||||
checkedColor: StringConstructor;
|
||||
labelPosition: PropType<import("./Checker").CheckerLabelPosition>;
|
||||
labelDisabled: BooleanConstructor;
|
||||
} & {
|
||||
shape: PropType<CheckerShape>;
|
||||
bindGroup: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
indeterminate: {
|
||||
type: PropType<boolean | null>;
|
||||
default: null;
|
||||
};
|
||||
}>> & Readonly<{
|
||||
onChange?: ((...args: any[]) => any) | undefined;
|
||||
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
||||
}>, {
|
||||
disabled: boolean;
|
||||
labelDisabled: boolean;
|
||||
bindGroup: boolean;
|
||||
indeterminate: boolean | null;
|
||||
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
||||
export default _default;
|
||||
118
node_modules/vant/lib/checkbox/Checkbox.js
generated
vendored
Normal file
118
node_modules/vant/lib/checkbox/Checkbox.js
generated
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
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 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 __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, {
|
||||
checkboxProps: () => checkboxProps,
|
||||
default: () => stdin_default
|
||||
});
|
||||
module.exports = __toCommonJS(stdin_exports);
|
||||
var import_vue = require("vue");
|
||||
var import_utils = require("../utils");
|
||||
var import_CheckboxGroup = require("../checkbox-group/CheckboxGroup");
|
||||
var import_use = require("@vant/use");
|
||||
var import_use_expose = require("../composables/use-expose");
|
||||
var import_Checker = __toESM(require("./Checker"));
|
||||
const [name, bem] = (0, import_utils.createNamespace)("checkbox");
|
||||
const checkboxProps = (0, import_utils.extend)({}, import_Checker.checkerProps, {
|
||||
shape: String,
|
||||
bindGroup: import_utils.truthProp,
|
||||
indeterminate: {
|
||||
type: Boolean,
|
||||
default: null
|
||||
}
|
||||
});
|
||||
var stdin_default = (0, import_vue.defineComponent)({
|
||||
name,
|
||||
props: checkboxProps,
|
||||
emits: ["change", "update:modelValue"],
|
||||
setup(props, {
|
||||
emit,
|
||||
slots
|
||||
}) {
|
||||
const {
|
||||
parent
|
||||
} = (0, import_use.useParent)(import_CheckboxGroup.CHECKBOX_GROUP_KEY);
|
||||
const setParentValue = (checked2) => {
|
||||
const {
|
||||
name: name2
|
||||
} = props;
|
||||
const {
|
||||
max,
|
||||
modelValue
|
||||
} = parent.props;
|
||||
const value = modelValue.slice();
|
||||
if (checked2) {
|
||||
const overlimit = max && value.length >= +max;
|
||||
if (!overlimit && !value.includes(name2)) {
|
||||
value.push(name2);
|
||||
if (props.bindGroup) {
|
||||
parent.updateValue(value);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const index = value.indexOf(name2);
|
||||
if (index !== -1) {
|
||||
value.splice(index, 1);
|
||||
if (props.bindGroup) {
|
||||
parent.updateValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
const checked = (0, import_vue.computed)(() => {
|
||||
if (parent && props.bindGroup) {
|
||||
return parent.props.modelValue.indexOf(props.name) !== -1;
|
||||
}
|
||||
return !!props.modelValue;
|
||||
});
|
||||
const toggle = (newValue = !checked.value) => {
|
||||
if (parent && props.bindGroup) {
|
||||
setParentValue(newValue);
|
||||
} else {
|
||||
emit("update:modelValue", newValue);
|
||||
}
|
||||
if (props.indeterminate !== null) emit("change", newValue);
|
||||
};
|
||||
(0, import_vue.watch)(() => props.modelValue, (value) => {
|
||||
if (props.indeterminate === null) emit("change", value);
|
||||
});
|
||||
(0, import_use_expose.useExpose)({
|
||||
toggle,
|
||||
props,
|
||||
checked
|
||||
});
|
||||
(0, import_use.useCustomFieldValue)(() => props.modelValue);
|
||||
return () => (0, import_vue.createVNode)(import_Checker.default, (0, import_vue.mergeProps)({
|
||||
"bem": bem,
|
||||
"role": "checkbox",
|
||||
"parent": parent,
|
||||
"checked": checked.value,
|
||||
"onToggle": toggle
|
||||
}, props), (0, import_utils.pick)(slots, ["default", "icon"]));
|
||||
}
|
||||
});
|
||||
87
node_modules/vant/lib/checkbox/Checker.d.ts
generated
vendored
Normal file
87
node_modules/vant/lib/checkbox/Checker.d.ts
generated
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
import { type PropType } from 'vue';
|
||||
import { type Numeric } from '../utils';
|
||||
import type { RadioShape } from '../radio';
|
||||
export type CheckerShape = 'square' | 'round';
|
||||
export type CheckerDirection = 'horizontal' | 'vertical';
|
||||
export type CheckerLabelPosition = 'left' | 'right';
|
||||
export type CheckerParent = {
|
||||
props: {
|
||||
max?: Numeric;
|
||||
shape?: CheckerShape | RadioShape;
|
||||
disabled?: boolean;
|
||||
iconSize?: Numeric;
|
||||
direction?: CheckerDirection;
|
||||
modelValue?: unknown | unknown[];
|
||||
checkedColor?: string;
|
||||
};
|
||||
};
|
||||
export declare const checkerProps: {
|
||||
name: PropType<unknown>;
|
||||
disabled: BooleanConstructor;
|
||||
iconSize: (NumberConstructor | StringConstructor)[];
|
||||
modelValue: PropType<unknown>;
|
||||
checkedColor: StringConstructor;
|
||||
labelPosition: PropType<CheckerLabelPosition>;
|
||||
labelDisabled: BooleanConstructor;
|
||||
};
|
||||
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
||||
name: PropType<unknown>;
|
||||
disabled: BooleanConstructor;
|
||||
iconSize: (NumberConstructor | StringConstructor)[];
|
||||
modelValue: PropType<unknown>;
|
||||
checkedColor: StringConstructor;
|
||||
labelPosition: PropType<CheckerLabelPosition>;
|
||||
labelDisabled: BooleanConstructor;
|
||||
} & {
|
||||
bem: {
|
||||
type: FunctionConstructor;
|
||||
required: true;
|
||||
};
|
||||
role: StringConstructor;
|
||||
shape: PropType<CheckerShape | RadioShape>;
|
||||
parent: PropType<CheckerParent | null>;
|
||||
checked: BooleanConstructor;
|
||||
bindGroup: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
indeterminate: {
|
||||
type: PropType<boolean | null>;
|
||||
default: null;
|
||||
};
|
||||
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "toggle")[], "click" | "toggle", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
||||
name: PropType<unknown>;
|
||||
disabled: BooleanConstructor;
|
||||
iconSize: (NumberConstructor | StringConstructor)[];
|
||||
modelValue: PropType<unknown>;
|
||||
checkedColor: StringConstructor;
|
||||
labelPosition: PropType<CheckerLabelPosition>;
|
||||
labelDisabled: BooleanConstructor;
|
||||
} & {
|
||||
bem: {
|
||||
type: FunctionConstructor;
|
||||
required: true;
|
||||
};
|
||||
role: StringConstructor;
|
||||
shape: PropType<CheckerShape | RadioShape>;
|
||||
parent: PropType<CheckerParent | null>;
|
||||
checked: BooleanConstructor;
|
||||
bindGroup: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
indeterminate: {
|
||||
type: PropType<boolean | null>;
|
||||
default: null;
|
||||
};
|
||||
}>> & Readonly<{
|
||||
onClick?: ((...args: any[]) => any) | undefined;
|
||||
onToggle?: ((...args: any[]) => any) | undefined;
|
||||
}>, {
|
||||
checked: boolean;
|
||||
disabled: boolean;
|
||||
labelDisabled: boolean;
|
||||
bindGroup: boolean;
|
||||
indeterminate: boolean | null;
|
||||
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
||||
export default _default;
|
||||
161
node_modules/vant/lib/checkbox/Checker.js
generated
vendored
Normal file
161
node_modules/vant/lib/checkbox/Checker.js
generated
vendored
Normal file
@@ -0,0 +1,161 @@
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var stdin_exports = {};
|
||||
__export(stdin_exports, {
|
||||
checkerProps: () => checkerProps,
|
||||
default: () => stdin_default
|
||||
});
|
||||
module.exports = __toCommonJS(stdin_exports);
|
||||
var import_vue = require("vue");
|
||||
var import_utils = require("../utils");
|
||||
var import_icon = require("../icon");
|
||||
const checkerProps = {
|
||||
name: import_utils.unknownProp,
|
||||
disabled: Boolean,
|
||||
iconSize: import_utils.numericProp,
|
||||
modelValue: import_utils.unknownProp,
|
||||
checkedColor: String,
|
||||
labelPosition: String,
|
||||
labelDisabled: Boolean
|
||||
};
|
||||
var stdin_default = (0, import_vue.defineComponent)({
|
||||
props: (0, import_utils.extend)({}, checkerProps, {
|
||||
bem: (0, import_utils.makeRequiredProp)(Function),
|
||||
role: String,
|
||||
shape: String,
|
||||
parent: Object,
|
||||
checked: Boolean,
|
||||
bindGroup: import_utils.truthProp,
|
||||
indeterminate: {
|
||||
type: Boolean,
|
||||
default: null
|
||||
}
|
||||
}),
|
||||
emits: ["click", "toggle"],
|
||||
setup(props, {
|
||||
emit,
|
||||
slots
|
||||
}) {
|
||||
const iconRef = (0, import_vue.ref)();
|
||||
const getParentProp = (name) => {
|
||||
if (props.parent && props.bindGroup) {
|
||||
return props.parent.props[name];
|
||||
}
|
||||
};
|
||||
const disabled = (0, import_vue.computed)(() => {
|
||||
if (props.parent && props.bindGroup) {
|
||||
const disabled2 = getParentProp("disabled") || props.disabled;
|
||||
if (props.role === "checkbox") {
|
||||
const checkedCount = getParentProp("modelValue").length;
|
||||
const max = getParentProp("max");
|
||||
const overlimit = max && checkedCount >= +max;
|
||||
return disabled2 || overlimit && !props.checked;
|
||||
}
|
||||
return disabled2;
|
||||
}
|
||||
return props.disabled;
|
||||
});
|
||||
const direction = (0, import_vue.computed)(() => getParentProp("direction"));
|
||||
const iconStyle = (0, import_vue.computed)(() => {
|
||||
const checkedColor = props.checkedColor || getParentProp("checkedColor");
|
||||
if (checkedColor && (props.checked || props.indeterminate) && !disabled.value) {
|
||||
return {
|
||||
borderColor: checkedColor,
|
||||
backgroundColor: checkedColor
|
||||
};
|
||||
}
|
||||
});
|
||||
const shape = (0, import_vue.computed)(() => {
|
||||
return props.shape || getParentProp("shape") || "round";
|
||||
});
|
||||
const onClick = (event) => {
|
||||
const {
|
||||
target
|
||||
} = event;
|
||||
const icon = iconRef.value;
|
||||
const iconClicked = icon === target || (icon == null ? void 0 : icon.contains(target));
|
||||
if (!disabled.value && (iconClicked || !props.labelDisabled)) {
|
||||
emit("toggle");
|
||||
}
|
||||
emit("click", event);
|
||||
};
|
||||
const renderIcon = () => {
|
||||
var _a, _b;
|
||||
const {
|
||||
bem,
|
||||
checked,
|
||||
indeterminate
|
||||
} = props;
|
||||
const iconSize = props.iconSize || getParentProp("iconSize");
|
||||
return (0, import_vue.createVNode)("div", {
|
||||
"ref": iconRef,
|
||||
"class": bem("icon", [shape.value, {
|
||||
disabled: disabled.value,
|
||||
checked,
|
||||
indeterminate
|
||||
}]),
|
||||
"style": shape.value !== "dot" ? {
|
||||
fontSize: (0, import_utils.addUnit)(iconSize)
|
||||
} : {
|
||||
width: (0, import_utils.addUnit)(iconSize),
|
||||
height: (0, import_utils.addUnit)(iconSize),
|
||||
borderColor: (_a = iconStyle.value) == null ? void 0 : _a.borderColor
|
||||
}
|
||||
}, [slots.icon ? slots.icon({
|
||||
checked,
|
||||
disabled: disabled.value
|
||||
}) : shape.value !== "dot" ? (0, import_vue.createVNode)(import_icon.Icon, {
|
||||
"name": indeterminate ? "minus" : "success",
|
||||
"style": iconStyle.value
|
||||
}, null) : (0, import_vue.createVNode)("div", {
|
||||
"class": bem("icon--dot__icon"),
|
||||
"style": {
|
||||
backgroundColor: (_b = iconStyle.value) == null ? void 0 : _b.backgroundColor
|
||||
}
|
||||
}, null)]);
|
||||
};
|
||||
const renderLabel = () => {
|
||||
const {
|
||||
checked
|
||||
} = props;
|
||||
if (slots.default) {
|
||||
return (0, import_vue.createVNode)("span", {
|
||||
"class": props.bem("label", [props.labelPosition, {
|
||||
disabled: disabled.value
|
||||
}])
|
||||
}, [slots.default({
|
||||
checked,
|
||||
disabled: disabled.value
|
||||
})]);
|
||||
}
|
||||
};
|
||||
return () => {
|
||||
const nodes = props.labelPosition === "left" ? [renderLabel(), renderIcon()] : [renderIcon(), renderLabel()];
|
||||
return (0, import_vue.createVNode)("div", {
|
||||
"role": props.role,
|
||||
"class": props.bem([{
|
||||
disabled: disabled.value,
|
||||
"label-disabled": props.labelDisabled
|
||||
}, direction.value]),
|
||||
"tabindex": disabled.value ? void 0 : 0,
|
||||
"aria-checked": props.checked,
|
||||
"onClick": onClick
|
||||
}, [nodes]);
|
||||
};
|
||||
}
|
||||
});
|
||||
1
node_modules/vant/lib/checkbox/index.css
generated
vendored
Normal file
1
node_modules/vant/lib/checkbox/index.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
:root,:host{--van-checkbox-size: 20px;--van-checkbox-border-color: var(--van-gray-5);--van-checkbox-duration: var(--van-duration-fast);--van-checkbox-label-margin: var(--van-padding-xs);--van-checkbox-label-color: var(--van-text-color);--van-checkbox-checked-icon-color: var(--van-primary-color);--van-checkbox-disabled-icon-color: var(--van-gray-5);--van-checkbox-disabled-label-color: var(--van-text-color-3);--van-checkbox-disabled-background: var(--van-border-color)}.van-checkbox{display:flex;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none}.van-checkbox--disabled{cursor:not-allowed}.van-checkbox--label-disabled{cursor:default}.van-checkbox--horizontal{margin-right:var(--van-padding-sm)}.van-checkbox__icon{flex:none;height:1em;font-size:var(--van-checkbox-size);line-height:1em;cursor:pointer}.van-checkbox__icon .van-icon{display:block;box-sizing:border-box;width:1.25em;height:1.25em;color:transparent;font-size:.8em;line-height:1.25;text-align:center;border:1px solid var(--van-checkbox-border-color);transition-duration:var(--van-checkbox-duration);transition-property:color,border-color,background-color}.van-checkbox__icon--round .van-icon{border-radius:100%}.van-checkbox__icon--indeterminate .van-icon{display:flex;align-items:center;justify-content:center;color:var(--van-white);border-color:var(--van-checkbox-checked-icon-color);background-color:var(--van-checkbox-checked-icon-color)}.van-checkbox__icon--checked .van-icon{color:var(--van-white);background-color:var(--van-checkbox-checked-icon-color);border-color:var(--van-checkbox-checked-icon-color)}.van-checkbox__icon--disabled{cursor:not-allowed}.van-checkbox__icon--disabled .van-icon{background-color:var(--van-checkbox-disabled-background);border-color:var(--van-checkbox-disabled-icon-color)}.van-checkbox__icon--disabled.van-checkbox__icon--checked .van-icon{color:var(--van-checkbox-disabled-icon-color)}.van-checkbox__label{margin-left:var(--van-checkbox-label-margin);color:var(--van-checkbox-label-color);line-height:var(--van-checkbox-size)}.van-checkbox__label--left{margin:0 var(--van-checkbox-label-margin) 0 0}.van-checkbox__label--disabled{color:var(--van-checkbox-disabled-label-color)}
|
||||
54
node_modules/vant/lib/checkbox/index.d.ts
generated
vendored
Normal file
54
node_modules/vant/lib/checkbox/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
export declare const Checkbox: import("../utils").WithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
||||
name: import("vue").PropType<unknown>;
|
||||
disabled: BooleanConstructor;
|
||||
iconSize: (NumberConstructor | StringConstructor)[];
|
||||
modelValue: import("vue").PropType<unknown>;
|
||||
checkedColor: StringConstructor;
|
||||
labelPosition: import("vue").PropType<import("./Checker").CheckerLabelPosition>;
|
||||
labelDisabled: BooleanConstructor;
|
||||
} & {
|
||||
shape: import("vue").PropType<import("./Checker").CheckerShape>;
|
||||
bindGroup: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
indeterminate: {
|
||||
type: import("vue").PropType<boolean | null>;
|
||||
default: null;
|
||||
};
|
||||
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
||||
name: import("vue").PropType<unknown>;
|
||||
disabled: BooleanConstructor;
|
||||
iconSize: (NumberConstructor | StringConstructor)[];
|
||||
modelValue: import("vue").PropType<unknown>;
|
||||
checkedColor: StringConstructor;
|
||||
labelPosition: import("vue").PropType<import("./Checker").CheckerLabelPosition>;
|
||||
labelDisabled: BooleanConstructor;
|
||||
} & {
|
||||
shape: import("vue").PropType<import("./Checker").CheckerShape>;
|
||||
bindGroup: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
indeterminate: {
|
||||
type: import("vue").PropType<boolean | null>;
|
||||
default: null;
|
||||
};
|
||||
}>> & Readonly<{
|
||||
onChange?: ((...args: any[]) => any) | undefined;
|
||||
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
||||
}>, {
|
||||
disabled: boolean;
|
||||
labelDisabled: boolean;
|
||||
bindGroup: boolean;
|
||||
indeterminate: boolean | null;
|
||||
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
||||
export default Checkbox;
|
||||
export { checkboxProps } from './Checkbox';
|
||||
export type { CheckboxProps } from './Checkbox';
|
||||
export type { CheckboxShape, CheckboxInstance, CheckboxThemeVars, CheckboxLabelPosition, } from './types';
|
||||
declare module 'vue' {
|
||||
interface GlobalComponents {
|
||||
VanCheckbox: typeof Checkbox;
|
||||
}
|
||||
}
|
||||
39
node_modules/vant/lib/checkbox/index.js
generated
vendored
Normal file
39
node_modules/vant/lib/checkbox/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, {
|
||||
Checkbox: () => Checkbox,
|
||||
checkboxProps: () => import_Checkbox2.checkboxProps,
|
||||
default: () => stdin_default
|
||||
});
|
||||
module.exports = __toCommonJS(stdin_exports);
|
||||
var import_utils = require("../utils");
|
||||
var import_Checkbox = __toESM(require("./Checkbox"));
|
||||
var import_Checkbox2 = require("./Checkbox");
|
||||
const Checkbox = (0, import_utils.withInstall)(import_Checkbox.default);
|
||||
var stdin_default = Checkbox;
|
||||
1
node_modules/vant/lib/checkbox/style/index.d.ts
generated
vendored
Normal file
1
node_modules/vant/lib/checkbox/style/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
5
node_modules/vant/lib/checkbox/style/index.js
generated
vendored
Normal file
5
node_modules/vant/lib/checkbox/style/index.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
require("../../style/base.css");
|
||||
require("../../badge/index.css");
|
||||
require("../../icon/index.css");
|
||||
require("../../checkbox-group/index.css");
|
||||
require("../index.css");
|
||||
24
node_modules/vant/lib/checkbox/types.d.ts
generated
vendored
Normal file
24
node_modules/vant/lib/checkbox/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import type { ComponentPublicInstance, ComputedRef } from 'vue';
|
||||
import type { CheckboxProps } from './Checkbox';
|
||||
import type { CheckerShape, CheckerLabelPosition } from './Checker';
|
||||
export type CheckboxShape = CheckerShape;
|
||||
export type CheckboxLabelPosition = CheckerLabelPosition;
|
||||
export type CheckboxExpose = {
|
||||
toggle: (newValue?: boolean) => void;
|
||||
/** @private */
|
||||
props: CheckboxProps;
|
||||
/** @private */
|
||||
checked: ComputedRef<boolean>;
|
||||
};
|
||||
export type CheckboxInstance = ComponentPublicInstance<CheckboxProps, CheckboxExpose>;
|
||||
export type CheckboxThemeVars = {
|
||||
checkboxSize?: string;
|
||||
checkboxBorderColor?: string;
|
||||
checkboxDuration?: string;
|
||||
checkboxLabelMargin?: string;
|
||||
checkboxLabelColor?: string;
|
||||
checkboxCheckedIconColor?: string;
|
||||
checkboxDisabledIconColor?: string;
|
||||
checkboxDisabledLabelColor?: string;
|
||||
checkboxDisabledBackground?: string;
|
||||
};
|
||||
15
node_modules/vant/lib/checkbox/types.js
generated
vendored
Normal file
15
node_modules/vant/lib/checkbox/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