Socket
Socket
Sign inDemoInstall

@idux/components

Package Overview
Dependencies
31
Maintainers
2
Versions
115
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0-alpha.5 to 1.0.0-alpha.6

_private/loading/index.d.ts

16

_private/footer/index.d.ts

@@ -8,8 +8,8 @@ declare const ɵFooter: import("vue").DefineComponent<{

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("../../button").ButtonShape | undefined;
size?: import("../../button").ButtonSize | undefined;
shape?: import("../../button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -30,8 +30,8 @@ cancelLoading: import("vue-types").VueTypeValidableDef<boolean>;

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("../../button").ButtonShape | undefined;
size?: import("../../button").ButtonSize | undefined;
shape?: import("../../button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -47,8 +47,8 @@ okLoading: import("vue-types").VueTypeValidableDef<boolean>;

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("../../button").ButtonShape | undefined;
size?: import("../../button").ButtonSize | undefined;
shape?: import("../../button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -69,8 +69,8 @@ cancelLoading: import("vue-types").VueTypeValidableDef<boolean>;

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("../../button").ButtonShape | undefined;
size?: import("../../button").ButtonSize | undefined;
shape?: import("../../button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -77,0 +77,0 @@ okLoading: import("vue-types").VueTypeValidableDef<boolean>;

@@ -9,8 +9,8 @@ import type { FooterButtonProps } from './types';

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("@idux/components/button").ButtonShape | undefined;
size?: import("@idux/components/button").ButtonSize | undefined;
shape?: import("@idux/components/button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -31,8 +31,8 @@ cancelLoading: import("vue-types").VueTypeValidableDef<boolean>;

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("@idux/components/button").ButtonShape | undefined;
size?: import("@idux/components/button").ButtonSize | undefined;
shape?: import("@idux/components/button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -48,8 +48,8 @@ okLoading: import("vue-types").VueTypeValidableDef<boolean>;

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("@idux/components/button").ButtonShape | undefined;
size?: import("@idux/components/button").ButtonSize | undefined;
shape?: import("@idux/components/button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -70,8 +70,8 @@ cancelLoading: import("vue-types").VueTypeValidableDef<boolean>;

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("@idux/components/button").ButtonShape | undefined;
size?: import("@idux/components/button").ButtonSize | undefined;
shape?: import("@idux/components/button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -78,0 +78,0 @@ okLoading: import("vue-types").VueTypeValidableDef<boolean>;

@@ -16,8 +16,8 @@ import type { IxInnerPropTypes, IxPublicPropTypes, VKey } from '@idux/cdk/utils';

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("@idux/components/button").ButtonShape | undefined;
size?: import("@idux/components/button").ButtonSize | undefined;
shape?: import("@idux/components/button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -38,8 +38,8 @@ cancelLoading: import("vue-types").VueTypeValidableDef<boolean>;

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("@idux/components/button").ButtonShape | undefined;
size?: import("@idux/components/button").ButtonSize | undefined;
shape?: import("@idux/components/button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -46,0 +46,0 @@ okLoading: import("vue-types").VueTypeValidableDef<boolean>;

import { defineComponent, computed, inject, normalizeClass, createVNode, provide } from "vue";
import { IxPropTypes, hasSlot } from "@idux/cdk/utils";
import { useGlobalConfig } from "@idux/components/config";
import { FORM_TOKEN } from "@idux/components/form";
import { IxIcon } from "@idux/components/icon";
import { IxPropTypes } from "@idux/cdk/utils";
const buttonToken = Symbol("button");

@@ -38,3 +38,2 @@ const buttonProps = {

});
const hasDefaultSlot = computed(() => hasSlot(slots));
const size = computed(() => {

@@ -62,3 +61,3 @@ var _a, _b, _c;

[`${prefixCls}-loading`]: loading,
[`${prefixCls}-icon-only`]: !hasDefaultSlot.value && (icon || loading),
[`${prefixCls}-icon-only`]: !slots.default && (icon || loading),
[`${prefixCls}-${mode.value}`]: mode.value !== "default",

@@ -113,8 +112,5 @@ [`${prefixCls}-${shape}`]: !!shape,

provide(buttonToken, props);
return () => {
var _a;
return createVNode("div", {
"class": mergedPrefixCls.value
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
};
return () => createVNode("div", {
"class": mergedPrefixCls.value
}, [slots.default && slots.default()]);
}

@@ -121,0 +117,0 @@ });

@@ -1,2 +0,2 @@

import { defineComponent, computed, provide, createVNode, isVNode, inject } from "vue";
import { defineComponent, computed, provide, normalizeClass, createVNode, isVNode, inject } from "vue";
import { isString } from "lodash-es";

@@ -67,3 +67,3 @@ import { \u0275Header } from "@idux/components/_private/header";

const prefixCls = mergedPrefixCls.value;
return {
return normalizeClass({
[prefixCls]: true,

@@ -75,3 +75,3 @@ [`${prefixCls}-borderless`]: borderless,

[`${prefixCls}-${size}`]: true
};
});
});

@@ -126,3 +126,3 @@ return () => {

default: () => [createVNode("div", {
"class": "ix-card-loading-block"
"class": `${prefixCls}-loading-block`
}, null)]

@@ -135,3 +135,3 @@ }));

return createVNode("div", {
"class": "ix-card-loading"
"class": `${prefixCls}-loading`
}, [loadingChild]);

@@ -182,6 +182,6 @@ };

const prefixCls = mergedPrefixCls.value;
return {
return normalizeClass({
[prefixCls]: true,
[`${prefixCls}-hoverable`]: (_a = props.hoverable) != null ? _a : hoverable.value
};
});
});

@@ -188,0 +188,0 @@ return () => createVNode(IxCol, {

@@ -11,2 +11,3 @@ import type { VNode } from 'vue';

disabled?: boolean | undefined;
description?: string | undefined;
size?: import("../../header/src/types").HeaderSize | undefined;

@@ -19,6 +20,6 @@ avatar?: string | {

}> | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("../../avatar").AvatarShape | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;

@@ -52,2 +53,3 @@ srcset?: string | undefined;

disabled?: boolean | undefined;
description?: string | undefined;
size?: import("../../header/src/types").HeaderSize | undefined;

@@ -60,6 +62,6 @@ avatar?: string | {

}> | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("../../avatar").AvatarShape | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;

@@ -66,0 +68,0 @@ srcset?: string | undefined;

@@ -24,2 +24,3 @@ import type { IxInnerPropTypes, IxPublicPropTypes } from '@idux/cdk/utils';

disabled?: boolean | undefined;
description?: string | undefined;
size?: import("../../header/src/types").HeaderSize | undefined;

@@ -32,6 +33,6 @@ avatar?: string | {

}> | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("../../avatar").AvatarShape | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;

@@ -38,0 +39,0 @@ srcset?: string | undefined;

@@ -5,2 +5,2 @@ import type { CheckboxComponent, CheckboxGroupComponent } from './src/types';

export { IxCheckbox, IxCheckboxGroup };
export type { CheckboxInstance, CheckboxComponent, CheckboxPublicProps as CheckboxProps, CheckboxGroupInstance, CheckboxGroupComponent, CheckboxGroupPublicProps as CheckboxGroupProps, CheckboxOption, } from './src/types';
export type { CheckboxInstance, CheckboxComponent, CheckboxPublicProps as CheckboxProps, CheckboxGroupInstance, CheckboxGroupComponent, CheckboxGroupPublicProps as CheckboxGroupProps, CheckboxData, } from './src/types';
import { defineComponent, computed, inject, normalizeClass, createVNode, mergeProps, ref, provide } from "vue";
import { IxPropTypes, callEmit, convertCssPixel } from "@idux/cdk/utils";
import { IxPropTypes, callEmit, convertCssPixel, Logger } from "@idux/cdk/utils";
import { useGlobalConfig } from "@idux/components/config";
import { FORM_TOKEN } from "@idux/components/form";
import { useFormElement, useFormAccessor } from "@idux/components/utils";
import { useFormElement, covertStringVNode, useFormAccessor } from "@idux/components/utils";
import { controlPropDef } from "@idux/cdk/forms";
import { isNil } from "lodash-es";
const checkboxGroupToken = Symbol("checkboxGroupToken");
const checkboxProps = {
control: controlPropDef,
checked: IxPropTypes.oneOfType([String, Number, Boolean]),
control: controlPropDef,
autofocus: IxPropTypes.bool.def(false),

@@ -27,5 +26,6 @@ buttoned: IxPropTypes.bool,

const checkboxGroupProps = {
control: controlPropDef,
value: IxPropTypes.array(),
control: controlPropDef,
buttoned: IxPropTypes.bool.def(false),
dataSource: IxPropTypes.array(),
disabled: IxPropTypes.bool.def(false),

@@ -115,4 +115,2 @@ gap: IxPropTypes.oneOfType([Number, String]),

return () => {
var _a, _b;
const prefixCls = mergedPrefixCls.value;
const {

@@ -123,7 +121,3 @@ autofocus,

} = props;
const labelNode = (_b = (_a = slots.default) == null ? void 0 : _a.call(slots)) != null ? _b : label;
const labelWrapper = labelNode && createVNode("span", {
"class": `${prefixCls}-label`
}, [labelNode]);
const _c = attrs, {
const _a = attrs, {
class: className,

@@ -133,3 +127,3 @@ style,

tabindex
} = _c, restAttrs = __objRest(_c, [
} = _a, restAttrs = __objRest(_a, [
"class",

@@ -140,2 +134,4 @@ "style",

]);
const prefixCls = mergedPrefixCls.value;
const labelNode = covertStringVNode(slots.default, label);
return createVNode("label", {

@@ -166,3 +162,5 @@ "class": classes.value,

"tabindex": tabindex
}, null)]), labelWrapper, isButtoned.value && createVNode("span", {
}, null)]), labelNode && createVNode("span", {
"class": `${prefixCls}-label`
}, [labelNode]), isButtoned.value && createVNode("span", {
"class": `${prefixCls}-button-tick`,

@@ -193,3 +191,6 @@ "tabindex": tabindex

});
isDisabled = computed(() => accessor.disabled.value);
isDisabled = computed(() => {
var _a;
return (_a = accessor.disabled.value) != null ? _a : !!props.disabled;
});
handleBlur = (evt) => {

@@ -203,14 +204,19 @@ isFocused.value = false;

const checked = evt.target.checked;
const checkValue = checked ? props.trueValue : props.falseValue;
const value = props.value;
const groupCheckedValue = [...(_a = accessor.valueRef.value) != null ? _a : []];
const checkValueIndex = groupCheckedValue.indexOf(value);
const {
trueValue,
falseValue,
value
} = props;
const checkValue = checked ? trueValue : falseValue;
const oldValue = (_a = accessor.valueRef.value) != null ? _a : [];
const newValue = [...oldValue];
const checkValueIndex = newValue.indexOf(value);
if (checkValueIndex === -1) {
groupCheckedValue.push(value);
newValue.push(value);
} else {
groupCheckedValue.splice(checkValueIndex, 1);
newValue.splice(checkValueIndex, 1);
}
accessor.setValue(groupCheckedValue);
callEmit(props.onChange, checkValue);
callEmit(groupProps.onChange, groupCheckedValue);
accessor.setValue(newValue);
callEmit(props.onChange, checkValue, !checkValue);
callEmit(groupProps.onChange, newValue, oldValue);
};

@@ -228,5 +234,9 @@ } else {

const checked = evt.target.checked;
const checkValue = checked ? props.trueValue : props.falseValue;
accessor.setValue(checkValue);
callEmit(props.onChange, checkValue);
const {
trueValue,
falseValue
} = props;
const newChecked = checked ? trueValue : falseValue;
accessor.setValue(newChecked);
callEmit(props.onChange, newChecked, !newChecked);
};

@@ -249,2 +259,4 @@ }

}) {
const common = useGlobalConfig("common");
const mergedPrefixCls = computed(() => `${common.prefixCls}-checkbox-group`);
const accessor = useFormAccessor();

@@ -255,4 +267,2 @@ provide(checkboxGroupToken, {

});
const common = useGlobalConfig("common");
const mergedPrefixCls = computed(() => `${common.prefixCls}-checkbox-group`);
const classes = computed(() => {

@@ -263,6 +273,6 @@ const {

const prefixCls = mergedPrefixCls.value;
return {
return normalizeClass({
[prefixCls]: true,
[`${prefixCls}-with-gap`]: !isNil(gap)
};
[`${prefixCls}-with-gap`]: gap != null
});
});

@@ -273,11 +283,19 @@ const style = computed(() => {

} = props;
return gap !== 0 ? `gap: ${convertCssPixel(gap)};` : void 0;
return gap != null ? `gap: ${convertCssPixel(gap)};` : void 0;
});
return () => {
var _a;
const child = props.options ? props.options.map((option) => createVNode(Checkbox, option, null)) : (_a = slots.default) == null ? void 0 : _a.call(slots);
const {
options,
dataSource
} = props;
if (options) {
Logger.warn("components/checkbox", "`options` was deprecated, please use `dataSource` instead");
}
const data = options != null ? options : dataSource;
const children = data ? data.map((item) => createVNode(Checkbox, item, null)) : (_a = slots.default) == null ? void 0 : _a.call(slots);
return createVNode("div", {
"class": classes.value,
"style": style.value
}, [child]);
}, [children]);
};

@@ -284,0 +302,0 @@ }

@@ -1,5 +0,5 @@

import type { CheckValue } from './types';
import { type CheckValue } from './types';
declare const _default: import("vue").DefineComponent<{
control: import("vue").PropType<string | number | import("../../../cdk/forms").AbstractControl<any>>;
checked: import("vue-types").VueTypeDef<string | number | boolean>;
control: import("vue").PropType<string | number | import("../../../cdk/forms").AbstractControl<any>>;
autofocus: import("vue-types").VueTypeValidableDef<boolean> & {

@@ -23,8 +23,8 @@ default: boolean;

'onUpdate:checked': import("vue-types").VueTypeDef<((checked: CheckValue) => void) | ((checked: CheckValue) => void)[]>;
onChange: import("vue-types").VueTypeDef<((checked: CheckValue) => void) | ((checked: CheckValue) => void)[]>;
onChange: import("vue-types").VueTypeDef<((newChecked: CheckValue, oldChecked: CheckValue) => void) | ((newChecked: CheckValue, oldChecked: CheckValue) => void)[]>;
onBlur: import("vue-types").VueTypeDef<((evt: FocusEvent) => void) | ((evt: FocusEvent) => void)[]>;
onFocus: import("vue-types").VueTypeDef<((evt: FocusEvent) => void) | ((evt: FocusEvent) => void)[]>;
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
control: import("vue").PropType<string | number | import("../../../cdk/forms").AbstractControl<any>>;
checked: import("vue-types").VueTypeDef<string | number | boolean>;
control: import("vue").PropType<string | number | import("../../../cdk/forms").AbstractControl<any>>;
autofocus: import("vue-types").VueTypeValidableDef<boolean> & {

@@ -48,3 +48,3 @@ default: boolean;

'onUpdate:checked': import("vue-types").VueTypeDef<((checked: CheckValue) => void) | ((checked: CheckValue) => void)[]>;
onChange: import("vue-types").VueTypeDef<((checked: CheckValue) => void) | ((checked: CheckValue) => void)[]>;
onChange: import("vue-types").VueTypeDef<((newChecked: CheckValue, oldChecked: CheckValue) => void) | ((newChecked: CheckValue, oldChecked: CheckValue) => void)[]>;
onBlur: import("vue-types").VueTypeDef<((evt: FocusEvent) => void) | ((evt: FocusEvent) => void)[]>;

@@ -51,0 +51,0 @@ onFocus: import("vue-types").VueTypeDef<((evt: FocusEvent) => void) | ((evt: FocusEvent) => void)[]>;

declare const _default: import("vue").DefineComponent<{
control: import("vue").PropType<string | number | import("../../../cdk/forms").AbstractControl<any>>;
value: import("vue-types").VueTypeValidableDef<unknown[]>;
control: import("vue").PropType<string | number | import("../../../cdk/forms").AbstractControl<any>>;
buttoned: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
dataSource: import("vue-types").VueTypeValidableDef<import("./types").CheckboxData[]>;
disabled: import("vue-types").VueTypeValidableDef<boolean> & {

@@ -12,3 +13,3 @@ default: boolean;

name: import("vue-types").VueTypeValidableDef<string>;
options: import("vue-types").VueTypeValidableDef<import("./types").CheckboxOption[]>;
options: import("vue-types").VueTypeValidableDef<import("./types").CheckboxData[]>;
size: import("vue-types").VueTypeDef<string> & {

@@ -18,9 +19,10 @@ default: string;

'onUpdate:value': import("vue-types").VueTypeDef<((value: any[]) => void) | ((value: any[]) => void)[]>;
onChange: import("vue-types").VueTypeDef<((value: any[]) => void) | ((value: any[]) => void)[]>;
onChange: import("vue-types").VueTypeDef<((newValue: any[], oldValue: any[]) => void) | ((newValue: any[], oldValue: any[]) => void)[]>;
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
control: import("vue").PropType<string | number | import("../../../cdk/forms").AbstractControl<any>>;
value: import("vue-types").VueTypeValidableDef<unknown[]>;
control: import("vue").PropType<string | number | import("../../../cdk/forms").AbstractControl<any>>;
buttoned: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
dataSource: import("vue-types").VueTypeValidableDef<import("./types").CheckboxData[]>;
disabled: import("vue-types").VueTypeValidableDef<boolean> & {

@@ -31,3 +33,3 @@ default: boolean;

name: import("vue-types").VueTypeValidableDef<string>;
options: import("vue-types").VueTypeValidableDef<import("./types").CheckboxOption[]>;
options: import("vue-types").VueTypeValidableDef<import("./types").CheckboxData[]>;
size: import("vue-types").VueTypeDef<string> & {

@@ -37,3 +39,3 @@ default: string;

'onUpdate:value': import("vue-types").VueTypeDef<((value: any[]) => void) | ((value: any[]) => void)[]>;
onChange: import("vue-types").VueTypeDef<((value: any[]) => void) | ((value: any[]) => void)[]>;
onChange: import("vue-types").VueTypeDef<((newValue: any[], oldValue: any[]) => void) | ((newValue: any[], oldValue: any[]) => void)[]>;
}>>, {

@@ -40,0 +42,0 @@ disabled: boolean;

@@ -1,9 +0,7 @@

import type { IxInnerPropTypes, IxPublicPropTypes } from '@idux/cdk/utils';
import type { IxInnerPropTypes, IxPublicPropTypes, VKey } from '@idux/cdk/utils';
import type { DefineComponent, HTMLAttributes, LabelHTMLAttributes } from 'vue';
import { FormSize } from '@idux/components/form';
export declare type CheckValue = string | number | boolean;
export declare type CheckboxOption = Omit<CheckboxPublicProps, 'checked' | 'onUpdate:checked' | 'onChange' | 'indeterminate'>;
export declare const checkboxProps: {
control: import("vue").PropType<string | number | import("@idux/cdk/forms").AbstractControl<any>>;
checked: import("vue-types").VueTypeDef<string | number | boolean>;
control: import("vue").PropType<string | number | import("@idux/cdk/forms").AbstractControl<any>>;
autofocus: import("vue-types").VueTypeValidableDef<boolean> & {

@@ -27,3 +25,3 @@ default: boolean;

'onUpdate:checked': import("vue-types").VueTypeDef<((checked: CheckValue) => void) | ((checked: CheckValue) => void)[]>;
onChange: import("vue-types").VueTypeDef<((checked: CheckValue) => void) | ((checked: CheckValue) => void)[]>;
onChange: import("vue-types").VueTypeDef<((newChecked: CheckValue, oldChecked: CheckValue) => void) | ((newChecked: CheckValue, oldChecked: CheckValue) => void)[]>;
onBlur: import("vue-types").VueTypeDef<((evt: FocusEvent) => void) | ((evt: FocusEvent) => void)[]>;

@@ -41,7 +39,8 @@ onFocus: import("vue-types").VueTypeDef<((evt: FocusEvent) => void) | ((evt: FocusEvent) => void)[]>;

export declare const checkboxGroupProps: {
control: import("vue").PropType<string | number | import("@idux/cdk/forms").AbstractControl<any>>;
value: import("vue-types").VueTypeValidableDef<unknown[]>;
control: import("vue").PropType<string | number | import("@idux/cdk/forms").AbstractControl<any>>;
buttoned: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
dataSource: import("vue-types").VueTypeValidableDef<CheckboxData[]>;
disabled: import("vue-types").VueTypeValidableDef<boolean> & {

@@ -52,3 +51,3 @@ default: boolean;

name: import("vue-types").VueTypeValidableDef<string>;
options: import("vue-types").VueTypeValidableDef<CheckboxOption[]>;
options: import("vue-types").VueTypeValidableDef<CheckboxData[]>;
size: import("vue-types").VueTypeDef<string> & {

@@ -58,3 +57,3 @@ default: string;

'onUpdate:value': import("vue-types").VueTypeDef<((value: any[]) => void) | ((value: any[]) => void)[]>;
onChange: import("vue-types").VueTypeDef<((value: any[]) => void) | ((value: any[]) => void)[]>;
onChange: import("vue-types").VueTypeDef<((newValue: any[], oldValue: any[]) => void) | ((newValue: any[], oldValue: any[]) => void)[]>;
};

@@ -65,1 +64,5 @@ export declare type CheckboxGroupProps = IxInnerPropTypes<typeof checkboxGroupProps>;

export declare type CheckboxGroupInstance = InstanceType<DefineComponent<CheckboxGroupProps>>;
export declare type CheckValue = string | number | boolean;
export interface CheckboxData extends CheckboxPublicProps {
key?: VKey;
}

@@ -1,2 +0,2 @@

import { defineComponent, computed, provide, createVNode, inject, withDirectives, vShow, mergeProps } from "vue";
import { defineComponent, computed, provide, normalizeClass, createVNode, inject, withDirectives, vShow, mergeProps } from "vue";
import { IxPropTypes, useControlledProp, getFirstValidNode } from "@idux/cdk/utils";

@@ -67,7 +67,7 @@ import { useGlobalConfig } from "@idux/components/config";

const prefixCls = mergedPrefixCls.value;
return {
return normalizeClass({
[prefixCls]: true,
[`${prefixCls}-borderless`]: borderless.value,
[`${prefixCls}-ghost`]: ghost.value
};
});
});

@@ -100,7 +100,7 @@ return () => {

const prefixCls = mergedPrefixCls.value;
return {
return normalizeClass({
[`${prefixCls}`]: true,
[`${prefixCls}-disabled`]: props.disabled,
[`${prefixCls}-expanded`]: isExpanded.value
};
});
});

@@ -107,0 +107,0 @@ const handleClick = () => {

@@ -11,2 +11,3 @@ declare const _default: import("vue").DefineComponent<{

disabled?: boolean | undefined;
description?: string | undefined;
size?: import("../../header/src/types").HeaderSize | undefined;

@@ -19,6 +20,6 @@ avatar?: string | {

}> | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("../../avatar").AvatarShape | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;

@@ -45,2 +46,3 @@ srcset?: string | undefined;

disabled?: boolean | undefined;
description?: string | undefined;
size?: import("../../header/src/types").HeaderSize | undefined;

@@ -53,6 +55,6 @@ avatar?: string | {

}> | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("../../avatar").AvatarShape | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;

@@ -59,0 +61,0 @@ srcset?: string | undefined;

@@ -25,2 +25,3 @@ import type { IxInnerPropTypes, IxPublicPropTypes, VKey } from '@idux/cdk/utils';

disabled?: boolean | undefined;
description?: string | undefined;
size?: import("../../header/src/types").HeaderSize | undefined;

@@ -33,6 +34,6 @@ avatar?: string | {

}> | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("../../avatar").AvatarShape | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;

@@ -39,0 +40,0 @@ srcset?: string | undefined;

@@ -185,7 +185,7 @@ import { inject, reactive, provide } from "vue";

dashed: false,
labelPlacement: "center",
plain: false,
position: "center",
type: "horizontal"
size: "md"
};
const space = { size: "sm", wrap: true };
const space = { size: "md", wrap: true };
const row = { wrap: true };

@@ -386,6 +386,6 @@ const dropdown = {

icon: {
success: "check-circle",
error: "close-circle",
info: "info-circle",
warning: "exclamation-circle",
success: "check-circle-filled",
error: "close-circle-filled",
info: "info-circle-filled",
warning: "exclamation-circle-filled",
loading: "loading"

@@ -439,6 +439,5 @@ }

const spin = {
icon: "loading",
tip: "",
tipAlign: "vertical",
size: "sm"
size: "md"
};

@@ -458,2 +457,4 @@ const popconfirm = {

const stepper = {
clickable: false,
labelPlacement: "end",
size: "md"

@@ -460,0 +461,0 @@ };

@@ -9,3 +9,2 @@ import type { BreakpointKey } from '@idux/cdk/breakpoint';

import type { DatePickerType } from '@idux/components/date-picker/src/types';
import type { DividerPosition, DividerType } from '@idux/components/divider';
import type { FormLabelAlign, FormLayout, FormSize } from '@idux/components/form';

@@ -22,3 +21,3 @@ import type { ListSize } from '@idux/components/list';

import type { SpinSize, SpinTipAlignType } from '@idux/components/spin';
import type { StepperSize } from '@idux/components/stepper';
import type { StepperLabelPlacement, StepperSize } from '@idux/components/stepper';
import type { TableColumnAlign, TableColumnSortOrder, TablePaginationPosition, TableSize } from '@idux/components/table';

@@ -41,4 +40,4 @@ import type { TagShape } from '@idux/components/tag';

plain: boolean;
position: DividerPosition;
type: DividerType;
labelPlacement: 'start' | 'center' | 'end';
size: 'sm' | 'md' | 'lg';
}

@@ -332,6 +331,8 @@ export interface SpaceConfig {

export interface SpinConfig {
icon: string;
icon?: string;
tip: string;
tipAlign: SpinTipAlignType;
size: SpinSize;
strokeWidth?: Partial<Record<SpinSize, number>>;
radius?: Partial<Record<SpinSize, number>>;
}

@@ -355,2 +356,4 @@ export interface PopconfirmConfig {

export interface StepperConfig {
clickable: boolean;
labelPlacement: StepperLabelPlacement;
size: StepperSize;

@@ -357,0 +360,0 @@ }

import type { DividerComponent } from './src/types';
declare const IxDivider: DividerComponent;
export { IxDivider };
export type { DividerInstance, DividerComponent, DividerPublicProps as DividerProps, DividerPosition, DividerType, } from './src/types';
export type { DividerInstance, DividerComponent, DividerPublicProps as DividerProps } from './src/types';

@@ -1,9 +0,14 @@

import { defineComponent, computed, createVNode } from "vue";
import { IxPropTypes, hasSlot } from "@idux/cdk/utils";
import { defineComponent, computed, normalizeClass, createVNode } from "vue";
import { IxPropTypes, Logger } from "@idux/cdk/utils";
import { useGlobalConfig } from "@idux/components/config";
import { covertStringVNode } from "@idux/components/utils";
const dividerProps = {
dashed: IxPropTypes.bool,
label: IxPropTypes.string,
labelPlacement: IxPropTypes.oneOf(["start", "center", "end"]),
plain: IxPropTypes.bool,
position: IxPropTypes.oneOf(["left", "center", "right"]),
type: IxPropTypes.oneOf(["horizontal", "vertical"])
size: IxPropTypes.oneOf(["sm", "md", "lg"]),
type: IxPropTypes.oneOf(["horizontal", "vertical"]),
vertical: IxPropTypes.bool
};

@@ -18,33 +23,41 @@ var Divider = defineComponent({

const mergedPrefixCls = computed(() => `${common.prefixCls}-divider`);
const dividerConfig = useGlobalConfig("divider");
const withText = computed(() => hasSlot(slots));
const className = useClassName(props, dividerConfig, withText, mergedPrefixCls);
const config = useGlobalConfig("divider");
const classes = computed(() => {
const {
dashed = config.dashed,
label,
labelPlacement = config.labelPlacement,
plain = config.plain,
position,
size = config.size,
type,
vertical
} = props;
process.env.NODE_ENV !== "production" && position && Logger.warn("components/divider", "`position` was deprecated, please use `labelPlacement` instead");
process.env.NODE_ENV !== "production" && type && Logger.warn("components/divider", "`type` was deprecated, please use `vertical` instead");
const withLabel = !!label || !!slots.default;
const prefixCls = mergedPrefixCls.value;
return normalizeClass({
[`${prefixCls}`]: true,
[`${prefixCls}-${size}`]: true,
[`${prefixCls}-dashed`]: dashed,
[`${prefixCls}-horizontal`]: !(type === "vertical" || vertical),
[`${prefixCls}-vertical`]: type === "vertical" || vertical,
[`${prefixCls}-plain`]: withLabel && plain,
[`${prefixCls}-with-label`]: withLabel,
[`${prefixCls}-with-label-${position || labelPlacement}`]: withLabel
});
});
return () => {
var _a;
const prefixCls = mergedPrefixCls.value;
const labelNode = covertStringVNode(slots.default, props.label);
return createVNode("div", {
"class": className.value
}, [withText.value && createVNode("span", {
"class": `${prefixCls}-inner-text`
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
"class": classes.value
}, [labelNode && createVNode("span", {
"class": `${prefixCls}-label`
}, [labelNode])]);
};
}
});
function useClassName(props, config, withText, mergedPrefixCls) {
return computed(() => {
const prefixCls = mergedPrefixCls.value;
const position = props.position || config.position;
const type = props.type || config.type;
const dashed = props.dashed || config.dashed;
const plain = props.plain || config.plain;
return [`${prefixCls}-${type}`, {
[`${prefixCls}`]: true,
[`${prefixCls}-with-text`]: withText.value,
[`${prefixCls}-dashed`]: dashed,
[`${prefixCls}-plain`]: plain && withText.value,
[`${prefixCls}-with-text-${position}`]: type === "horizontal" && withText.value
}];
});
}
const IxDivider = Divider;
export { IxDivider };
declare const _default: import("vue").DefineComponent<{
dashed: import("vue-types").VueTypeValidableDef<boolean>;
label: import("vue-types").VueTypeValidableDef<string>;
labelPlacement: import("vue-types").VueTypeDef<"start" | "end" | "center">;
plain: import("vue-types").VueTypeValidableDef<boolean>;
position: import("vue-types").VueTypeDef<import("./types").DividerPosition>;
type: import("vue-types").VueTypeDef<import("./types").DividerType>;
position: import("vue-types").VueTypeDef<"right" | "left" | "center">;
size: import("vue-types").VueTypeDef<"sm" | "md" | "lg">;
type: import("vue-types").VueTypeDef<"vertical" | "horizontal">;
vertical: import("vue-types").VueTypeValidableDef<boolean>;
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
dashed: import("vue-types").VueTypeValidableDef<boolean>;
label: import("vue-types").VueTypeValidableDef<string>;
labelPlacement: import("vue-types").VueTypeDef<"start" | "end" | "center">;
plain: import("vue-types").VueTypeValidableDef<boolean>;
position: import("vue-types").VueTypeDef<import("./types").DividerPosition>;
type: import("vue-types").VueTypeDef<import("./types").DividerType>;
position: import("vue-types").VueTypeDef<"right" | "left" | "center">;
size: import("vue-types").VueTypeDef<"sm" | "md" | "lg">;
type: import("vue-types").VueTypeDef<"vertical" | "horizontal">;
vertical: import("vue-types").VueTypeValidableDef<boolean>;
}>>, {}>;
export default _default;

@@ -1,10 +0,12 @@

import type { IxInnerPropTypes, IxPublicPropTypes } from '@idux/cdk/utils';
import type { DefineComponent, HTMLAttributes } from 'vue';
export declare type DividerPosition = 'left' | 'center' | 'right';
export declare type DividerType = 'horizontal' | 'vertical';
import { type DefineComponent, type HTMLAttributes } from 'vue';
import { type IxInnerPropTypes, type IxPublicPropTypes } from '@idux/cdk/utils';
export declare const dividerProps: {
dashed: import("vue-types").VueTypeValidableDef<boolean>;
label: import("vue-types").VueTypeValidableDef<string>;
labelPlacement: import("vue-types").VueTypeDef<"start" | "end" | "center">;
plain: import("vue-types").VueTypeValidableDef<boolean>;
position: import("vue-types").VueTypeDef<DividerPosition>;
type: import("vue-types").VueTypeDef<DividerType>;
position: import("vue-types").VueTypeDef<"right" | "left" | "center">;
size: import("vue-types").VueTypeDef<"sm" | "md" | "lg">;
type: import("vue-types").VueTypeDef<"vertical" | "horizontal">;
vertical: import("vue-types").VueTypeValidableDef<boolean>;
};

@@ -11,0 +13,0 @@ export declare type DividerProps = IxInnerPropTypes<typeof dividerProps>;

@@ -1,2 +0,2 @@

import { defineComponent, inject, computed, ref, onMounted, createVNode, Transition, withDirectives, mergeProps, vShow, watch, onBeforeUnmount, provide, isVNode, cloneVNode, Fragment, shallowRef } from "vue";
import { defineComponent, inject, computed, normalizeClass, ref, onMounted, createVNode, Transition, withDirectives, mergeProps, vShow, watch, onBeforeUnmount, provide, isVNode, cloneVNode, Fragment, shallowRef } from "vue";
import { \u0275PortalTargetDef, CdkPortal } from "@idux/cdk/portal";

@@ -113,3 +113,3 @@ import { BlockScrollStrategy } from "@idux/cdk/scroll";

const prefixCls = mergedPrefixCls.value;
return {
return normalizeClass({
[`${prefixCls}-wrapper`]: true,

@@ -121,3 +121,3 @@ [`${prefixCls}-${props.placement}`]: true,

[wrapperClassName]: !!wrapperClassName
};
});
});

@@ -124,0 +124,0 @@ const wrapperStyle = computed(() => {

@@ -21,2 +21,3 @@ import type { ScrollStrategy } from '@idux/cdk/scroll';

disabled?: boolean | undefined;
description?: string | undefined;
size?: import("../../header/src/types").HeaderSize | undefined;

@@ -29,6 +30,6 @@ avatar?: string | {

}> | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("../../avatar").AvatarShape | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;

@@ -83,2 +84,3 @@ srcset?: string | undefined;

disabled?: boolean | undefined;
description?: string | undefined;
size?: import("../../header/src/types").HeaderSize | undefined;

@@ -91,6 +93,6 @@ avatar?: string | {

}> | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("../../avatar").AvatarShape | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;

@@ -97,0 +99,0 @@ srcset?: string | undefined;

@@ -37,2 +37,3 @@ import type { ScrollStrategy } from '@idux/cdk/scroll';

disabled?: boolean | undefined;
description?: string | undefined;
size?: import("../../header/src/types").HeaderSize | undefined;

@@ -45,6 +46,6 @@ avatar?: string | {

}> | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("../../avatar").AvatarShape | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;

@@ -51,0 +52,0 @@ srcset?: string | undefined;

@@ -5,2 +5,2 @@ import type { ColComponent, RowComponent } from './src/types';

export { IxRow, IxCol };
export type { RowInstance, RowComponent, RowPublicProps as RowProps, ColInstance, ColComponent, ColPublicProps as ColProps, RowGutter, RowAlign, RowJustify, } from './src/types';
export type { RowInstance, RowComponent, RowPublicProps as RowProps, ColInstance, ColComponent, ColPublicProps as ColProps, RowAlign, RowJustify, } from './src/types';

@@ -1,2 +0,2 @@

import { defineComponent, inject, computed, createVNode, provide } from "vue";
import { defineComponent, computed, inject, normalizeClass, createVNode, provide } from "vue";
import { isUndefined, isNumber, isString, isArray, isObject } from "lodash-es";

@@ -8,3 +8,3 @@ import { BREAKPOINTS_KEYS, useSharedBreakpoints } from "@idux/cdk/breakpoint";

const rowProps = {
align: IxPropTypes.oneOf(["top", "middle", "bottom"]),
align: IxPropTypes.oneOf(["start", "center", "end", "baseline", "stretch"]),
justify: IxPropTypes.oneOf(["start", "end", "center", "space-around", "space-between"]),

@@ -20,13 +20,3 @@ gutter: IxPropTypes.oneOfType([

const singleProp = IxPropTypes.oneOfType([Number, String]);
const breakpointConfig = IxPropTypes.oneOfType([
Number,
String,
IxPropTypes.shape({
span: Number,
offset: Number,
order: Number,
push: Number,
pull: Number
}).loose
]);
const breakpointConfig = IxPropTypes.oneOfType([Number, String, IxPropTypes.object()]);
const colProps = {

@@ -51,45 +41,37 @@ flex: singleProp,

}) {
const common = useGlobalConfig("common");
const mergedPrefixCls = computed(() => `${common.prefixCls}-col`);
const {
gutter
mergedGutters
} = inject(rowToken);
const classes = useClasses$1(props);
const style = useStyle$1(props, gutter);
return () => {
var _a;
return createVNode("div", {
"class": classes.value,
"style": style.value
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
};
const classes = computed(() => generateAllCls(props, mergedPrefixCls.value));
const style = computed(() => {
const style2 = {};
const [verticalGutter, horizontalGutter] = mergedGutters.value;
if (verticalGutter > 0) {
style2.paddingTop = `${verticalGutter / 2}px`;
style2.paddingBottom = style2.paddingTop;
}
if (horizontalGutter > 0) {
style2.paddingLeft = `${horizontalGutter / 2}px`;
style2.paddingRight = style2.paddingLeft;
}
if (props.flex) {
style2.flex = parseFlex(props.flex);
}
return style2;
});
return () => createVNode("div", {
"class": classes.value,
"style": style.value
}, [slots.default && slots.default()]);
}
});
function useClasses$1(props) {
return computed(() => generateAllCls(props));
}
function useStyle$1(props, gutter) {
return computed(() => {
const style = {};
const [horizontalGutter, verticalGutter] = gutter.value;
if (horizontalGutter > 0) {
style.paddingLeft = `${horizontalGutter / 2}px`;
style.paddingRight = style.paddingLeft;
}
if (verticalGutter > 0) {
style.paddingTop = `${verticalGutter / 2}px`;
style.paddingBottom = style.paddingTop;
}
if (props.flex) {
style.flex = parseFlex(props.flex);
}
return style;
});
}
const attrKeys = ["span", "order", "offset", "push", "pull"];
function generateAllCls(props) {
const clsPrefix = "ix-col";
const clsMap = /* @__PURE__ */ new Map([[clsPrefix, true]]);
function generateAllCls(props, prefixCLs) {
const clsMap = /* @__PURE__ */ new Map([[prefixCLs, true]]);
const generateSizeCls = (sizeConfig, size) => {
attrKeys.forEach((attrKey) => {
const attr = sizeConfig[attrKey];
const cls = `${clsPrefix}${size ? `-${size}` : ""}-${attrKey}-${attr}`;
const cls = `${prefixCLs}${size ? `-${size}` : ""}-${attrKey}-${attr}`;
clsMap.set(cls, !isUndefined(attr));

@@ -109,3 +91,3 @@ });

});
return allCls;
return normalizeClass(allCls);
}

@@ -132,69 +114,69 @@ function normalizeSizeProps(rawProps) {

}) {
const common = useGlobalConfig("common");
const mergedPrefixCls = computed(() => `${common.prefixCls}-row`);
const config = useGlobalConfig("row");
const classes = useClasses(props, config);
const gutter = useGutter(props);
const style = useStyle(gutter);
const mergedGutters = useGutters(props);
provide(rowToken, {
gutter
mergedGutters
});
return () => {
var _a;
return createVNode("div", {
"class": classes.value,
"style": style.value
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
};
const classes = computed(() => {
const {
align,
justify,
wrap = config.wrap
} = props;
const prefixCls = mergedPrefixCls.value;
return normalizeClass({
[prefixCls]: true,
[`${prefixCls}-align-${align}`]: align,
[`${prefixCls}-justify-${justify}`]: justify,
[`${prefixCls}-nowrap`]: !wrap
});
});
const style = computed(() => {
const [verticalGutter, horizontalGutter] = mergedGutters.value;
const style2 = {};
if (verticalGutter > 0) {
style2.marginTop = `${verticalGutter / -2}px`;
style2.marginBottom = style2.marginTop;
}
if (horizontalGutter > 0) {
style2.marginLeft = `${horizontalGutter / -2}px`;
style2.marginRight = style2.marginLeft;
}
return style2;
});
return () => createVNode("div", {
"class": classes.value,
"style": style.value
}, [slots.default && slots.default()]);
}
});
function useClasses(props, config) {
return computed(() => {
var _a;
const row = "ix-row";
return {
[row]: true,
[`${row}-no-wrap`]: !((_a = props.wrap) != null ? _a : config.wrap),
[`${row}-${props.justify}`]: props.justify,
[`${row}-${props.align}`]: props.align
};
});
}
function useGutter(props) {
function useGutters(props) {
const breakpoints = useSharedBreakpoints();
return computed(() => normalizeGutter(props.gutter, breakpoints));
}
function useStyle(gutter) {
return computed(() => {
const style = {};
const [horizontalGutter, verticalGutter] = gutter.value;
if (horizontalGutter > 0) {
style.marginLeft = `${horizontalGutter / -2}px`;
style.marginRight = style.marginLeft;
}
if (verticalGutter > 0) {
style.marginTop = `${verticalGutter / -2}px`;
style.marginBottom = style.marginTop;
}
return style;
const {
gutter
} = props;
const results = [0, 0];
const gutters = isArray(gutter) ? gutter : [gutter, gutter];
gutters.forEach((item, index) => {
if (isObject(item)) {
BREAKPOINTS_KEYS.some((key) => {
const currGutter = item[key];
const isActive = currGutter != null && breakpoints[key];
if (isActive) {
results[index] = convertNumber(currGutter);
}
return isActive;
});
} else {
results[index] = convertNumber(item);
}
});
return results;
});
}
function normalizeGutter(propGutter, breakpoints) {
const results = [0, 0];
const normalizedGutters = isArray(propGutter) ? propGutter : [propGutter, 0];
normalizedGutters.forEach((gutter, index) => {
if (isObject(gutter)) {
BREAKPOINTS_KEYS.some((key) => {
if (!isUndefined(gutter[key]) && breakpoints[key]) {
results[index] = gutter[key];
return true;
}
return false;
});
} else {
results[index] = convertNumber(gutter);
}
});
return results;
}
const IxRow = Row;
const IxCol = Col;
export { IxCol, IxRow };

@@ -1,2 +0,2 @@

import type { ColBreakpointConfig } from './types';
import { type ColBreakpointConfig } from './types';
declare const _default: import("vue").DefineComponent<{

@@ -3,0 +3,0 @@ flex: import("vue-types").VueTypeDef<string | number>;

@@ -1,7 +0,6 @@

import type { RowGutter } from './types';
declare const _default: import("vue").DefineComponent<{
align: import("vue-types").VueTypeDef<import("./types").RowAlign>;
justify: import("vue-types").VueTypeDef<import("./types").RowJustify>;
gutter: import("vue-types").VueTypeDef<RowGutter> & {
default: string | number | (() => number[]) | (() => import("./types").RowGutterRecord) | (() => [import("./types").RowGutterRecord, import("./types").RowGutterRecord]);
gutter: import("vue-types").VueTypeDef<string | number | (string | number)[] | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", string | number>>> & {
default: string | number | (() => (string | number)[]) | (() => Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", string | number>>);
};

@@ -12,9 +11,9 @@ wrap: import("vue-types").VueTypeValidableDef<boolean>;

justify: import("vue-types").VueTypeDef<import("./types").RowJustify>;
gutter: import("vue-types").VueTypeDef<RowGutter> & {
default: string | number | (() => number[]) | (() => import("./types").RowGutterRecord) | (() => [import("./types").RowGutterRecord, import("./types").RowGutterRecord]);
gutter: import("vue-types").VueTypeDef<string | number | (string | number)[] | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", string | number>>> & {
default: string | number | (() => (string | number)[]) | (() => Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", string | number>>);
};
wrap: import("vue-types").VueTypeValidableDef<boolean>;
}>>, {
gutter: RowGutter;
gutter: string | number | (string | number)[] | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", string | number>>;
}>;
export default _default;
import type { ComputedRef, InjectionKey } from 'vue';
export interface RowContext {
gutter: ComputedRef<[number, number]>;
mergedGutters: ComputedRef<[number, number]>;
}
export declare const rowToken: InjectionKey<RowContext>;

@@ -1,13 +0,10 @@

import type { BreakpointKey } from '@idux/cdk/breakpoint';
import type { IxInnerPropTypes, IxPublicPropTypes } from '@idux/cdk/utils';
import type { DefineComponent, HTMLAttributes } from 'vue';
export declare type RowAlign = 'top' | 'middle' | 'bottom';
export declare type RowJustify = 'start' | 'end' | 'center' | 'space-around' | 'space-between';
export declare type RowGutterRecord = Record<BreakpointKey, number>;
export declare type RowGutter = number | string | Array<number> | RowGutterRecord | [RowGutterRecord, RowGutterRecord];
import { type DefineComponent, type HTMLAttributes } from 'vue';
import { type IxInnerPropTypes, type IxPublicPropTypes } from '@idux/cdk/utils';
export declare type RowAlign = 'start' | 'center' | 'end' | 'baseline' | 'stretch';
export declare type RowJustify = 'start' | 'center' | 'end' | 'space-around' | 'space-between';
export declare const rowProps: {
align: import("vue-types").VueTypeDef<RowAlign>;
justify: import("vue-types").VueTypeDef<RowJustify>;
gutter: import("vue-types").VueTypeDef<RowGutter> & {
default: string | number | (() => number[]) | (() => RowGutterRecord) | (() => [RowGutterRecord, RowGutterRecord]);
gutter: import("vue-types").VueTypeDef<string | number | (string | number)[] | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", string | number>>> & {
default: string | number | (() => (string | number)[]) | (() => Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", string | number>>);
};

@@ -14,0 +11,0 @@ wrap: import("vue-types").VueTypeValidableDef<boolean>;

@@ -1,2 +0,2 @@

import { defineComponent, computed, createVNode, isVNode, mergeProps } from "vue";
import { defineComponent, computed, normalizeClass, createVNode, mergeProps } from "vue";
import { isString } from "lodash-es";

@@ -6,5 +6,6 @@ import { IxPropTypes, callEmit } from "@idux/cdk/utils";

import { useGlobalConfig } from "@idux/components/config";
import { IxIcon } from "@idux/components/icon";
import { covertIconVNode, covertStringVNode } from "@idux/components/utils";
const headerProps = {
avatar: IxPropTypes.oneOfType([String, IxPropTypes.object()]),
description: IxPropTypes.string,
disabled: IxPropTypes.bool.def(false),

@@ -34,3 +35,11 @@ prefix: IxPropTypes.oneOfType([String, IxPropTypes.vNode]),

const mergedPrefixCls = computed(() => `${common.prefixCls}-header`);
const classes = useClasses(props, mergedPrefixCls);
const classes = computed(() => {
const prefixCls = mergedPrefixCls.value;
return normalizeClass({
[prefixCls]: true,
[`${prefixCls}-disabled`]: props.disabled,
[`${prefixCls}-with-bar`]: props.showBar,
[`${prefixCls}-${props.size}`]: true
});
});
const avatarSize = computed(() => avatarSizeTransformMap[props.size]);

@@ -40,10 +49,8 @@ const onPrefixClick = (evt) => !props.disabled && callEmit(props.onPrefixClick, evt);

return () => {
const {
prefix,
suffix,
avatar,
title,
subTitle
} = props;
const prefixCls = mergedPrefixCls.value;
const prefixIconNode = covertIconVNode(slots, props, "prefix");
const suffixIconNode = covertIconVNode(slots, props, "suffix");
const titleNode = covertStringVNode(slots.default, props.title);
const subTitleNode = covertStringVNode(slots, props, "subTitle");
const descriptionNode = covertStringVNode(slots, props, "description");
return createVNode("div", {

@@ -53,40 +60,18 @@ "class": classes.value

"class": `${prefixCls}-content`
}, [renderIcon(slots.prefix, prefix, onPrefixClick, `${prefixCls}-prefix`), renderAvatar(slots.avatar, avatar, avatarSize), renderTitle(slots.default, title, `${prefixCls}-title`), renderTitle(slots.subTitle, subTitle, `${prefixCls}-sub-title`), renderIcon(slots.suffix, suffix, onSuffixClick, `${prefixCls}-suffix`)]), slots.description ? createVNode("div", {
}, [prefixIconNode && createVNode("span", {
"class": `${prefixCls}-prefix`,
"onClick": onPrefixClick
}, [prefixIconNode]), renderAvatar(slots.avatar, props.avatar, avatarSize), titleNode && createVNode("span", {
"class": `${prefixCls}-title`
}, [titleNode]), subTitleNode && createVNode("span", {
"class": `${prefixCls}-sub-title`
}, [subTitleNode]), suffixIconNode && createVNode("span", {
"class": `${prefixCls}-suffix`,
"onClick": onSuffixClick
}, [suffixIconNode])]), descriptionNode && createVNode("div", {
"class": `${prefixCls}-description`
}, [slots.description()]) : null]);
}, [descriptionNode])]);
};
}
});
const useClasses = (props, mergedPrefixCls) => {
return computed(() => {
const prefixCls = mergedPrefixCls.value;
return {
[prefixCls]: true,
[`${prefixCls}-bar`]: props.showBar,
[`${prefixCls}-disabled`]: props.disabled,
[`${prefixCls}-${props.size}`]: true
};
});
};
const renderIcon = (slot, icon, onClick, wrapperClassName) => {
if (!slot && !icon) {
return null;
}
const iconNode = slot ? slot() : isVNode(icon) ? icon : createVNode(IxIcon, {
"name": icon
}, null);
return createVNode("div", {
"class": wrapperClassName,
"onClick": onClick
}, [iconNode]);
};
const renderTitle = (slot, title, wrapperClassName) => {
var _a;
if (!slot && !title) {
return null;
}
return createVNode("span", {
"class": wrapperClassName
}, [(_a = slot == null ? void 0 : slot()) != null ? _a : title]);
};
const renderAvatar = (slot, avatar, size) => {

@@ -93,0 +78,0 @@ if (slot) {

@@ -1,2 +0,1 @@

import type { VNode } from 'vue';
declare const _default: import("vue").DefineComponent<{

@@ -6,16 +5,17 @@ avatar: import("vue-types").VueTypeDef<string | {

text?: string | undefined;
icon?: string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
icon?: string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}> | undefined;
size?: import("@idux/components/avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("@idux/components/avatar").AvatarShape | undefined;
size?: import("@idux/components/avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;
srcset?: string | undefined;
}>;
description: import("vue-types").VueTypeValidableDef<string>;
disabled: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
prefix: import("vue-types").VueTypeDef<string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
prefix: import("vue-types").VueTypeDef<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;

@@ -30,3 +30,3 @@ }>>;

subTitle: import("vue-types").VueTypeValidableDef<string>;
suffix: import("vue-types").VueTypeDef<string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
suffix: import("vue-types").VueTypeDef<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;

@@ -41,16 +41,17 @@ }>>;

text?: string | undefined;
icon?: string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
icon?: string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}> | undefined;
size?: import("@idux/components/avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("@idux/components/avatar").AvatarShape | undefined;
size?: import("@idux/components/avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;
srcset?: string | undefined;
}>;
description: import("vue-types").VueTypeValidableDef<string>;
disabled: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
prefix: import("vue-types").VueTypeDef<string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
prefix: import("vue-types").VueTypeDef<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;

@@ -65,3 +66,3 @@ }>>;

subTitle: import("vue-types").VueTypeValidableDef<string>;
suffix: import("vue-types").VueTypeDef<string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
suffix: import("vue-types").VueTypeDef<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;

@@ -68,0 +69,0 @@ }>>;

@@ -11,9 +11,10 @@ import type { IxInnerPropTypes, IxPublicPropTypes } from '@idux/cdk/utils';

}> | undefined;
size?: import("@idux/components/avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("@idux/components/avatar").AvatarShape | undefined;
size?: import("@idux/components/avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;
srcset?: string | undefined;
}>;
description: import("vue-types").VueTypeValidableDef<string>;
disabled: import("vue-types").VueTypeValidableDef<boolean> & {

@@ -20,0 +21,0 @@ default: boolean;

@@ -11,6 +11,6 @@ declare const _default: import("vue").DefineComponent<{

visible?: boolean | undefined;
zoom?: number[] | undefined;
maskClosable?: boolean | undefined;
"onUpdate:visible"?: ((visible: boolean) => void) | ((visible: boolean) => void)[] | undefined;
activeIndex?: number | undefined;
zoom?: number[] | undefined;
loop?: boolean | undefined;

@@ -31,6 +31,6 @@ "onUpdate:activeIndex"?: ((curIndex: number) => void) | ((curIndex: number) => void)[] | undefined;

visible?: boolean | undefined;
zoom?: number[] | undefined;
maskClosable?: boolean | undefined;
"onUpdate:visible"?: ((visible: boolean) => void) | ((visible: boolean) => void)[] | undefined;
activeIndex?: number | undefined;
zoom?: number[] | undefined;
loop?: boolean | undefined;

@@ -37,0 +37,0 @@ "onUpdate:activeIndex"?: ((curIndex: number) => void) | ((curIndex: number) => void)[] | undefined;

@@ -27,6 +27,6 @@ import type { IxInnerPropTypes, IxPublicPropTypes } from '@idux/cdk/utils';

visible?: boolean | undefined;
zoom?: number[] | undefined;
maskClosable?: boolean | undefined;
"onUpdate:visible"?: ((visible: boolean) => void) | ((visible: boolean) => void)[] | undefined;
activeIndex?: number | undefined;
zoom?: number[] | undefined;
loop?: boolean | undefined;

@@ -33,0 +33,0 @@ "onUpdate:activeIndex"?: ((curIndex: number) => void) | ((curIndex: number) => void)[] | undefined;

import { defineComponent, computed, createVNode, normalizeClass, watch, watchEffect } from "vue";
import { useGlobalConfig } from "@idux/components/config";
import { IxPropTypes, useControlledProp, callEmit } from "@idux/cdk/utils";
import { IxPropTypes, useControlledProp } from "@idux/cdk/utils";
import { BREAKPOINTS_KEYS, useSharedBreakpoints } from "@idux/cdk/breakpoint";

@@ -12,4 +12,3 @@ const layoutProps = {};

breakpoint: IxPropTypes.oneOf(["xs", "sm", "md", "lg", "xl"]),
"onUpdate:collapsed": IxPropTypes.emit(),
onCollapse: IxPropTypes.emit()
"onUpdate:collapsed": IxPropTypes.emit()
};

@@ -108,7 +107,3 @@ var Layout = defineComponent({

const useCollapsed = (props) => {
const [collapsed, _setCollapsed] = useControlledProp(props, "collapsed", false);
const changeCollapsed = (collapsed2, type) => {
_setCollapsed(collapsed2);
callEmit(props.onCollapse, collapsed2, type);
};
const [collapsed, setCollapsed] = useControlledProp(props, "collapsed", false);
const breakpointIndex = computed(() => {

@@ -128,3 +123,3 @@ const {

const currBreakpointIndex = BREAKPOINTS_KEYS.findIndex((key) => breakpoints[key]);
changeCollapsed(currBreakpointIndex <= breakpointIndex.value, "breakpoint");
setCollapsed(currBreakpointIndex <= breakpointIndex.value);
});

@@ -131,0 +126,0 @@ }

@@ -5,3 +5,2 @@ declare const _default: import("vue").DefineComponent<{

'onUpdate:collapsed': import("vue-types").VueTypeDef<((collapsed: boolean) => void) | ((collapsed: boolean) => void)[]>;
onCollapse: import("vue-types").VueTypeDef<((collapsed: boolean, type: "trigger" | "breakpoint") => void) | ((collapsed: boolean, type: "trigger" | "breakpoint") => void)[]>;
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{

@@ -11,4 +10,3 @@ collapsed: import("vue-types").VueTypeValidableDef<boolean>;

'onUpdate:collapsed': import("vue-types").VueTypeDef<((collapsed: boolean) => void) | ((collapsed: boolean) => void)[]>;
onCollapse: import("vue-types").VueTypeDef<((collapsed: boolean, type: "trigger" | "breakpoint") => void) | ((collapsed: boolean, type: "trigger" | "breakpoint") => void)[]>;
}>>, {}>;
export default _default;

@@ -27,3 +27,2 @@ import type { IxInnerPropTypes, IxPublicPropTypes } from '@idux/cdk/utils';

'onUpdate:collapsed': import("vue-types").VueTypeDef<((collapsed: boolean) => void) | ((collapsed: boolean) => void)[]>;
onCollapse: import("vue-types").VueTypeDef<((collapsed: boolean, type: 'trigger' | 'breakpoint') => void) | ((collapsed: boolean, type: 'trigger' | 'breakpoint') => void)[]>;
};

@@ -30,0 +29,0 @@ export declare type LayoutSiderProps = IxInnerPropTypes<typeof layoutSiderProps>;

import type { IxInnerPropTypes, IxPublicPropTypes } from '@idux/cdk/utils';
import type { RowGutter, RowProps } from '@idux/components/grid';
import type { RowProps } from '@idux/components/grid';
import type { DefineComponent, HTMLAttributes } from 'vue';

@@ -4,0 +4,0 @@ export declare type ListSize = 'sm' | 'md' | 'lg';

@@ -141,3 +141,2 @@ import { computed, watch, inject, createVNode, defineComponent, normalizeClass, mergeProps, provide, withDirectives, vShow, nextTick, ref } from "vue";

const handleSelected = (key) => {
var _a;
if (dropdownContext) {

@@ -147,4 +146,3 @@ const { hideOnClick, setVisibility } = dropdownContext;

}
const selectable = (_a = props.selectable) != null ? _a : !dropdownContext;
if (!selectable) {
if (!props.selectable) {
return;

@@ -194,3 +192,3 @@ }

multiple: IxPropTypes.bool.def(false),
selectable: IxPropTypes.bool,
selectable: IxPropTypes.bool.def(true),
target: \u0275PortalTargetDef,

@@ -281,3 +279,3 @@ theme: IxPropTypes.oneOf(["light", "dark"]),

if (process.env.NODE_ENV !== "production" && (slots.icon || slots.label)) {
Logger.warn("components/menu", "`slots` of `MenuItem` is deprecated, please use `customIcon` and `customLabel` instead");
Logger.warn("components/menu", "`slots` of `MenuItem` was deprecated, please use `customIcon` and `customLabel` instead");
}

@@ -338,3 +336,3 @@ const iconRender = (_a = customIcon != null ? customIcon : slots.icon) != null ? _a : "itemIcon";

if (process.env.NODE_ENV !== "production" && (slots.icon || slots.label)) {
Logger.warn("components/menu", "`slots` of `MenuItemGroup` is deprecated, please use `customIcon` and `customLabel` instead");
Logger.warn("components/menu", "`slots` of `MenuItemGroup` was deprecated, please use `customIcon` and `customLabel` instead");
}

@@ -466,3 +464,3 @@ const iconRender = (_a = customIcon != null ? customIcon : slots.icon) != null ? _a : "itemGroupIcon";

if (process.env.NODE_ENV !== "production" && (slots.icon || slots.label || slots.suffix)) {
Logger.warn("components/menu", "`slots` of `MenuSub` is deprecated, please use `customIcon`, `customLabel` and `customSuffix` instead");
Logger.warn("components/menu", "`slots` of `MenuSub` was deprecated, please use `customIcon`, `customLabel` and `customSuffix` instead");
}

@@ -469,0 +467,0 @@ const iconRender = (_a = customIcon != null ? customIcon : slots.icon) != null ? _a : "subIcon";

@@ -16,3 +16,5 @@ import { type VKey } from '@idux/cdk/utils';

};
selectable: import("vue-types").VueTypeValidableDef<boolean>;
selectable: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
target: import("vue-types").VueTypeDef<string | HTMLElement | (() => string | HTMLElement)>;

@@ -38,3 +40,5 @@ theme: import("vue-types").VueTypeDef<import("./types").MenuTheme>;

};
selectable: import("vue-types").VueTypeValidableDef<boolean>;
selectable: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
target: import("vue-types").VueTypeDef<string | HTMLElement | (() => string | HTMLElement)>;

@@ -50,3 +54,4 @@ theme: import("vue-types").VueTypeDef<import("./types").MenuTheme>;

multiple: boolean;
selectable: boolean;
}>;
export default _default;

@@ -24,3 +24,5 @@ import { type DefineComponent, type FunctionalComponent, type HTMLAttributes, type VNode, type VNodeChild } from 'vue';

};
selectable: import("vue-types").VueTypeValidableDef<boolean>;
selectable: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
target: import("vue-types").VueTypeDef<string | HTMLElement | (() => string | HTMLElement)>;

@@ -27,0 +29,0 @@ theme: import("vue-types").VueTypeDef<MenuTheme>;

@@ -9,8 +9,8 @@ import type { ScrollStrategy } from '@idux/cdk/scroll';

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("../../button").ButtonShape | undefined;
size?: import("../../button").ButtonSize | undefined;
shape?: import("../../button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -40,2 +40,3 @@ cancelText: import("vue-types").VueTypeValidableDef<string>;

disabled?: boolean | undefined;
description?: string | undefined;
size?: import("../../header/src/types").HeaderSize | undefined;

@@ -48,6 +49,6 @@ avatar?: string | {

}> | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("../../avatar").AvatarShape | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;

@@ -80,8 +81,8 @@ srcset?: string | undefined;

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("../../button").ButtonShape | undefined;
size?: import("../../button").ButtonSize | undefined;
shape?: import("../../button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -114,8 +115,8 @@ okText: import("vue-types").VueTypeValidableDef<string>;

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("../../button").ButtonShape | undefined;
size?: import("../../button").ButtonSize | undefined;
shape?: import("../../button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -145,2 +146,3 @@ cancelText: import("vue-types").VueTypeValidableDef<string>;

disabled?: boolean | undefined;
description?: string | undefined;
size?: import("../../header/src/types").HeaderSize | undefined;

@@ -153,6 +155,6 @@ avatar?: string | {

}> | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("../../avatar").AvatarShape | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;

@@ -185,8 +187,8 @@ srcset?: string | undefined;

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("../../button").ButtonShape | undefined;
size?: import("../../button").ButtonSize | undefined;
shape?: import("../../button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -193,0 +195,0 @@ okText: import("vue-types").VueTypeValidableDef<string>;

@@ -25,8 +25,8 @@ import type { ScrollStrategy } from '@idux/cdk/scroll';

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("@idux/components/button").ButtonShape | undefined;
size?: import("@idux/components/button").ButtonSize | undefined;
shape?: import("@idux/components/button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -56,2 +56,3 @@ cancelText: import("vue-types").VueTypeValidableDef<string>;

disabled?: boolean | undefined;
description?: string | undefined;
size?: import("../../header/src/types").HeaderSize | undefined;

@@ -64,6 +65,6 @@ avatar?: string | {

}> | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("../../avatar").AvatarShape | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;

@@ -96,8 +97,8 @@ srcset?: string | undefined;

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("@idux/components/button").ButtonShape | undefined;
size?: import("@idux/components/button").ButtonSize | undefined;
shape?: import("@idux/components/button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -104,0 +105,0 @@ okText: import("vue-types").VueTypeValidableDef<string>;

@@ -65,6 +65,6 @@ import { defineComponent, computed, createVNode, withDirectives, vShow, onMounted, watchEffect, onBeforeUnmount, provide, mergeProps, TransitionGroup, Fragment, ref, inject } from "vue";

const defaultIcon = {
success: "check-circle",
error: "close-circle",
info: "info-circle",
warning: "exclamation-circle"
success: "check-circle-filled",
error: "close-circle-filled",
info: "info-circle-filled",
warning: "exclamation-circle-filled"
};

@@ -71,0 +71,0 @@ var Notification = defineComponent({

{
"name": "@idux/components",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"description": "A UI Component Library for Vue 3.x",

@@ -35,5 +35,14 @@ "keywords": [

"dependencies": {
"@idux/cdk": "^1.0.0-alpha.4",
"date-fns": "^2.27.0"
"@idux/cdk": "^1.0.0-alpha.6",
"date-fns": "^2.27.0",
"lodash-es": "^4.17.21",
"vue-types": "^3.0.0"
},
"devDependencies": {
"axios": "^0.25.0",
"vue-router": "^4.0.12"
},
"peerDependencies": {
"vue": "^3.2.29"
}
}

@@ -7,8 +7,8 @@ declare const _default: import("vue").DefineComponent<{

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("../../button").ButtonShape | undefined;
size?: import("../../button").ButtonSize | undefined;
shape?: import("../../button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -21,8 +21,8 @@ cancelText: import("vue-types").VueTypeValidableDef<string>;

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("../../button").ButtonShape | undefined;
size?: import("../../button").ButtonSize | undefined;
shape?: import("../../button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -57,8 +57,8 @@ okText: import("vue-types").VueTypeValidableDef<string>;

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("../../button").ButtonShape | undefined;
size?: import("../../button").ButtonSize | undefined;
shape?: import("../../button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -71,8 +71,8 @@ cancelText: import("vue-types").VueTypeValidableDef<string>;

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("../../button").ButtonShape | undefined;
size?: import("../../button").ButtonSize | undefined;
shape?: import("../../button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -79,0 +79,0 @@ okText: import("vue-types").VueTypeValidableDef<string>;

@@ -10,8 +10,8 @@ import type { IxInnerPropTypes, IxPublicPropTypes, VKey } from '@idux/cdk/utils';

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("@idux/components/button").ButtonShape | undefined;
size?: import("@idux/components/button").ButtonSize | undefined;
shape?: import("@idux/components/button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -24,8 +24,8 @@ cancelText: import("vue-types").VueTypeValidableDef<string>;

disabled?: boolean | undefined;
block?: boolean | undefined;
shape?: import("@idux/components/button").ButtonShape | undefined;
size?: import("@idux/components/button").ButtonSize | undefined;
shape?: import("@idux/components/button").ButtonShape | undefined;
danger?: boolean | undefined;
ghost?: boolean | undefined;
loading?: boolean | undefined;
block?: boolean | undefined;
}>;

@@ -32,0 +32,0 @@ okText: import("vue-types").VueTypeValidableDef<string>;

@@ -15,2 +15,3 @@ import { VNode } from 'vue';

disabled?: boolean | undefined;
description?: string | undefined;
size?: import("../../header/src/types").HeaderSize | undefined;

@@ -23,6 +24,6 @@ avatar?: string | {

}> | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("../../avatar").AvatarShape | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;

@@ -62,2 +63,3 @@ srcset?: string | undefined;

disabled?: boolean | undefined;
description?: string | undefined;
size?: import("../../header/src/types").HeaderSize | undefined;

@@ -70,6 +72,6 @@ avatar?: string | {

}> | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("../../avatar").AvatarShape | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;

@@ -76,0 +78,0 @@ srcset?: string | undefined;

@@ -16,2 +16,3 @@ import type { IxInnerPropTypes, IxPublicPropTypes } from '@idux/cdk/utils';

disabled?: boolean | undefined;
description?: string | undefined;
size?: import("../../header/src/types").HeaderSize | undefined;

@@ -24,6 +25,6 @@ avatar?: string | {

}> | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("../../avatar").AvatarShape | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;

@@ -30,0 +31,0 @@ srcset?: string | undefined;

@@ -123,12 +123,13 @@ import { computed, defineComponent, inject, createVNode, ref, mergeProps, provide } from "vue";

return () => {
var _a, _b;
var _a;
if (props.hideInfo) {
return null;
}
const slot = (_a = slots.format) != null ? _a : slots.default;
return createVNode("div", {
"class": `${mergedPrefixCls.value}-info`
}, [(_b = (_a = slots.format) == null ? void 0 : _a.call(slots, {
}, [slot ? slot({
percent: percent.value,
successPercent: formattedSuccess.value.percent
})) != null ? _b : renderInfo()]);
}) : renderInfo()]);
};

@@ -135,0 +136,0 @@ }

import type { IxInnerPropTypes, IxPublicPropTypes } from '@idux/cdk/utils';
import type { DefineComponent, HTMLAttributes, VNode } from 'vue';
import type { DefineComponent, HTMLAttributes, VNode, VNodeChild } from 'vue';
export declare type ProgressSize = 'sm' | 'md' | 'lg';
export declare type ProgressFormat = (percent: number, successPercent?: number) => string;
export declare type ProgressFormat = (percent: number, successPercent?: number) => VNodeChild;
export declare type ProgressType = 'line' | 'circle' | 'dashboard';

@@ -6,0 +6,0 @@ export declare type ProgressGapPositionType = 'top' | 'bottom' | 'left' | 'right';

@@ -98,3 +98,3 @@ import { defineComponent, computed, inject, normalizeClass, createVNode, mergeProps, ref, provide } from "vue";

handleFocus
} = useRadio(props, radioGroup);
} = useRadio(props, radioGroup, elementRef);
const classes = computed(() => {

@@ -166,3 +166,3 @@ const buttoned = isButtoned.value;

});
const useRadio = (props, radioGroup) => {
const useRadio = (props, radioGroup, elementRef) => {
let isChecked;

@@ -193,6 +193,7 @@ let isDisabled;

handleChange = (evt) => {
const checked = evt.target.checked;
if (checked) {
if (elementRef.value) {
const checked = evt.target.checked;
const value = props.value;
accessor.setValue(value);
elementRef.value.checked = false;
callEmit(props.onChange, checked);

@@ -212,5 +213,8 @@ callEmit(groupProps.onChange, value);

handleChange = (evt) => {
const checked = evt.target.checked;
accessor.setValue(checked);
callEmit(props.onChange, checked);
if (elementRef.value) {
const checked = evt.target.checked;
accessor.setValue(checked);
elementRef.value.checked = false;
callEmit(props.onChange, checked);
}
};

@@ -217,0 +221,0 @@ }

@@ -61,5 +61,5 @@ # @idux

```bash
npm install
pnpm install
npm start
pnpm start
```

@@ -66,0 +66,0 @@

@@ -262,5 +262,8 @@ import { ref, onMounted, watchEffect, computed, onBeforeUnmount, toRaw, inject, createVNode, defineComponent, mergeProps, createTextVNode, watch, provide, normalizeClass } from "vue";

}
const defaultFilter = (searchValue, option) => {
var _a, _b;
return (_b = (_a = option.label) == null ? void 0 : _a.toLowerCase().includes(searchValue.toLowerCase())) != null ? _b : false;
const getDefaultFilter = (props) => {
return (searchValue, option) => {
var _a, _b, _c;
const filterField = (_a = props.labelKey) != null ? _a : "label";
return (_c = (_b = option[filterField]) == null ? void 0 : _b.toLowerCase().includes(searchValue.toLowerCase())) != null ? _c : false;
};
};

@@ -273,3 +276,3 @@ function useSearchFilter(props) {

}
return searchFilter ? defaultFilter : false;
return searchFilter ? getDefaultFilter(props) : false;
});

@@ -820,3 +823,3 @@ }

if (process.env.NODE_ENV !== "production" && slots.maxLabel) {
Logger.warn("components/select", "slot `maxLabel` is deprecated, please use slot `overflowedLabel` instead");
Logger.warn("components/select", "slot `maxLabel` was deprecated, please use slot `overflowedLabel` instead");
}

@@ -827,3 +830,3 @@ const overflowedLabelSlot = (_a2 = slots.overflowedLabel) != null ? _a2 : slots.maxLabel;

if (process.env.NODE_ENV !== "production" && slots.label) {
Logger.warn("components/select", "slots `label` is deprecated, please use slots `selectedLabel` instead");
Logger.warn("components/select", "slots `label` was deprecated, please use slots `selectedLabel` instead");
}

@@ -830,0 +833,0 @@ const selectedLabelSlot = (_c2 = slots.label) != null ? _c2 : slots.selectedLabel;

import { defineComponent, computed, normalizeClass, createVNode } from "vue";
import { supportsFlexGap } from "@idux/cdk/platform";
import { IxPropTypes, convertCssPixel, flattenNode } from "@idux/cdk/utils";
import { IxPropTypes, Logger, convertCssPixel, flattenNode } from "@idux/cdk/utils";
import { useGlobalConfig } from "@idux/components/config";
import { covertStringVNode } from "@idux/components/utils";
const spaceProps = {
align: IxPropTypes.oneOf(["start", "center", "end", "baseline"]),
align: IxPropTypes.oneOf(["start", "center", "end", "baseline", "stretch"]),
block: IxPropTypes.bool,
direction: IxPropTypes.oneOf(["vertical", "horizontal"]).def("horizontal"),
direction: IxPropTypes.oneOf(["vertical", "horizontal"]),
justify: IxPropTypes.oneOf(["start", "center", "end", "space-around", "space-between"]),
size: IxPropTypes.oneOfType([Number, String, IxPropTypes.array()]),
split: IxPropTypes.oneOfType([String, IxPropTypes.vNode]),
split: IxPropTypes.string,
separator: IxPropTypes.string,
vertical: IxPropTypes.bool,
wrap: IxPropTypes.bool

@@ -32,11 +36,12 @@ };

});
const mergedAlign = computed(() => {
const vertical = computed(() => {
const {
align,
direction
direction,
vertical: vertical2
} = props;
if (align === void 0 && direction === "horizontal") {
return "center";
if (direction) {
process.env.NODE_ENV !== "production" && Logger.warn("components/space", "`direction` was deprecated, please use `vertical` instead");
return direction === "vertical";
}
return align;
return vertical2;
});

@@ -52,13 +57,14 @@ const mergedGaps = computed(() => {

const {
block,
direction
align,
justify,
block
} = props;
const align = mergedAlign.value;
const prefixCls = mergedPrefixCls.value;
return normalizeClass({
[prefixCls]: true,
[`${prefixCls}-block`]: block && direction === "vertical",
[`${prefixCls}-align-${align}`]: align,
[`${prefixCls}-${direction}`]: true,
[`${prefixCls}-wrap`]: wrap.value
[`${prefixCls}-justify-${justify}`]: justify,
[`${prefixCls}-block`]: block,
[`${prefixCls}-vertical`]: vertical.value,
[`${prefixCls}-nowrap`]: !wrap.value
});

@@ -71,6 +77,3 @@ });

} else {
const {
direction
} = props;
return direction === "horizontal" && wrap.value ? `margin-bottom: -${convertCssPixel(columnGap)}` : void 0;
return !vertical.value && wrap.value ? `margin-bottom: -${convertCssPixel(rowGap)}` : void 0;
}

@@ -85,3 +88,25 @@ });

const prefixCls = mergedPrefixCls.value;
const children = renderChildren(props, slots, prefixCls, nodes, mergedGaps, wrap);
const children = [];
let separatorNode = covertStringVNode(slots, props, "split");
if (separatorNode) {
process.env.NODE_ENV !== "production" && Logger.warn("components/space", "`split` was deprecated, please use `separator` instead");
} else {
separatorNode = covertStringVNode(slots, props, "separator");
}
const lastIndex = nodes.length - 1;
nodes.forEach((node, index) => {
const style2 = calcItemStyle(mergedGaps, wrap, vertical, index, lastIndex);
children.push(createVNode("div", {
"key": `item-${index}`,
"class": `${prefixCls}-item`,
"style": style2
}, [node]));
if (separatorNode && index < lastIndex) {
children.push(createVNode("div", {
"key": `separator-${index}`,
"class": `${prefixCls}-item-separator`,
"style": style2
}, [separatorNode]));
}
});
return createVNode("div", {

@@ -94,47 +119,22 @@ "class": classes.value,

});
function renderChildren(props, slots, prefixCls, nodes, mergedGaps, wrap) {
var _a, _b;
const lastIndex = nodes.length - 1;
const {
direction
} = props;
const calcItemStyle = (mergedGaps, wrap, vertical, index, lastIndex) => {
if (flexGapSupported) {
return void 0;
}
const [rowGap, columnGap] = mergedGaps.value;
const children = [];
const splitNode = (_b = (_a = slots.split) == null ? void 0 : _a.call(slots)) != null ? _b : props.split;
const calcItemStyle = (index) => {
if (flexGapSupported) {
return void 0;
}
if (direction === "horizontal") {
const marginRight = index < lastIndex ? convertCssPixel(rowGap) : void 0;
const paddingBottom = wrap.value ? convertCssPixel(columnGap) : void 0;
return {
marginRight,
paddingBottom
};
} else {
const marginBottom = index < lastIndex ? convertCssPixel(rowGap) : void 0;
return {
marginBottom
};
}
};
nodes.forEach((node, index) => {
const style = calcItemStyle(index);
children.push(createVNode("div", {
"key": `item-${index}`,
"class": `${prefixCls}-item`,
"style": style
}, [node]));
if (splitNode && index < lastIndex) {
children.push(createVNode("div", {
"key": `split-${index}`,
"class": `${prefixCls}-item-split`,
"style": style
}, [splitNode]));
}
});
return children;
}
if (vertical.value) {
const marginBottom = index < lastIndex ? convertCssPixel(rowGap) : void 0;
return {
marginBottom
};
} else {
const marginRight = index < lastIndex ? convertCssPixel(columnGap) : void 0;
const paddingBottom = wrap.value ? convertCssPixel(rowGap) : void 0;
return {
marginRight,
paddingBottom
};
}
};
const IxSpace = Space;
export { IxSpace };

@@ -1,12 +0,10 @@

import type { VNode } from 'vue';
declare const _default: import("vue").DefineComponent<{
align: import("vue-types").VueTypeDef<import("./types").SpaceAlign>;
block: import("vue-types").VueTypeValidableDef<boolean>;
direction: import("vue-types").VueTypeDef<import("./types").SpaceDirection> & {
default: import("./types").SpaceDirection;
};
direction: import("vue-types").VueTypeDef<import("./types").SpaceDirection>;
justify: import("vue-types").VueTypeDef<import("./types").SpaceJustify>;
size: import("vue-types").VueTypeDef<string | number | (string | number)[]>;
split: import("vue-types").VueTypeDef<string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>>;
split: import("vue-types").VueTypeValidableDef<string>;
separator: import("vue-types").VueTypeValidableDef<string>;
vertical: import("vue-types").VueTypeValidableDef<boolean>;
wrap: import("vue-types").VueTypeValidableDef<boolean>;

@@ -16,13 +14,10 @@ }, () => JSX.Element | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{

block: import("vue-types").VueTypeValidableDef<boolean>;
direction: import("vue-types").VueTypeDef<import("./types").SpaceDirection> & {
default: import("./types").SpaceDirection;
};
direction: import("vue-types").VueTypeDef<import("./types").SpaceDirection>;
justify: import("vue-types").VueTypeDef<import("./types").SpaceJustify>;
size: import("vue-types").VueTypeDef<string | number | (string | number)[]>;
split: import("vue-types").VueTypeDef<string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>>;
split: import("vue-types").VueTypeValidableDef<string>;
separator: import("vue-types").VueTypeValidableDef<string>;
vertical: import("vue-types").VueTypeValidableDef<boolean>;
wrap: import("vue-types").VueTypeValidableDef<boolean>;
}>>, {
direction: import("./types").SpaceDirection;
}>;
}>>, {}>;
export default _default;
import type { IxInnerPropTypes, IxPublicPropTypes } from '@idux/cdk/utils';
import type { DefineComponent, HTMLAttributes } from 'vue';
export declare type SpaceAlign = 'start' | 'center' | 'end' | 'baseline';
export declare type SpaceAlign = 'start' | 'center' | 'end' | 'baseline' | 'stretch';
export declare type SpaceJustify = 'start' | 'center' | 'end' | 'space-around' | 'space-between';
export declare type SpaceDirection = 'vertical' | 'horizontal';

@@ -9,9 +10,8 @@ export declare type SpaceSize = 'sm' | 'md' | 'lg';

block: import("vue-types").VueTypeValidableDef<boolean>;
direction: import("vue-types").VueTypeDef<SpaceDirection> & {
default: SpaceDirection;
};
direction: import("vue-types").VueTypeDef<SpaceDirection>;
justify: import("vue-types").VueTypeDef<SpaceJustify>;
size: import("vue-types").VueTypeDef<string | number | (string | number)[]>;
split: import("vue-types").VueTypeDef<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>>;
split: import("vue-types").VueTypeValidableDef<string>;
separator: import("vue-types").VueTypeValidableDef<string>;
vertical: import("vue-types").VueTypeValidableDef<boolean>;
wrap: import("vue-types").VueTypeValidableDef<boolean>;

@@ -18,0 +18,0 @@ };

@@ -1,7 +0,12 @@

import { defineComponent, computed, createVNode } from "vue";
import { defineComponent, computed, createVNode, normalizeClass, normalizeStyle } from "vue";
import { IxPropTypes, hasSlot } from "@idux/cdk/utils";
import { IxLoading } from "@idux/components/_private/loading";
import { useGlobalConfig } from "@idux/components/config";
import { IxIcon } from "@idux/components/icon";
const spinProps = {
strokeWidth: IxPropTypes.number,
radius: IxPropTypes.number,
duration: IxPropTypes.number,
spinning: IxPropTypes.bool.def(true),
rotate: IxPropTypes.bool.def(true),
icon: IxPropTypes.string,

@@ -12,2 +17,12 @@ tip: IxPropTypes.string,

};
const defaultStrokeWidth = {
sm: 3,
md: 3,
lg: 4
};
const defaultRadius = {
sm: 14,
md: 14,
lg: 24
};
var Spin = defineComponent({

@@ -22,8 +37,13 @@ name: "IxSpin",

const spinConfig = useGlobalConfig("spin");
const {
size,
strokeWidth,
radius
} = useSize(props, spinConfig);
const hasDefaultSlot = computed(() => hasSlot(slots));
const icon$$ = computed(() => {
const mregedIcon = computed(() => {
var _a;
return (_a = props.icon) != null ? _a : spinConfig.icon;
});
const tip$$ = computed(() => {
const mergedTip = computed(() => {
var _a;

@@ -35,18 +55,83 @@ return (_a = props.tip) != null ? _a : spinConfig.tip;

containerClassName
} = useClasses(props, spinConfig, hasDefaultSlot, mergedPrefixCls);
return () => {
const prefixCls = mergedPrefixCls.value;
} = useClasses(props, spinConfig, size, hasDefaultSlot, mergedPrefixCls);
const renderContent = () => {
if (!slots.default) {
return null;
}
return createVNode("div", {
"class": prefixCls
}, [renderSpinner(props.spinning, spinnerClassName.value, icon$$.value, slots.icon, tip$$.value, prefixCls), renderContent(slots.default, containerClassName.value)]);
"class": containerClassName.value
}, [slots.default()]);
};
const renderTip = () => {
if (!mergedTip.value) {
return null;
}
return createVNode("div", {
"class": `${mergedPrefixCls.value}-spinner-tip`
}, [mergedTip.value]);
};
const renderIcon = () => {
const iconCls = `${mergedPrefixCls.value}-spinner-icon`;
if (slots.icon) {
return createVNode("div", {
"class": iconCls
}, [slots.icon()]);
}
if (mregedIcon.value) {
const iconStyle = normalizeStyle(props.duration && {
animationDuration: `${props.duration}s`
});
return createVNode("div", {
"class": [iconCls, props.rotate && `${iconCls}--rotate`],
"style": iconStyle
}, [createVNode(IxIcon, {
"name": mregedIcon.value
}, null)]);
}
return createVNode("div", {
"class": iconCls
}, [createVNode(IxLoading, {
"strokeWidth": strokeWidth.value,
"radius": radius.value,
"duration": props.duration
}, null)]);
};
const renderSpinner = () => {
if (!props.spinning) {
return null;
}
return createVNode("div", {
"class": spinnerClassName.value
}, [renderIcon(), renderTip()]);
};
return () => createVNode("div", {
"class": mergedPrefixCls.value
}, [renderSpinner(), renderContent()]);
}
});
const useClasses = (props, config, hasDefaultSlot, mergedPrefixCls) => {
const useSize = (props, config) => {
const size = computed(() => {
var _a;
return (_a = props.size) != null ? _a : config.size;
});
const strokeWidth = computed(() => {
var _a, _b, _c;
return (_c = (_b = props.strokeWidth) != null ? _b : (_a = config.strokeWidth) == null ? void 0 : _a[size.value]) != null ? _c : defaultStrokeWidth[size.value];
});
const radius = computed(() => {
var _a, _b, _c;
return (_c = (_b = props.radius) != null ? _b : (_a = config.radius) == null ? void 0 : _a[size.value]) != null ? _c : defaultRadius[size.value];
});
return {
size,
strokeWidth,
radius
};
};
const useClasses = (props, config, size, hasDefaultSlot, mergedPrefixCls) => {
const prefixCls = mergedPrefixCls.value;
const spinnerClassName = computed(() => {
var _a, _b;
const size = (_a = props.size) != null ? _a : config.size;
const tipAlign = (_b = props.tipAlign) != null ? _b : config.tipAlign;
return [`${prefixCls}-spinner`, `${prefixCls}-spinner-tip-${tipAlign}`, `${prefixCls}-spinner-${size}`];
var _a;
const tipAlign = (_a = props.tipAlign) != null ? _a : config.tipAlign;
return normalizeClass([`${prefixCls}-spinner`, `${prefixCls}-spinner-tip-${tipAlign}`, `${prefixCls}-spinner-${size.value}`]);
});

@@ -57,3 +142,3 @@ const containerClassName = computed(() => {

}
return [`${prefixCls}-container`, props.spinning ? `${prefixCls}-container-blur` : ""];
return normalizeClass([`${prefixCls}-container`, props.spinning ? `${prefixCls}-container-blur` : ""]);
});

@@ -65,33 +150,3 @@ return {

};
const renderSpinner = (spinning, spinnerClassName, icon, iconSlot, tip, prefixCls) => {
if (!spinning) {
return null;
}
const iconNode = iconSlot ? iconSlot() : createVNode(IxIcon, {
"name": icon
}, null);
const tipNode = renderTip(tip, prefixCls);
return createVNode("div", {
"class": spinnerClassName
}, [createVNode("div", {
"class": `${prefixCls}-spinner-icon`
}, [iconNode]), tipNode]);
};
const renderTip = (tip, prefixCls) => {
if (!tip) {
return null;
}
return createVNode("div", {
"class": `${prefixCls}-spinner-tip`
}, [tip]);
};
const renderContent = (defaultSlot, containerClassName) => {
if (!defaultSlot) {
return null;
}
return createVNode("div", {
"class": containerClassName
}, [defaultSlot()]);
};
const IxSpin = Spin;
export { IxSpin };
declare const _default: import("vue").DefineComponent<{
strokeWidth: import("vue-types").VueTypeValidableDef<number>;
radius: import("vue-types").VueTypeValidableDef<number>;
duration: import("vue-types").VueTypeValidableDef<number>;
spinning: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
rotate: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
icon: import("vue-types").VueTypeValidableDef<string>;

@@ -10,5 +16,11 @@ tip: import("vue-types").VueTypeValidableDef<string>;

}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
strokeWidth: import("vue-types").VueTypeValidableDef<number>;
radius: import("vue-types").VueTypeValidableDef<number>;
duration: import("vue-types").VueTypeValidableDef<number>;
spinning: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
rotate: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
icon: import("vue-types").VueTypeValidableDef<string>;

@@ -19,4 +31,5 @@ tip: import("vue-types").VueTypeValidableDef<string>;

}>>, {
rotate: boolean;
spinning: boolean;
}>;
export default _default;

@@ -6,5 +6,11 @@ import type { IxInnerPropTypes, IxPublicPropTypes } from '@idux/cdk/utils';

export declare const spinProps: {
strokeWidth: import("vue-types").VueTypeValidableDef<number>;
radius: import("vue-types").VueTypeValidableDef<number>;
duration: import("vue-types").VueTypeValidableDef<number>;
spinning: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
rotate: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
icon: import("vue-types").VueTypeValidableDef<string>;

@@ -11,0 +17,0 @@ tip: import("vue-types").VueTypeValidableDef<string>;

// style dependencies
import '@idux/components/style/core/default_css'
import '@idux/components/icon/style/themes/default_css'
import '@idux/components/_private/loading/style/themes/default_css'
import './default.css'
import '@idux/components/style/core/default';
import '@idux/components/icon/style/themes/default';
import '@idux/components/_private/loading/style/themes/default';
import './default.less';
// style dependencies
import '@idux/components/style/core/default'
import '@idux/components/icon/style/themes/default'
import '@idux/components/_private/loading/style/themes/default'
import './default.less'

@@ -5,2 +5,2 @@ import type { StepperComponent, StepperItemComponent } from './src/types';

export { IxStepper, IxStepperItem };
export type { StepperInstance, StepperComponent, StepperPublicProps as StepperProps, StepperItemInstance, StepperItemComponent, StepperItemPublicProps as StepperItemProps, StepperSize, StepperStatus, } from './src/types';
export type { StepperInstance, StepperComponent, StepperPublicProps as StepperProps, StepperItemInstance, StepperItemComponent, StepperItemPublicProps as StepperItemProps, StepperLabelPlacement, StepperSize, StepperStatus, } from './src/types';

@@ -1,26 +0,26 @@

import { defineComponent, computed, provide, createVNode, ref, watch, inject, Fragment } from "vue";
import { IxPropTypes, hasSlot, callEmit, getSlotNodes } from "@idux/cdk/utils";
import { defineComponent, computed, normalizeClass, provide, createVNode, inject } from "vue";
import { IxPropTypes, useControlledProp, flattenNode, NoopFunction } from "@idux/cdk/utils";
import { useGlobalConfig } from "@idux/components/config";
import { isNil, isBoolean } from "lodash-es";
import { isSymbol } from "lodash-es";
import { IxIcon } from "@idux/components/icon";
import { IxProgress } from "@idux/components/progress";
import { useKey, covertStringVNode } from "@idux/components/utils";
const stepperToken = Symbol("stepperToken");
const stepperItemKey = Symbol("IDUX_STEPPER_ITEM_KEY");
const stepperProps = {
active: IxPropTypes.number.def(0),
clickable: IxPropTypes.bool.def(false),
direction: IxPropTypes.oneOf(["horizontal", "vertical"]).def("horizontal"),
placement: IxPropTypes.oneOf(["horizontal", "vertical"]).def("horizontal"),
activeKey: IxPropTypes.oneOfType([String, Number, Symbol]),
clickable: IxPropTypes.bool,
labelPlacement: IxPropTypes.oneOf(["end", "bottom"]),
percent: IxPropTypes.range(0, 100),
progressDot: IxPropTypes.bool.def(false),
size: IxPropTypes.oneOf(["md", "sm"]).def("md"),
status: IxPropTypes.oneOf(["wait", "process", "finish", "error"]).def("process"),
"onUpdate:active": IxPropTypes.emit()
size: IxPropTypes.oneOf(["md", "sm"]),
status: IxPropTypes.oneOf(["process", "finish", "wait", "error"]).def("process"),
vertical: IxPropTypes.bool.def(false),
"onUpdate:activeKey": IxPropTypes.emit()
};
const stepperItemProps = {
index: IxPropTypes.number.isRequired,
title: IxPropTypes.string,
subTitle: IxPropTypes.string,
description: IxPropTypes.string,
disabled: IxPropTypes.bool.def(false),
icon: IxPropTypes.string,
status: IxPropTypes.oneOf(["wait", "process", "finish", "error"])
title: IxPropTypes.string,
status: IxPropTypes.oneOf(["process", "finish", "wait", "error"])
};

@@ -36,13 +36,33 @@ var Stepper = defineComponent({

const config = useGlobalConfig("stepper");
const classes = useClasses$1(props, slots, config, mergedPrefixCls);
const currActive = useActive(props);
const classes = computed(() => {
const prefixCls = mergedPrefixCls.value;
const {
size = config.size,
labelPlacement = config.labelPlacement,
percent,
vertical
} = props;
return normalizeClass({
[prefixCls]: true,
[`${prefixCls}-label-${labelPlacement}`]: true,
[`${prefixCls}-${size}`]: true,
[`${prefixCls}-vertical`]: vertical,
[`${prefixCls}-with-percent`]: percent != null
});
});
const [activeKey, setActiveKey] = useControlledProp(props, "activeKey");
provide(stepperToken, {
props,
slots,
currActive
activeKey,
setActiveKey
});
return () => {
const children = getSlotNodes(slots).map((item, index) => {
var _a, _b;
(_b = (_a = item.props).index) != null ? _b : _a.index = index;
var _a;
const children = flattenNode((_a = slots.default) == null ? void 0 : _a.call(slots), {
key: stepperItemKey
}).map((item, index) => {
if (item.key == null) {
item.key = index + 1;
}
return item;

@@ -56,40 +76,10 @@ });

});
function useClasses$1(props, slots, config, mergedPrefixCls) {
return computed(() => {
const prefixCls = mergedPrefixCls.value;
const {
direction,
size = config.size,
placement,
progressDot
} = props;
return {
[prefixCls]: true,
[`${prefixCls}-${direction}`]: true,
[`${prefixCls}-${size}`]: true,
[`${prefixCls}-vertical-placement`]: placement === "vertical",
[`${prefixCls}-vertical`]: direction === "vertical",
[`${prefixCls}-dot`]: progressDot || hasSlot(slots, "progressDot")
};
});
}
function useActive(props) {
const currActive = ref(props.active);
watch(() => props.active, (value) => currActive.value = value);
return computed({
get() {
return currActive.value;
},
set(index) {
currActive.value = index;
callEmit(props["onUpdate:active"], index);
}
});
}
var StepperItem = defineComponent({
name: "IxStepperItem",
props: stepperItemProps,
[stepperItemKey]: true,
setup(props, {
slots
}) {
const key = useKey();
const common = useGlobalConfig("common");

@@ -99,172 +89,103 @@ const mergedPrefixCls = computed(() => `${common.prefixCls}-stepper-item`);

props: parentProps,
slots: parentSlots,
currActive
activeKey,
setActiveKey
} = inject(stepperToken);
const isActive = computed(() => currActive.value === props.index);
const isActive = computed(() => activeKey.value === key);
const status = computed(() => {
if (props.status) {
return props.status;
}
if (isActive.value) {
return parentProps.status;
}
const currActiveKey = activeKey.value;
if (!currActiveKey || isSymbol(currActiveKey) || isSymbol(key)) {
return "wait";
}
return currActiveKey > key ? "finish" : "wait";
});
const classes = computed(() => {
const prefixCls = mergedPrefixCls.value;
const {
disabled,
icon
} = props;
return normalizeClass({
[prefixCls]: true,
[`${prefixCls}-${status.value}`]: true,
[`${prefixCls}-active`]: isActive.value,
[`${prefixCls}-clickable`]: parentProps.clickable && !disabled,
[`${prefixCls}-disabled`]: disabled,
[`${prefixCls}-with-icon`]: icon || !!slots.icon
});
});
const onClick = () => {
if (props.disabled || !parentProps.clickable || isActive.value) {
if (isActive.value) {
return;
}
currActive.value = props.index;
setActiveKey(key);
};
const hasIcon = computed(() => hasSlot(slots, "icon"));
const status = useStatus(props, isActive, parentProps, currActive);
const classes = useClasses(props, parentProps, status, hasIcon, mergedPrefixCls);
const deg = useDeg(parentProps, status);
const progressDot = computed(() => {
var _a;
return (_a = parentSlots.progressDot) != null ? _a : parentProps.progressDot;
});
const canShowPercent = computed(() => {
return !isNil(parentProps.percent) && status.value === "process" && !progressDot.value && !hasIcon.value;
});
return () => {
var _a, _b, _c, _d, _e, _f;
const prefixCls = mergedPrefixCls.value;
let headContent;
if (canShowPercent.value) {
headContent = renderHeadPercent(props, deg, prefixCls);
} else if (progressDot.value) {
headContent = renderHeadProcessDot(props, progressDot, status, prefixCls);
} else {
const _icon = renderHeadIcon(props, slots.icon, status, prefixCls);
headContent = _icon != null ? _icon : createVNode("span", {
"class": `${prefixCls}-head-text`
}, [props.index + 1]);
}
const title = (_b = (_a = slots.title) == null ? void 0 : _a.call(slots)) != null ? _b : props.title;
const subTitle = (_d = (_c = slots.subTitle) == null ? void 0 : _c.call(slots)) != null ? _d : props.subTitle;
const description = (_f = (_e = slots.description) == null ? void 0 : _e.call(slots)) != null ? _f : props.description;
const clickable = parentProps.clickable && !props.disabled;
const iconNode = renderIcon(props, slots, parentProps, status, key);
const titleNode = covertStringVNode(slots, props, "title");
const descriptionNode = covertStringVNode(slots, props, "description");
return createVNode("div", {
"class": classes.value,
"onClick": onClick
"role": clickable ? "button" : void 0,
"tabindex": clickable ? 0 : void 0,
"onClick": clickable ? onClick : void 0
}, [createVNode("div", {
"class": `${prefixCls}-tail`
}, null), createVNode("div", {
"class": `${prefixCls}-head`
}, [headContent]), createVNode("div", {
"class": `${prefixCls}-icon`
}, [iconNode]), createVNode("div", {
"class": `${prefixCls}-content`
}, [createVNode("div", {
"class": `${prefixCls}-title`
}, [title, createVNode("span", {
"class": `${prefixCls}-subtitle`
}, [subTitle])]), createVNode("div", {
}, [titleNode]), descriptionNode && createVNode("div", {
"class": `${prefixCls}-description`
}, [description])])]);
}, [descriptionNode])])]);
};
}
});
const useStatus = (props, isActive, parentProps, currActive) => {
return computed(() => {
if (props.status) {
return props.status;
}
if (isActive.value) {
return parentProps.status;
}
return currActive.value > props.index ? "finish" : "wait";
});
};
const useClasses = (props, parentProps, status, hasIcon, mergedPrefixCls) => {
return computed(() => {
const prefixCls = mergedPrefixCls.value;
const {
disabled,
icon
} = props;
return {
[prefixCls]: true,
[`${prefixCls}-disabled`]: disabled,
[`${prefixCls}-clickable`]: !disabled && parentProps.clickable,
[`${prefixCls}-custom`]: icon || hasIcon.value,
[`${prefixCls}-${status.value}`]: true
};
});
};
function useDeg(parentProps, status) {
return computed(() => {
const percent = parentProps.percent;
if (isNil(percent) || status.value !== "process") {
return {
left: 0,
right: 0
};
}
const halfRoundDeg = 180;
const maxDeg = 225;
const baseDeg = 45;
let left = baseDeg;
let right = baseDeg;
const curDeg = Math.round(percent / 100 * 360);
if (curDeg + baseDeg > maxDeg) {
right = maxDeg;
left += curDeg - halfRoundDeg;
left = left > maxDeg ? maxDeg : left;
} else {
right += curDeg;
}
return {
left,
right
};
});
}
const renderHeadPercent = (props, deg, prefixCls) => {
const {
left,
right
} = deg.value;
return createVNode(Fragment, null, [createVNode("div", {
"class": `${prefixCls}-head-percent`
}, [createVNode("div", {
"class": `${prefixCls}-head-percent-right`
}, [createVNode("div", {
"class": `${prefixCls}-head-percent-circle`,
"style": "transform: rotate(" + right + "deg)"
}, null)]), createVNode("div", {
"class": `${prefixCls}-head-percent-left`
}, [createVNode("div", {
"class": `${prefixCls}-head-percent-circle`,
"style": "transform: rotate(" + left + "deg)"
}, null)])]), createVNode("span", {
"class": `${prefixCls}-head-text`
}, [props.index + 1])]);
};
const renderHeadProcessDot = (props, progressDot, status, prefixCls) => {
if (isBoolean(progressDot.value)) {
return createVNode("span", {
"class": `${prefixCls}-head-dot`
}, null);
}
return progressDot.value({
index: props.index,
status: status.value
});
};
const statusIconMap = {
const statusIcons = {
finish: "check",
error: "close"
};
const renderHeadIcon = (props, iconSlot, status, prefixCls) => {
let iconNode;
if (iconSlot) {
iconNode = iconSlot({
status: status.value
function renderIcon(props, slots, parentProps, status, key) {
const currStatus = status.value;
let node;
if (slots.icon) {
node = slots.icon({
key,
status: currStatus
});
} else {
const {
icon = statusIconMap[status.value]
icon = statusIcons[currStatus]
} = props;
if (icon) {
iconNode = createVNode(IxIcon, {
node = createVNode(IxIcon, {
"name": icon
}, null);
} else {
node = createVNode("span", null, [key]);
}
}
return iconNode ? createVNode("span", {
"class": `${prefixCls}-head-icon`
}, [iconNode]) : null;
};
if (currStatus === "process" && parentProps.percent != null) {
const width = parentProps.size === "sm" ? 32 : 40;
return [createVNode(IxProgress, {
"type": "circle",
"percent": parentProps.percent,
"width": width,
"strokeWidth": 4,
"format": NoopFunction
}, null), node];
}
return node;
}
const IxStepper = Stepper;
const IxStepperItem = StepperItem;
export { IxStepper, IxStepperItem };
declare const _default: import("vue").DefineComponent<{
active: import("vue-types").VueTypeValidableDef<number> & {
default: number;
};
clickable: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
direction: import("vue-types").VueTypeDef<"vertical" | "horizontal"> & {
default: "vertical" | "horizontal";
};
placement: import("vue-types").VueTypeDef<"vertical" | "horizontal"> & {
default: "vertical" | "horizontal";
};
activeKey: import("vue-types").VueTypeDef<import("@idux/cdk/utils").VKey>;
clickable: import("vue-types").VueTypeValidableDef<boolean>;
labelPlacement: import("vue-types").VueTypeDef<import("./types").StepperLabelPlacement>;
percent: import("vue-types").VueTypeValidableDef<number>;
progressDot: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
size: import("vue-types").VueTypeDef<import("./types").StepperSize> & {
default: import("./types").StepperSize;
};
size: import("vue-types").VueTypeDef<import("./types").StepperSize>;
status: import("vue-types").VueTypeDef<import("./types").StepperStatus> & {
default: import("./types").StepperStatus;
};
'onUpdate:active': import("vue-types").VueTypeDef<((index: number) => void) | ((index: number) => void)[]>;
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
active: import("vue-types").VueTypeValidableDef<number> & {
default: number;
};
clickable: import("vue-types").VueTypeValidableDef<boolean> & {
vertical: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
direction: import("vue-types").VueTypeDef<"vertical" | "horizontal"> & {
default: "vertical" | "horizontal";
};
placement: import("vue-types").VueTypeDef<"vertical" | "horizontal"> & {
default: "vertical" | "horizontal";
};
'onUpdate:activeKey': import("vue-types").VueTypeDef<((key: import("@idux/cdk/utils").VKey) => void) | ((key: import("@idux/cdk/utils").VKey) => void)[]>;
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
activeKey: import("vue-types").VueTypeDef<import("@idux/cdk/utils").VKey>;
clickable: import("vue-types").VueTypeValidableDef<boolean>;
labelPlacement: import("vue-types").VueTypeDef<import("./types").StepperLabelPlacement>;
percent: import("vue-types").VueTypeValidableDef<number>;
progressDot: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
size: import("vue-types").VueTypeDef<import("./types").StepperSize> & {
default: import("./types").StepperSize;
};
size: import("vue-types").VueTypeDef<import("./types").StepperSize>;
status: import("vue-types").VueTypeDef<import("./types").StepperStatus> & {
default: import("./types").StepperStatus;
};
'onUpdate:active': import("vue-types").VueTypeDef<((index: number) => void) | ((index: number) => void)[]>;
vertical: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
'onUpdate:activeKey': import("vue-types").VueTypeDef<((key: import("@idux/cdk/utils").VKey) => void) | ((key: import("@idux/cdk/utils").VKey) => void)[]>;
}>>, {
vertical: boolean;
status: import("./types").StepperStatus;
placement: "vertical" | "horizontal";
size: import("./types").StepperSize;
direction: "vertical" | "horizontal";
active: number;
clickable: boolean;
progressDot: boolean;
}>;
export default _default;

@@ -1,8 +0,3 @@

import type { StepperStatus } from './types';
import { type StepperStatus } from './types';
declare const _default: import("vue").DefineComponent<{
index: import("vue-types").VueTypeValidableDef<number> & {
required: true;
};
title: import("vue-types").VueTypeValidableDef<string>;
subTitle: import("vue-types").VueTypeValidableDef<string>;
description: import("vue-types").VueTypeValidableDef<string>;

@@ -13,9 +8,5 @@ disabled: import("vue-types").VueTypeValidableDef<boolean> & {

icon: import("vue-types").VueTypeValidableDef<string>;
title: import("vue-types").VueTypeValidableDef<string>;
status: import("vue-types").VueTypeDef<StepperStatus>;
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
index: import("vue-types").VueTypeValidableDef<number> & {
required: true;
};
title: import("vue-types").VueTypeValidableDef<string>;
subTitle: import("vue-types").VueTypeValidableDef<string>;
description: import("vue-types").VueTypeValidableDef<string>;

@@ -26,2 +17,3 @@ disabled: import("vue-types").VueTypeValidableDef<boolean> & {

icon: import("vue-types").VueTypeValidableDef<string>;
title: import("vue-types").VueTypeValidableDef<string>;
status: import("vue-types").VueTypeDef<StepperStatus>;

@@ -28,0 +20,0 @@ }>>, {

@@ -1,8 +0,11 @@

import type { StepperProps } from './types';
import type { InjectionKey, Slots, WritableComputedRef } from 'vue';
import { type ComputedRef, type InjectionKey, type Slots } from 'vue';
import { type VKey } from '@idux/cdk/utils';
import { type StepperProps } from './types';
export interface StepperContext {
props: StepperProps;
slots: Slots;
currActive: WritableComputedRef<number>;
activeKey: ComputedRef<VKey | undefined>;
setActiveKey: (value: VKey) => void;
}
export declare const stepperToken: InjectionKey<StepperContext>;
export declare const stepperItemKey: unique symbol;

@@ -1,29 +0,19 @@

import type { IxInnerPropTypes, IxPublicPropTypes } from '@idux/cdk/utils';
import type { DefineComponent, HTMLAttributes } from 'vue';
export declare type StepperStatus = 'wait' | 'process' | 'finish' | 'error';
import { type DefineComponent, type HTMLAttributes } from 'vue';
import { type IxInnerPropTypes, type IxPublicPropTypes, type VKey } from '@idux/cdk/utils';
export declare type StepperLabelPlacement = 'end' | 'bottom';
export declare type StepperSize = 'md' | 'sm';
export declare type StepperStatus = 'process' | 'finish' | 'wait' | 'error';
export declare const stepperProps: {
active: import("vue-types").VueTypeValidableDef<number> & {
default: number;
};
clickable: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
direction: import("vue-types").VueTypeDef<"vertical" | "horizontal"> & {
default: "vertical" | "horizontal";
};
placement: import("vue-types").VueTypeDef<"vertical" | "horizontal"> & {
default: "vertical" | "horizontal";
};
activeKey: import("vue-types").VueTypeDef<VKey>;
clickable: import("vue-types").VueTypeValidableDef<boolean>;
labelPlacement: import("vue-types").VueTypeDef<StepperLabelPlacement>;
percent: import("vue-types").VueTypeValidableDef<number>;
progressDot: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
size: import("vue-types").VueTypeDef<StepperSize> & {
default: StepperSize;
};
size: import("vue-types").VueTypeDef<StepperSize>;
status: import("vue-types").VueTypeDef<StepperStatus> & {
default: StepperStatus;
};
'onUpdate:active': import("vue-types").VueTypeDef<((index: number) => void) | ((index: number) => void)[]>;
vertical: import("vue-types").VueTypeValidableDef<boolean> & {
default: boolean;
};
'onUpdate:activeKey': import("vue-types").VueTypeDef<((key: VKey) => void) | ((key: VKey) => void)[]>;
};

@@ -35,7 +25,2 @@ export declare type StepperProps = IxInnerPropTypes<typeof stepperProps>;

export declare const stepperItemProps: {
index: import("vue-types").VueTypeValidableDef<number> & {
required: true;
};
title: import("vue-types").VueTypeValidableDef<string>;
subTitle: import("vue-types").VueTypeValidableDef<string>;
description: import("vue-types").VueTypeValidableDef<string>;

@@ -46,2 +31,3 @@ disabled: import("vue-types").VueTypeValidableDef<boolean> & {

icon: import("vue-types").VueTypeValidableDef<string>;
title: import("vue-types").VueTypeValidableDef<string>;
status: import("vue-types").VueTypeDef<StepperStatus>;

@@ -48,0 +34,0 @@ };

@@ -29,2 +29,3 @@ declare const _default: import("vue").DefineComponent<{

disabled?: boolean | undefined;
description?: string | undefined;
size?: import("../../header/src/types").HeaderSize | undefined;

@@ -37,6 +38,6 @@ avatar?: string | {

}> | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("../../avatar").AvatarShape | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;

@@ -61,3 +62,7 @@ srcset?: string | undefined;

icon?: string | undefined;
duration?: number | undefined;
size?: "sm" | "md" | "lg" | undefined;
rotate?: boolean | undefined;
strokeWidth?: number | undefined;
radius?: number | undefined;
spinning?: boolean | undefined;

@@ -106,2 +111,3 @@ tip?: string | undefined;

disabled?: boolean | undefined;
description?: string | undefined;
size?: import("../../header/src/types").HeaderSize | undefined;

@@ -114,6 +120,6 @@ avatar?: string | {

}> | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("../../avatar").AvatarShape | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;

@@ -138,3 +144,7 @@ srcset?: string | undefined;

icon?: string | undefined;
duration?: number | undefined;
size?: "sm" | "md" | "lg" | undefined;
rotate?: boolean | undefined;
strokeWidth?: number | undefined;
radius?: number | undefined;
spinning?: boolean | undefined;

@@ -158,5 +168,5 @@ tip?: string | undefined;

virtual: boolean;
childrenKey: string;
columns: import("./types").TableColumn<any, any>[];
childrenKey: string;
}>;
export default _default;

@@ -37,2 +37,3 @@ import { type DefineComponent, FunctionalComponent, type HTMLAttributes, type VNodeChild, type VNodeTypes } from 'vue';

disabled?: boolean | undefined;
description?: string | undefined;
size?: import("../../header/src/types").HeaderSize | undefined;

@@ -45,6 +46,6 @@ avatar?: string | {

}> | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
alt?: string | undefined;
gap?: number | undefined;
alt?: string | undefined;
shape?: import("../../avatar").AvatarShape | undefined;
size?: import("../../avatar").AvatarSize | Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", number>> | undefined;
src?: string | undefined;

@@ -69,3 +70,7 @@ srcset?: string | undefined;

icon?: string | undefined;
duration?: number | undefined;
size?: "sm" | "md" | "lg" | undefined;
rotate?: boolean | undefined;
strokeWidth?: number | undefined;
radius?: number | undefined;
spinning?: boolean | undefined;

@@ -72,0 +77,0 @@ tip?: string | undefined;

@@ -65,6 +65,4 @@ import type { IxInnerPropTypes, IxPublicPropTypes, VKey } from '@idux/cdk/utils';

width?: string | number | undefined;
success?: import("../../progress/src/types").ProgressSuccess | undefined;
size?: import("@idux/components/progress").ProgressSize | undefined;
strokeLinecap?: import("@idux/components/progress").ProgressStrokeLinecap | undefined;
strokeWidth?: string | number | undefined;
success?: import("../../progress/src/types").ProgressSuccess | undefined;
format?: import("@idux/components/progress").ProgressFormat | undefined;

@@ -75,2 +73,4 @@ percent?: string | number | undefined;

strokeColor?: string | import("@idux/components/progress").ProgressGradient | undefined;
strokeLinecap?: import("@idux/components/progress").ProgressStrokeLinecap | undefined;
strokeWidth?: string | number | undefined;
gapDegree?: string | number | undefined;

@@ -77,0 +77,0 @@ gapPosition?: import("@idux/components/progress").ProgressGapPositionType | undefined;

@@ -18,6 +18,4 @@ declare const _default: import("vue").DefineComponent<{

width?: string | number | undefined;
success?: import("../../progress/src/types").ProgressSuccess | undefined;
size?: import("../../progress").ProgressSize | undefined;
strokeLinecap?: import("../../progress").ProgressStrokeLinecap | undefined;
strokeWidth?: string | number | undefined;
success?: import("../../progress/src/types").ProgressSuccess | undefined;
format?: import("../../progress").ProgressFormat | undefined;

@@ -28,2 +26,4 @@ percent?: string | number | undefined;

strokeColor?: string | import("../../progress").ProgressGradient | undefined;
strokeLinecap?: import("../../progress").ProgressStrokeLinecap | undefined;
strokeWidth?: string | number | undefined;
gapDegree?: string | number | undefined;

@@ -69,6 +69,4 @@ gapPosition?: import("../../progress").ProgressGapPositionType | undefined;

width?: string | number | undefined;
success?: import("../../progress/src/types").ProgressSuccess | undefined;
size?: import("../../progress").ProgressSize | undefined;
strokeLinecap?: import("../../progress").ProgressStrokeLinecap | undefined;
strokeWidth?: string | number | undefined;
success?: import("../../progress/src/types").ProgressSuccess | undefined;
format?: import("../../progress").ProgressFormat | undefined;

@@ -79,2 +77,4 @@ percent?: string | number | undefined;

strokeColor?: string | import("../../progress").ProgressGradient | undefined;
strokeLinecap?: import("../../progress").ProgressStrokeLinecap | undefined;
strokeWidth?: string | number | undefined;
gapDegree?: string | number | undefined;

@@ -81,0 +81,0 @@ gapPosition?: import("../../progress").ProgressGapPositionType | undefined;

export * from './src/colors';
export * from './src/covertTarget';
export * from './src/covertVNode';
export * from './src/useFormAccessor';
export * from './src/useFormElement';
export * from './src/useKey';
import { isFunction, isString } from "lodash-es";
import { Logger } from "@idux/cdk/utils";
import { createVNode, ref, watch, onBeforeUnmount, getCurrentInstance } from "vue";
import { IxIcon } from "@idux/components/icon";
import { useValueControl, useValueAccessor } from "@idux/cdk/forms";
import { useFormItemRegister } from "@idux/components/form";
import { ref, watch, onBeforeUnmount, getCurrentInstance } from "vue";
import { useSharedFocusMonitor } from "@idux/cdk/a11y";

@@ -43,2 +44,33 @@ const presetColors = [

}
function covertIconVNode(slots, props, key) {
let iconSlot;
let iconName;
if (key) {
iconSlot = slots[key];
if (!iconSlot) {
iconName = props[key];
}
} else {
iconSlot = slots;
iconName = props;
}
if (iconSlot) {
return iconSlot();
}
return isString(iconName) ? createVNode(IxIcon, { name: iconName }, null) : iconName;
}
function covertStringVNode(slots, props, key) {
let labelSlot;
let label;
if (key) {
labelSlot = slots[key];
if (!labelSlot) {
label = props[key];
}
} else {
labelSlot = slots;
label = props;
}
return labelSlot ? labelSlot() : label;
}
function useFormAccessor(valueKey) {

@@ -89,2 +121,2 @@ const control = useValueControl();

}
export { covertTarget, isPresetColor, isStatusColor, presetColors, statusColors, useFormAccessor, useFormElement, useFormFocusMonitor, useKey };
export { covertIconVNode, covertStringVNode, covertTarget, isPresetColor, isStatusColor, presetColors, statusColors, useFormAccessor, useFormElement, useFormFocusMonitor, useKey };

@@ -1,1 +0,1 @@

export declare const version = '1.0.0-alpha.5'
export declare const version = '1.0.0-alpha.6'

@@ -1,1 +0,1 @@

export const version = '1.0.0-alpha.5'
export const version = '1.0.0-alpha.6'

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc