@veltra/desktop 1.1.21 → 1.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/action/action-group.vue.d.ts +1 -1
- package/dist/components/action/action.vue.d.ts +1 -1
- package/dist/components/auto-complete/auto-complete.vue.d.ts +1 -1
- package/dist/components/batch-edit/batch-edit.vue.d.ts +1 -1
- package/dist/components/cascade/cascade.vue.d.ts +5 -5
- package/dist/components/checkbox/checkbox-button.vue.d.ts +1 -1
- package/dist/components/checkbox-group/checkbox-group.vue.d.ts +1 -1
- package/dist/components/collapse/collapse-item.js +1 -2
- package/dist/components/collapse/collapse-item.js.map +1 -1
- package/dist/components/collapse/collapse.js +1 -11
- package/dist/components/collapse/collapse.js.map +1 -1
- package/dist/components/collapse/collapse.vue.d.ts +0 -1
- package/dist/components/collapse/di.js.map +1 -1
- package/dist/components/collapse/style2.css +29 -17
- package/dist/components/date-panel/date-panel.vue.d.ts +1 -1
- package/dist/components/date-picker/date-picker.vue.d.ts +1 -1
- package/dist/components/date-range-picker/date-range-picker.vue.d.ts +1 -1
- package/dist/components/drawer/drawer.vue.d.ts +2 -2
- package/dist/components/empty/empty.vue.d.ts +1 -1
- package/dist/components/file-viewer/file-viewer.vue.d.ts +1 -1
- package/dist/components/input/input.vue.d.ts +3 -3
- package/dist/components/input/style2.css +5 -2
- package/dist/components/multi-select/multi-select.vue.d.ts +4 -4
- package/dist/components/multi-tree-select/multi-tree-select.vue.d.ts +6 -6
- package/dist/components/notification/notification.vue.d.ts +1 -1
- package/dist/components/number/number.vue.d.ts +1 -1
- package/dist/components/number-input/number-input.vue.d.ts +3 -3
- package/dist/components/number-range-input/number-range-input.vue.d.ts +1 -1
- package/dist/components/password-input/password-input.js +30 -13
- package/dist/components/password-input/password-input.js.map +1 -1
- package/dist/components/password-input/password-input.vue.d.ts +1 -1
- package/dist/components/password-input/style2.css +21 -0
- package/dist/components/pop-confirm/pop-confirm.vue.d.ts +1 -1
- package/dist/components/progress-nodes/progress-nodes.vue.d.ts +2 -2
- package/dist/components/radio-group/radio-group.vue.d.ts +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.vue.d.ts +1 -1
- package/dist/components/select/select.vue.d.ts +3 -3
- package/dist/components/table/node/col.js +2 -2
- package/dist/components/table/node/col.js.map +1 -1
- package/dist/components/tabs/tabs-horizontal.vue.d.ts +3 -3
- package/dist/components/tabs/tabs-vertical.vue.d.ts +3 -3
- package/dist/components/tabs/tabs.vue.d.ts +3 -3
- package/dist/components/textarea/style2.css +7 -4
- package/dist/components/textarea/textarea.vue.d.ts +3 -3
- package/dist/components/tip/tip.vue.d.ts +1 -1
- package/dist/components/tree-select/tree-select.vue.d.ts +6 -6
- package/dist/components/watermark/watermark.vue.d.ts +1 -1
- package/dist/types/collapse.d.ts +0 -5
- package/package.json +23 -25
- package/src/components/collapse/collapse-item.vue +1 -2
- package/src/components/collapse/collapse.vue +2 -6
- package/src/components/collapse/di.ts +0 -1
- package/src/components/collapse/style.scss +57 -37
- package/src/components/input/style.scss +3 -6
- package/src/components/password-input/__test__/password-input.test.ts +90 -0
- package/src/components/password-input/password-input.vue +28 -13
- package/src/components/password-input/style.scss +22 -1
- package/src/components/table/node/col.ts +2 -2
- package/src/components/textarea/style.scss +3 -2
- package/src/types/collapse.ts +0 -6
|
@@ -8,9 +8,9 @@ type __VLS_Slots = {
|
|
|
8
8
|
default?: () => VNode[];
|
|
9
9
|
};
|
|
10
10
|
declare const __VLS_base: _$vue.DefineComponent<ActionGroupProps, _ActionGroupExposed, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<ActionGroupProps> & Readonly<{}>, {
|
|
11
|
-
size: "small" | "default" | "large";
|
|
12
11
|
type: _$_veltra_utils0.ColorType;
|
|
13
12
|
text: boolean;
|
|
13
|
+
size: "small" | "default" | "large";
|
|
14
14
|
circle: boolean;
|
|
15
15
|
max: number;
|
|
16
16
|
loading: boolean;
|
|
@@ -15,9 +15,9 @@ declare const __VLS_base: _$vue.DefineComponent<ActionProps, {}, {}, {}, {}, _$v
|
|
|
15
15
|
}, string, _$vue.PublicProps, Readonly<ActionProps> & Readonly<{
|
|
16
16
|
onRun?: (() => any) | undefined;
|
|
17
17
|
}>, {
|
|
18
|
-
size: _$_veltra_utils0.ComponentSize;
|
|
19
18
|
type: ButtonType;
|
|
20
19
|
text: boolean;
|
|
20
|
+
size: _$_veltra_utils0.ComponentSize;
|
|
21
21
|
circle: boolean;
|
|
22
22
|
loading: boolean;
|
|
23
23
|
inDropdown: boolean;
|
|
@@ -25,9 +25,9 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
25
25
|
onSelect?: ((value: string) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
27
|
disabled: boolean;
|
|
28
|
-
readonly: boolean;
|
|
29
28
|
placeholder: string;
|
|
30
29
|
clearable: boolean;
|
|
30
|
+
readonly: boolean;
|
|
31
31
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
32
32
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
33
33
|
declare const _default: typeof __VLS_export;
|
|
@@ -9,12 +9,12 @@ declare const __VLS_export: <Model extends FormModel>(__VLS_props: NonNullable<A
|
|
|
9
9
|
props: _$vue.PublicProps & __VLS_PrettifyLocal<BatchEditProps<Model> & {
|
|
10
10
|
"onUpdate:selected"?: ((value: Record<string, any> | undefined) => any) | undefined;
|
|
11
11
|
"onUpdate:checked"?: ((value: Record<string, any>[]) => any) | undefined;
|
|
12
|
+
"onUpdate:data"?: ((value: Record<string, any>[]) => any) | undefined;
|
|
12
13
|
"onUpdate:rows"?: ((rows: TableRow[]) => any) | undefined;
|
|
13
14
|
"onUpdate:forest"?: ((rows?: _$_cat_kit_core0.Forest<Record<string, unknown>, any> | undefined) => any) | undefined;
|
|
14
15
|
"onUpdate:current"?: ((row?: TableRow | undefined) => any) | undefined;
|
|
15
16
|
"onCell-click"?: ((row: TableRow, column: TableColumn, ev: MouseEvent) => any) | undefined;
|
|
16
17
|
"onRow-click"?: ((row: TableRow, ev: MouseEvent) => any) | undefined;
|
|
17
|
-
"onUpdate:data"?: ((value: Record<string, any>[]) => any) | undefined;
|
|
18
18
|
}> & (typeof globalThis extends {
|
|
19
19
|
__VLS_PROPS_FALLBACK: infer P;
|
|
20
20
|
} ? P : {});
|
|
@@ -4,22 +4,22 @@ import * as _$vue from "vue";
|
|
|
4
4
|
//#region src/components/cascade/cascade.vue.d.ts
|
|
5
5
|
declare const __VLS_export: _$vue.DefineComponent<CascadeProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {} & {
|
|
6
6
|
"update:modelValue": (value?: string | string[] | undefined) => any;
|
|
7
|
-
change: (...args: [value?: string | undefined, label?: string | undefined, item?: Record<string, any> | undefined] | [value: string[], label: string[], data: Record<string, any>[]]) => any;
|
|
8
7
|
clear: () => any;
|
|
8
|
+
change: (...args: [value?: string | undefined, label?: string | undefined, item?: Record<string, any> | undefined] | [value: string[], label: string[], data: Record<string, any>[]]) => any;
|
|
9
9
|
}, string, _$vue.PublicProps, Readonly<CascadeProps> & Readonly<{
|
|
10
10
|
"onUpdate:modelValue"?: ((value?: string | string[] | undefined) => any) | undefined;
|
|
11
|
-
onChange?: ((...args: [value?: string | undefined, label?: string | undefined, item?: Record<string, any> | undefined] | [value: string[], label: string[], data: Record<string, any>[]]) => any) | undefined;
|
|
12
11
|
onClear?: (() => any) | undefined;
|
|
12
|
+
onChange?: ((...args: [value?: string | undefined, label?: string | undefined, item?: Record<string, any> | undefined] | [value: string[], label: string[], data: Record<string, any>[]]) => any) | undefined;
|
|
13
13
|
}>, {
|
|
14
14
|
disabled: boolean;
|
|
15
|
-
readonly: boolean;
|
|
16
|
-
placeholder: string;
|
|
17
|
-
clearable: boolean;
|
|
18
15
|
labelKey: string;
|
|
19
16
|
valueKey: string;
|
|
20
17
|
childrenKey: string;
|
|
21
18
|
data: Record<string, any>[];
|
|
19
|
+
placeholder: string;
|
|
20
|
+
clearable: boolean;
|
|
22
21
|
filterable: boolean;
|
|
22
|
+
readonly: boolean;
|
|
23
23
|
visibilityLimit: number;
|
|
24
24
|
separator: string;
|
|
25
25
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -21,8 +21,8 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
21
21
|
onChange?: ((checked: boolean) => any) | undefined;
|
|
22
22
|
}>, {
|
|
23
23
|
disabled: boolean;
|
|
24
|
-
readonly: boolean;
|
|
25
24
|
type: _$_veltra_utils0.ColorType;
|
|
25
|
+
readonly: boolean;
|
|
26
26
|
round: boolean;
|
|
27
27
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -15,9 +15,9 @@ declare const __VLS_export: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {},
|
|
|
15
15
|
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
17
|
disabled: boolean;
|
|
18
|
-
readonly: boolean;
|
|
19
18
|
labelKey: string;
|
|
20
19
|
valueKey: string;
|
|
20
|
+
readonly: boolean;
|
|
21
21
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
23
23
|
//#endregion
|
|
@@ -28,8 +28,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
28
28
|
const classList = computed(() => [
|
|
29
29
|
cls.e("item"),
|
|
30
30
|
bem.is("active", isActive.value),
|
|
31
|
-
bem.is("disabled", props.disabled)
|
|
32
|
-
bem.is("bordered", context?.bordered.value)
|
|
31
|
+
bem.is("disabled", props.disabled)
|
|
33
32
|
]);
|
|
34
33
|
const headerClassList = computed(() => [
|
|
35
34
|
cls.e("header"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapse-item.js","names":[],"sources":["../../../src/components/collapse/collapse-item.vue"],"sourcesContent":["<template>\n <div :class=\"classList\">\n <div\n :class=\"headerClassList\"\n role=\"button\"\n :aria-expanded=\"isActive\"\n :aria-disabled=\"disabled\"\n :tabindex=\"disabled ? -1 : 0\"\n @click=\"handleClick\"\n @keydown.enter.prevent=\"handleClick\"\n @keydown.space.prevent=\"handleClick\"\n >\n <span :class=\"cls.e('title')\">\n <slot name=\"title\">{{ title }}</slot>\n </span>\n\n <span :class=\"cls.e('icon')\">\n <slot name=\"icon\" :is-active=\"isActive\">\n <UIcon><component :is=\"iconComponent\" /></UIcon>\n </slot>\n </span>\n </div>\n <div ref=\"wrapperEl\" :class=\"cls.e('content-wrapper')\" :aria-hidden=\"!isActive\">\n <div :class=\"cls.e('content')\">\n <slot />\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { ArrowRight } from '@veltra/icons/normal'\nimport { bem } from '@veltra/utils'\nimport { computed, inject, onBeforeUnmount, onMounted, ref, watch } from 'vue'\n\nimport type { CollapseItemProps } from '../../types'\nimport { UIcon } from '../icon'\nimport { CollapseDIKey } from './di'\n\ndefineOptions({\n name: 'CollapseItem'\n})\n\nconst props = defineProps<CollapseItemProps>()\n\nconst context = inject(CollapseDIKey)!\n\nconst cls = context?.cls ?? bem('collapse')\n\nconst isActive = computed(() => !!context?.activeValues.value.includes(props.value))\n\nconst iconComponent = computed(() => context?.expandIcon.value ?? ArrowRight)\n\nconst classList = computed(() => [\n cls.e('item'),\n bem.is('active', isActive.value),\n bem.is('disabled', props.disabled)
|
|
1
|
+
{"version":3,"file":"collapse-item.js","names":[],"sources":["../../../src/components/collapse/collapse-item.vue"],"sourcesContent":["<template>\n <div :class=\"classList\">\n <div\n :class=\"headerClassList\"\n role=\"button\"\n :aria-expanded=\"isActive\"\n :aria-disabled=\"disabled\"\n :tabindex=\"disabled ? -1 : 0\"\n @click=\"handleClick\"\n @keydown.enter.prevent=\"handleClick\"\n @keydown.space.prevent=\"handleClick\"\n >\n <span :class=\"cls.e('title')\">\n <slot name=\"title\">{{ title }}</slot>\n </span>\n\n <span :class=\"cls.e('icon')\">\n <slot name=\"icon\" :is-active=\"isActive\">\n <UIcon><component :is=\"iconComponent\" /></UIcon>\n </slot>\n </span>\n </div>\n <div ref=\"wrapperEl\" :class=\"cls.e('content-wrapper')\" :aria-hidden=\"!isActive\">\n <div :class=\"cls.e('content')\">\n <slot />\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { ArrowRight } from '@veltra/icons/normal'\nimport { bem } from '@veltra/utils'\nimport { computed, inject, onBeforeUnmount, onMounted, ref, watch } from 'vue'\n\nimport type { CollapseItemProps } from '../../types'\nimport { UIcon } from '../icon'\nimport { CollapseDIKey } from './di'\n\ndefineOptions({\n name: 'CollapseItem'\n})\n\nconst props = defineProps<CollapseItemProps>()\n\nconst context = inject(CollapseDIKey)!\n\nconst cls = context?.cls ?? bem('collapse')\n\nconst isActive = computed(() => !!context?.activeValues.value.includes(props.value))\n\nconst iconComponent = computed(() => context?.expandIcon.value ?? ArrowRight)\n\nconst classList = computed(() => [\n cls.e('item'),\n bem.is('active', isActive.value),\n bem.is('disabled', props.disabled)\n])\n\nconst headerClassList = computed(() => [\n cls.e('header'),\n bem.is('disabled', props.disabled),\n bem.is('active', isActive.value)\n])\n\nconst handleClick = () => {\n if (props.disabled) return\n context?.toggle(props.value)\n}\n\nconst wrapperEl = ref<HTMLElement>()\n\nconst { expandTransition } = context\n\nonMounted(() => {\n context?.register(props.value)\n if (!wrapperEl.value) return\n expandTransition.setExpanded(wrapperEl.value, isActive.value)\n})\n\nwatch(isActive, (active) => {\n if (!wrapperEl.value) return\n active ? expandTransition.expand(wrapperEl.value) : expandTransition.collapse(wrapperEl.value)\n})\n\nonBeforeUnmount(() => {\n context?.unregister(props.value)\n if (!wrapperEl.value) return\n expandTransition.cancel(wrapperEl.value)\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;EA2CA,MAAM,QAAQ;EAEd,MAAM,UAAU,OAAO,cAAa;EAEpC,MAAM,MAAM,SAAS,OAAO,IAAI,WAAU;EAE1C,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,aAAa,MAAM,SAAS,MAAM,MAAM,CAAA;EAEnF,MAAM,gBAAgB,eAAe,SAAS,WAAW,SAAS,WAAU;EAE5E,MAAM,YAAY,eAAe;GAC/B,IAAI,EAAE,OAAM;GACZ,IAAI,GAAG,UAAU,SAAS,MAAK;GAC/B,IAAI,GAAG,YAAY,MAAM,SAAQ;GAClC,CAAA;EAED,MAAM,kBAAkB,eAAe;GACrC,IAAI,EAAE,SAAQ;GACd,IAAI,GAAG,YAAY,MAAM,SAAQ;GACjC,IAAI,GAAG,UAAU,SAAS,MAAK;GAChC,CAAA;EAED,MAAM,oBAAoB;GACxB,IAAI,MAAM,UAAU;GACpB,SAAS,OAAO,MAAM,MAAK;;EAG7B,MAAM,YAAY,KAAiB;EAEnC,MAAM,EAAE,qBAAqB;EAE7B,gBAAgB;GACd,SAAS,SAAS,MAAM,MAAK;GAC7B,IAAI,CAAC,UAAU,OAAO;GACtB,iBAAiB,YAAY,UAAU,OAAO,SAAS,MAAK;IAC7D;EAED,MAAM,WAAW,WAAW;GAC1B,IAAI,CAAC,UAAU,OAAO;GACtB,SAAS,iBAAiB,OAAO,UAAU,MAAK,GAAI,iBAAiB,SAAS,UAAU,MAAK;IAC9F;EAED,sBAAsB;GACpB,SAAS,WAAW,MAAM,MAAK;GAC/B,IAAI,CAAC,UAAU,OAAO;GACtB,iBAAiB,OAAO,UAAU,MAAK;IACxC;;uBAxFC,mBA0BM,OAAA,EA1BA,OAAK,eAAE,UAAA,MAAS,EAAA,EAAA,CACpB,mBAmBM,OAAA;IAlBH,OAAK,eAAE,gBAAA,MAAe;IACvB,MAAK;IACJ,iBAAe,SAAA;IACf,iBAAe,QAAA;IACf,UAAU,QAAA,WAAQ,KAAA;IAClB,SAAO;IACP,WAAO,CAAA,SAAA,cAAgB,aAAW,CAAA,UAAA,CAAA,EAAA,CAAA,QAAA,CAAA,EAAA,SAAA,cACX,aAAW,CAAA,UAAA,CAAA,EAAA,CAAA,QAAA,CAAA,CAAA;OAEnC,mBAEO,QAAA,EAFA,OAAK,eAAE,MAAA,IAAA,CAAI,EAAC,QAAA,CAAA,EAAA,EAAA,CACjB,WAAqC,KAAA,QAAA,SAAA,EAAA,QAAA,CAAA,gBAAA,gBAAf,QAAA,MAAK,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,EAAA,EAG7B,mBAIO,QAAA,EAJA,OAAK,eAAE,MAAA,IAAA,CAAI,EAAC,OAAA,CAAA,EAAA,EAAA,CACjB,WAEO,KAAA,QAAA,QAAA,EAFY,UAAW,SAAA,OAAQ,QAE/B,CADL,YAAgD,MAAA,YAAA,EAAA,MAAA;2BAAR,EAAA,WAAA,EAAjC,YAAiC,wBAAjB,cAAA,MAAa,CAAA,EAAA,CAAA;;gCAI1C,mBAIM,OAAA;aAJG;IAAJ,KAAI;IAAa,OAAK,eAAE,MAAA,IAAA,CAAI,EAAC,kBAAA,CAAA;IAAsB,eAAW,CAAG,SAAA;OACpE,mBAEM,OAAA,EAFA,OAAK,eAAE,MAAA,IAAA,CAAI,EAAC,UAAA,CAAA,EAAA,EAAA,CAChB,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,EAAA,CAAA,EAAA,IAAA,WAAA,CAAA,EAAA,EAAA"}
|
|
@@ -16,10 +16,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16
16
|
type: Boolean,
|
|
17
17
|
default: false
|
|
18
18
|
},
|
|
19
|
-
bordered: {
|
|
20
|
-
type: Boolean,
|
|
21
|
-
default: false
|
|
22
|
-
},
|
|
23
19
|
expandIcon: {},
|
|
24
20
|
size: {}
|
|
25
21
|
},
|
|
@@ -31,12 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31
27
|
const expandTransition = new ExpandTransition({ transition: "height 0.24s cubic-bezier(0.4, 0, 0.2, 1)" });
|
|
32
28
|
const { size } = useFormFallbackProps([props], { size: "default" });
|
|
33
29
|
const expandIcon = computed(() => props.expandIcon);
|
|
34
|
-
const
|
|
35
|
-
const classList = computed(() => [
|
|
36
|
-
cls.b,
|
|
37
|
-
cls.m(size.value),
|
|
38
|
-
bem.is("bordered", bordered.value)
|
|
39
|
-
]);
|
|
30
|
+
const classList = computed(() => [cls.b, cls.m(size.value)]);
|
|
40
31
|
const modelValue = useModel$1({
|
|
41
32
|
props,
|
|
42
33
|
emit,
|
|
@@ -82,7 +73,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
82
73
|
provide(CollapseDIKey, {
|
|
83
74
|
cls,
|
|
84
75
|
size,
|
|
85
|
-
bordered,
|
|
86
76
|
expandIcon,
|
|
87
77
|
activeValues,
|
|
88
78
|
toggle,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapse.js","names":[],"sources":["../../../src/components/collapse/collapse.vue"],"sourcesContent":["<template>\n <div :class=\"classList\" role=\"region\">\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useFormFallbackProps, useModel } from '@veltra/compositions'\nimport { bem, ExpandTransition } from '@veltra/utils'\nimport { computed, provide, ref } from 'vue'\n\nimport type { CollapseEmits, CollapseModelValue, CollapseProps, CollapseValue } from '../../types'\nimport { CollapseDIKey } from './di'\n\ndefineOptions({\n name: 'Collapse'\n})\n\nconst props = withDefaults(defineProps<CollapseProps>(), {\n accordion: false,\n defaultCollapseAll: false
|
|
1
|
+
{"version":3,"file":"collapse.js","names":[],"sources":["../../../src/components/collapse/collapse.vue"],"sourcesContent":["<template>\n <div :class=\"classList\" role=\"region\">\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useFormFallbackProps, useModel } from '@veltra/compositions'\nimport { bem, ExpandTransition } from '@veltra/utils'\nimport { computed, provide, ref } from 'vue'\n\nimport type { CollapseEmits, CollapseModelValue, CollapseProps, CollapseValue } from '../../types'\nimport { CollapseDIKey } from './di'\n\ndefineOptions({\n name: 'Collapse'\n})\n\nconst props = withDefaults(defineProps<CollapseProps>(), {\n accordion: false,\n defaultCollapseAll: false\n})\nconst emit = defineEmits<CollapseEmits>()\n\nconst cls = bem('collapse')\n\nconst expandTransition = new ExpandTransition({\n transition: 'height 0.24s cubic-bezier(0.4, 0, 0.2, 1)'\n})\n\nconst { size } = useFormFallbackProps([props], { size: 'default' })\n\nconst expandIcon = computed(() => props.expandIcon)\n\nconst classList = computed(() => [cls.b, cls.m(size.value)])\n\nconst modelValue = useModel<CollapseProps, 'modelValue'>({\n props,\n emit,\n propName: 'modelValue'\n})\n\nconst activeValues = computed<CollapseValue[]>(() => {\n const v = modelValue.value\n if (v === undefined || v === null) return []\n return Array.isArray(v) ? v : [v]\n})\n\nconst update = (next: CollapseModelValue) => {\n modelValue.value = next\n emit('change', next)\n}\n\nconst toggle = (value: CollapseValue) => {\n if (props.accordion) {\n update(activeValues.value[0] === value ? [] : value)\n return\n }\n\n const values = activeValues.value.slice()\n const index = values.indexOf(value)\n if (index > -1) values.splice(index, 1)\n else values.push(value)\n update(values)\n}\n\n// 收集子组件已注册的 values\nconst registeredValues = ref<CollapseValue[]>([])\n\n// 初始捕获 modelValue 是否具有有效初值\nconst hasInitialValue =\n modelValue.value !== undefined &&\n modelValue.value !== null &&\n (!Array.isArray(modelValue.value) || modelValue.value.length > 0)\n\nconst register = (value: CollapseValue) => {\n if (!registeredValues.value.includes(value)) {\n registeredValues.value.push(value)\n\n // 若默认展开全部(defaultCollapseAll 为 false)且外部未指定初始值,则自动展开该子项\n if (!props.defaultCollapseAll && !hasInitialValue) {\n if (props.accordion) {\n if (registeredValues.value.length === 1) {\n update(value)\n }\n } else {\n const current = Array.isArray(modelValue.value)\n ? modelValue.value\n : modelValue.value !== undefined && modelValue.value !== null\n ? [modelValue.value]\n : []\n if (!current.includes(value)) {\n update([...current, value])\n }\n }\n }\n }\n}\n\nconst unregister = (value: CollapseValue) => {\n const idx = registeredValues.value.indexOf(value)\n if (idx > -1) {\n registeredValues.value.splice(idx, 1)\n }\n}\n\nprovide(CollapseDIKey, {\n cls,\n size,\n expandIcon,\n activeValues,\n toggle,\n expandTransition,\n register,\n unregister\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAkBA,MAAM,QAAQ;EAId,MAAM,OAAO;EAEb,MAAM,MAAM,IAAI,WAAU;EAE1B,MAAM,mBAAmB,IAAI,iBAAiB,EAC5C,YAAY,6CACb,CAAA;EAED,MAAM,EAAE,SAAS,qBAAqB,CAAC,MAAK,EAAG,EAAE,MAAM,WAAW,CAAA;EAElE,MAAM,aAAa,eAAe,MAAM,WAAU;EAElD,MAAM,YAAY,eAAe,CAAC,IAAI,GAAG,IAAI,EAAE,KAAK,MAAM,CAAC,CAAA;EAE3D,MAAM,aAAa,WAAsC;GACvD;GACA;GACA,UAAU;GACX,CAAA;EAED,MAAM,eAAe,eAAgC;GACnD,MAAM,IAAI,WAAW;GACrB,IAAI,MAAM,KAAA,KAAa,MAAM,MAAM,OAAO,EAAC;GAC3C,OAAO,MAAM,QAAQ,EAAC,GAAI,IAAI,CAAC,EAAC;IACjC;EAED,MAAM,UAAU,SAA6B;GAC3C,WAAW,QAAQ;GACnB,KAAK,UAAU,KAAI;;EAGrB,MAAM,UAAU,UAAyB;GACvC,IAAI,MAAM,WAAW;IACnB,OAAO,aAAa,MAAM,OAAO,QAAQ,EAAC,GAAI,MAAK;IACnD;;GAGF,MAAM,SAAS,aAAa,MAAM,OAAM;GACxC,MAAM,QAAQ,OAAO,QAAQ,MAAK;GAClC,IAAI,QAAQ,IAAI,OAAO,OAAO,OAAO,EAAC;QACjC,OAAO,KAAK,MAAK;GACtB,OAAO,OAAM;;EAIf,MAAM,mBAAmB,IAAqB,EAAE,CAAA;EAGhD,MAAM,kBACJ,WAAW,UAAU,KAAA,KACrB,WAAW,UAAU,SACpB,CAAC,MAAM,QAAQ,WAAW,MAAK,IAAK,WAAW,MAAM,SAAS;EAEjE,MAAM,YAAY,UAAyB;GACzC,IAAI,CAAC,iBAAiB,MAAM,SAAS,MAAK,EAAG;IAC3C,iBAAiB,MAAM,KAAK,MAAK;IAGjC,IAAI,CAAC,MAAM,sBAAsB,CAAC,iBAChC,IAAI,MAAM;SACJ,iBAAiB,MAAM,WAAW,GACpC,OAAO,MAAK;WAET;KACL,MAAM,UAAU,MAAM,QAAQ,WAAW,MAAK,GAC1C,WAAW,QACX,WAAW,UAAU,KAAA,KAAa,WAAW,UAAU,OACrD,CAAC,WAAW,MAAK,GACjB,EAAC;KACP,IAAI,CAAC,QAAQ,SAAS,MAAK,EACzB,OAAO,CAAC,GAAG,SAAS,MAAM,CAAA;;;;EAOpC,MAAM,cAAc,UAAyB;GAC3C,MAAM,MAAM,iBAAiB,MAAM,QAAQ,MAAK;GAChD,IAAI,MAAM,IACR,iBAAiB,MAAM,OAAO,KAAK,EAAC;;EAIxC,QAAQ,eAAe;GACrB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAA;;uBAlHC,mBAEM,OAAA;IAFA,OAAK,eAAE,UAAA,MAAS;IAAE,MAAK;OAC3B,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,EAAA"}
|
|
@@ -13,7 +13,6 @@ declare const __VLS_base: _$vue.DefineComponent<CollapseProps, {}, {}, {}, {}, _
|
|
|
13
13
|
"onUpdate:modelValue"?: ((value: CollapseModelValue) => any) | undefined;
|
|
14
14
|
onChange?: ((value: CollapseModelValue) => any) | undefined;
|
|
15
15
|
}>, {
|
|
16
|
-
bordered: boolean;
|
|
17
16
|
accordion: boolean;
|
|
18
17
|
defaultCollapseAll: boolean;
|
|
19
18
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"di.js","names":[],"sources":["../../../src/components/collapse/di.ts"],"sourcesContent":["import { type BEM, type ComponentSize, ExpandTransition } from '@veltra/utils'\nimport type { Component, ComputedRef, InjectionKey } from 'vue'\n\nimport type { CollapseValue } from '../../types'\n\nexport interface CollapseContext {\n cls: BEM<'collapse'>\n size: ComputedRef<ComponentSize>\n
|
|
1
|
+
{"version":3,"file":"di.js","names":[],"sources":["../../../src/components/collapse/di.ts"],"sourcesContent":["import { type BEM, type ComponentSize, ExpandTransition } from '@veltra/utils'\nimport type { Component, ComputedRef, InjectionKey } from 'vue'\n\nimport type { CollapseValue } from '../../types'\n\nexport interface CollapseContext {\n cls: BEM<'collapse'>\n size: ComputedRef<ComponentSize>\n expandIcon: ComputedRef<Component | undefined>\n activeValues: ComputedRef<CollapseValue[]>\n toggle: (value: CollapseValue) => void\n expandTransition: ExpandTransition\n register: (value: CollapseValue) => void\n unregister: (value: CollapseValue) => void\n}\n\nexport const CollapseDIKey: InjectionKey<CollapseContext> = Symbol('Collapse')\n"],"mappings":";;AAgBA,MAAa,gBAA+C,OAAO,WAAW"}
|
|
@@ -22,18 +22,36 @@
|
|
|
22
22
|
background-color: transparent;
|
|
23
23
|
}
|
|
24
24
|
.u-collapse__item {
|
|
25
|
+
position: relative;
|
|
25
26
|
border-radius: calc(var(--u-radius-default) + 2px);
|
|
26
|
-
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
background-color: var(--u-collapse-item-bg, color-mix(in srgb, var(--u-bg-color-hover) 72%, var(--u-bg-color-top)));
|
|
27
29
|
transition: background-color 0.18s cubic-bezier(0.4, 0, 0.2, 1);
|
|
28
30
|
}
|
|
31
|
+
.u-collapse__item::before {
|
|
32
|
+
content: "";
|
|
33
|
+
position: absolute;
|
|
34
|
+
top: 0;
|
|
35
|
+
bottom: 0;
|
|
36
|
+
left: 0;
|
|
37
|
+
width: 3px;
|
|
38
|
+
background-color: var(--u-color-primary);
|
|
39
|
+
opacity: 0;
|
|
40
|
+
pointer-events: none;
|
|
41
|
+
transition: opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1);
|
|
42
|
+
z-index: 1;
|
|
43
|
+
}
|
|
29
44
|
.u-collapse__item + .u-collapse__item {
|
|
30
45
|
margin-top: var(--u-gap-default);
|
|
31
46
|
}
|
|
32
47
|
.u-collapse__item:not(.is-disabled):hover {
|
|
33
|
-
background-color: color-mix(in srgb, var(--u-
|
|
48
|
+
background-color: var(--u-collapse-item-hover-bg, color-mix(in srgb, var(--u-color-primary) 4%, var(--u-collapse-item-bg, color-mix(in srgb, var(--u-bg-color-hover) 72%, var(--u-bg-color-top)))));
|
|
34
49
|
}
|
|
35
50
|
.u-collapse__item.is-active {
|
|
36
|
-
background-color: color-mix(in srgb, var(--u-
|
|
51
|
+
background-color: var(--u-collapse-item-active-bg, color-mix(in srgb, var(--u-color-primary) 5%, var(--u-collapse-item-bg, color-mix(in srgb, var(--u-bg-color-hover) 72%, var(--u-bg-color-top)))));
|
|
52
|
+
}
|
|
53
|
+
.u-collapse__item.is-active::before {
|
|
54
|
+
opacity: 1;
|
|
37
55
|
}
|
|
38
56
|
.u-collapse__item.is-disabled {
|
|
39
57
|
opacity: 0.55;
|
|
@@ -61,10 +79,14 @@
|
|
|
61
79
|
}
|
|
62
80
|
.u-collapse__header.is-active {
|
|
63
81
|
font-weight: 600;
|
|
82
|
+
color: var(--u-collapse-active-title-color, var(--u-color-primary));
|
|
83
|
+
background-color: var(--u-collapse-header-active-bg, color-mix(in srgb, var(--u-color-primary) 8%, var(--u-collapse-item-bg, color-mix(in srgb, var(--u-bg-color-hover) 72%, var(--u-bg-color-top)))));
|
|
84
|
+
border-bottom-right-radius: 0;
|
|
85
|
+
border-bottom-left-radius: 0;
|
|
64
86
|
}
|
|
65
87
|
.u-collapse__header.is-active .u-collapse__icon {
|
|
66
88
|
transform: rotate(90deg);
|
|
67
|
-
color: var(--u-
|
|
89
|
+
color: var(--u-collapse-active-title-color, var(--u-color-primary));
|
|
68
90
|
}
|
|
69
91
|
.u-collapse__title {
|
|
70
92
|
flex: 1 1 auto;
|
|
@@ -83,6 +105,9 @@
|
|
|
83
105
|
.u-collapse__content-wrapper {
|
|
84
106
|
overflow: hidden;
|
|
85
107
|
height: 0;
|
|
108
|
+
border-bottom-right-radius: inherit;
|
|
109
|
+
border-bottom-left-radius: inherit;
|
|
110
|
+
background-color: var(--u-collapse-content-bg, color-mix(in srgb, var(--u-collapse-item-active-bg, color-mix(in srgb, var(--u-color-primary) 5%, var(--u-collapse-item-bg, color-mix(in srgb, var(--u-bg-color-hover) 72%, var(--u-bg-color-top))))) 42%, var(--u-bg-color-top)));
|
|
86
111
|
transition: height 0.24s cubic-bezier(0.4, 0, 0.2, 1);
|
|
87
112
|
}
|
|
88
113
|
.u-collapse__content {
|
|
@@ -140,16 +165,3 @@
|
|
|
140
165
|
.u-collapse--large .u-collapse__item + .u-collapse__item {
|
|
141
166
|
margin-top: var(--u-gap-large);
|
|
142
167
|
}
|
|
143
|
-
.u-collapse.is-bordered .u-collapse__item {
|
|
144
|
-
background-color: transparent;
|
|
145
|
-
border: 1px solid var(--u-border-color);
|
|
146
|
-
}
|
|
147
|
-
.u-collapse.is-bordered .u-collapse__item:hover, .u-collapse.is-bordered .u-collapse__item.is-active {
|
|
148
|
-
background-color: transparent;
|
|
149
|
-
}
|
|
150
|
-
.u-collapse.is-bordered .u-collapse__header {
|
|
151
|
-
border-radius: 0;
|
|
152
|
-
}
|
|
153
|
-
.u-collapse.is-bordered .u-collapse__header.is-active {
|
|
154
|
-
border-bottom: 1px solid var(--u-border-color);
|
|
155
|
-
}
|
|
@@ -11,8 +11,8 @@ declare const __VLS_export: _$vue.DefineComponent<DatePanelProps, {}, {}, {}, {}
|
|
|
11
11
|
"onSelect:range-date"?: ((rangeDate?: [_$_cat_kit_core0.Dater, _$_cat_kit_core0.Dater] | undefined) => any) | undefined;
|
|
12
12
|
"onSelect:date"?: ((date: _$_cat_kit_core0.Dater) => any) | undefined;
|
|
13
13
|
}>, {
|
|
14
|
-
size: _$_veltra_utils0.ComponentSize;
|
|
15
14
|
type: "date" | "month" | "year";
|
|
15
|
+
size: _$_veltra_utils0.ComponentSize;
|
|
16
16
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
17
17
|
declare const _default: typeof __VLS_export;
|
|
18
18
|
//#endregion
|
|
@@ -8,10 +8,10 @@ declare const __VLS_export: _$vue.DefineComponent<DatePickerProps, {}, {}, {}, {
|
|
|
8
8
|
"onUpdate:modelValue"?: ((value?: string | number | Date | undefined) => any) | undefined;
|
|
9
9
|
}>, {
|
|
10
10
|
disabled: boolean;
|
|
11
|
-
readonly: boolean;
|
|
12
11
|
type: "date" | "month" | "year";
|
|
13
12
|
placeholder: string;
|
|
14
13
|
clearable: boolean;
|
|
14
|
+
readonly: boolean;
|
|
15
15
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
16
16
|
declare const _default: typeof __VLS_export;
|
|
17
17
|
//#endregion
|
|
@@ -8,10 +8,10 @@ declare const __VLS_export: _$vue.DefineComponent<DateRangePickerProps, {}, {},
|
|
|
8
8
|
"onUpdate:modelValue"?: ((value?: [string, string] | undefined) => any) | undefined;
|
|
9
9
|
}>, {
|
|
10
10
|
disabled: boolean;
|
|
11
|
-
readonly: boolean;
|
|
12
11
|
type: "date" | "month" | "year";
|
|
13
12
|
placeholder: [string, string];
|
|
14
13
|
clearable: boolean;
|
|
14
|
+
readonly: boolean;
|
|
15
15
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
16
16
|
declare const _default: typeof __VLS_export;
|
|
17
17
|
//#endregion
|
|
@@ -14,12 +14,12 @@ type __VLS_Slots = {} & {
|
|
|
14
14
|
declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
15
15
|
"update:modelValue": (value: boolean) => any;
|
|
16
16
|
} & {
|
|
17
|
-
"update:modelValue": (value: boolean) => any;
|
|
18
17
|
close: () => any;
|
|
18
|
+
"update:modelValue": (value: boolean) => any;
|
|
19
19
|
closed: () => any;
|
|
20
20
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
22
21
|
onClose?: (() => any) | undefined;
|
|
22
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
23
23
|
onClosed?: (() => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
25
|
direction: DrawerDirection;
|
|
@@ -3,8 +3,8 @@ import * as _$vue from "vue";
|
|
|
3
3
|
|
|
4
4
|
//#region src/components/empty/empty.vue.d.ts
|
|
5
5
|
declare const __VLS_export: _$vue.DefineComponent<EmptyProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<EmptyProps> & Readonly<{}>, {
|
|
6
|
-
size: number;
|
|
7
6
|
text: string;
|
|
7
|
+
size: number;
|
|
8
8
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
declare const _default: typeof __VLS_export;
|
|
10
10
|
//#endregion
|
|
@@ -28,8 +28,8 @@ declare const __VLS_export: _$vue.DefineComponent<__VLS_PublicProps, _FileViewer
|
|
|
28
28
|
}) => any) | undefined;
|
|
29
29
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
30
30
|
}>, {
|
|
31
|
-
modelValue: string;
|
|
32
31
|
open: boolean;
|
|
32
|
+
modelValue: string;
|
|
33
33
|
sidebarWidth: string | number | false;
|
|
34
34
|
sheetMaxRows: number;
|
|
35
35
|
downloadable: boolean;
|
|
@@ -17,27 +17,27 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, _InputExposed
|
|
|
17
17
|
"update:modelValue": (value: string | undefined) => any;
|
|
18
18
|
} & {
|
|
19
19
|
"update:modelValue": (value: string) => any;
|
|
20
|
+
clear: () => any;
|
|
20
21
|
change: (value: string) => any;
|
|
21
22
|
"suffix:click": (value?: string | undefined) => any;
|
|
22
23
|
"prefix:click": (value?: string | undefined) => any;
|
|
23
24
|
focus: (value?: string | undefined) => any;
|
|
24
|
-
clear: () => any;
|
|
25
25
|
blur: (value?: string | undefined) => any;
|
|
26
26
|
"native:input": (ev: Event) => any;
|
|
27
27
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
28
28
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
29
|
+
onClear?: (() => any) | undefined;
|
|
29
30
|
onChange?: ((value: string) => any) | undefined;
|
|
30
31
|
"onSuffix:click"?: ((value?: string | undefined) => any) | undefined;
|
|
31
32
|
"onPrefix:click"?: ((value?: string | undefined) => any) | undefined;
|
|
32
33
|
onFocus?: ((value?: string | undefined) => any) | undefined;
|
|
33
|
-
onClear?: (() => any) | undefined;
|
|
34
34
|
onBlur?: ((value?: string | undefined) => any) | undefined;
|
|
35
35
|
"onNative:input"?: ((ev: Event) => any) | undefined;
|
|
36
36
|
}>, {
|
|
37
37
|
disabled: boolean;
|
|
38
|
-
readonly: boolean;
|
|
39
38
|
placeholder: string;
|
|
40
39
|
clearable: boolean;
|
|
40
|
+
readonly: boolean;
|
|
41
41
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
42
42
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
43
43
|
declare const _default: typeof __VLS_export;
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
height: var(--u-form-component-height-small);
|
|
36
36
|
border-radius: var(--u-radius-small);
|
|
37
37
|
padding: 0 calc(var(--u-gap-small) / 2);
|
|
38
|
+
font-size: var(--u-font-size-main-small);
|
|
38
39
|
}
|
|
39
40
|
.u-input--small .u-input__native {
|
|
40
41
|
height: var(--u-form-component-height-small);
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
height: var(--u-form-component-height-default);
|
|
45
46
|
border-radius: var(--u-radius-default);
|
|
46
47
|
padding: 0 calc(var(--u-gap-default) / 2);
|
|
48
|
+
font-size: var(--u-font-size-main-default);
|
|
47
49
|
}
|
|
48
50
|
.u-input--default .u-input__native {
|
|
49
51
|
height: var(--u-form-component-height-default);
|
|
@@ -53,6 +55,7 @@
|
|
|
53
55
|
height: var(--u-form-component-height-large);
|
|
54
56
|
border-radius: var(--u-radius-large);
|
|
55
57
|
padding: 0 calc(var(--u-gap-large) / 2);
|
|
58
|
+
font-size: var(--u-font-size-main-large);
|
|
56
59
|
}
|
|
57
60
|
.u-input--large .u-input__native {
|
|
58
61
|
height: var(--u-form-component-height-large);
|
|
@@ -68,7 +71,7 @@
|
|
|
68
71
|
width: 100%;
|
|
69
72
|
flex-grow: 1;
|
|
70
73
|
color: var(--u-text-color-main);
|
|
71
|
-
font-size:
|
|
74
|
+
font-size: inherit;
|
|
72
75
|
padding: 0;
|
|
73
76
|
font-family: var(--u-font-family);
|
|
74
77
|
}
|
|
@@ -80,7 +83,7 @@
|
|
|
80
83
|
color: var(--u-text-color-placeholder);
|
|
81
84
|
}
|
|
82
85
|
.u-input__prefix, .u-input__suffix {
|
|
83
|
-
font-size:
|
|
86
|
+
font-size: inherit;
|
|
84
87
|
color: var(--u-text-color-main);
|
|
85
88
|
flex-shrink: 0;
|
|
86
89
|
min-width: 20px;
|
|
@@ -28,13 +28,13 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
28
28
|
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
29
29
|
onChange?: ((options: Record<string, any>[]) => any) | undefined;
|
|
30
30
|
}>, {
|
|
31
|
+
minWidth: string;
|
|
31
32
|
disabled: boolean;
|
|
32
|
-
readonly: boolean;
|
|
33
|
-
placeholder: string;
|
|
34
|
-
clearable: boolean;
|
|
35
33
|
labelKey: string;
|
|
36
34
|
valueKey: string;
|
|
37
|
-
|
|
35
|
+
placeholder: string;
|
|
36
|
+
clearable: boolean;
|
|
37
|
+
readonly: boolean;
|
|
38
38
|
visibilityLimit: number;
|
|
39
39
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
40
40
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -15,22 +15,22 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
15
15
|
"update:modelValue": (value: (string | number)[]) => any;
|
|
16
16
|
} & {
|
|
17
17
|
"update:modelValue": (value: any[]) => any;
|
|
18
|
-
change: (checked: Record<string, any>[]) => any;
|
|
19
18
|
clear: () => any;
|
|
19
|
+
change: (checked: Record<string, any>[]) => any;
|
|
20
20
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
21
|
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
22
|
-
onChange?: ((checked: Record<string, any>[]) => any) | undefined;
|
|
23
22
|
onClear?: (() => any) | undefined;
|
|
23
|
+
onChange?: ((checked: Record<string, any>[]) => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
|
+
minWidth: string;
|
|
25
26
|
disabled: boolean;
|
|
26
|
-
readonly: boolean;
|
|
27
|
-
placeholder: string;
|
|
28
|
-
clearable: boolean;
|
|
29
27
|
expandAll: boolean;
|
|
30
28
|
labelKey: string;
|
|
31
29
|
valueKey: string;
|
|
32
|
-
|
|
30
|
+
placeholder: string;
|
|
31
|
+
clearable: boolean;
|
|
33
32
|
filterable: boolean;
|
|
33
|
+
readonly: boolean;
|
|
34
34
|
visibilityLimit: number;
|
|
35
35
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
36
36
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -5,10 +5,10 @@ import * as _$_veltra_utils0 from "@veltra/utils";
|
|
|
5
5
|
//#region src/components/notification/notification.vue.d.ts
|
|
6
6
|
declare const __VLS_export: _$vue.DefineComponent<NotificationProps, _$_veltra_utils0.DeconstructValue<_NotificationExposed>, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<NotificationProps> & Readonly<{}>, {
|
|
7
7
|
closable: boolean;
|
|
8
|
+
position: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
8
9
|
duration: number;
|
|
9
10
|
offset: number;
|
|
10
11
|
buttonText: string;
|
|
11
|
-
position: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
12
12
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const _default: typeof __VLS_export;
|
|
14
14
|
//#endregion
|
|
@@ -3,8 +3,8 @@ import * as _$vue from "vue";
|
|
|
3
3
|
|
|
4
4
|
//#region src/components/number/number.vue.d.ts
|
|
5
5
|
declare const __VLS_export: _$vue.DefineComponent<NumberProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<NumberProps> & Readonly<{}>, {
|
|
6
|
-
duration: number;
|
|
7
6
|
format: "currency" | "percent" | "decimal";
|
|
7
|
+
duration: number;
|
|
8
8
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
declare const _default: typeof __VLS_export;
|
|
10
10
|
//#endregion
|
|
@@ -15,17 +15,17 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
15
15
|
"update:modelValue": (value: number | undefined) => any;
|
|
16
16
|
} & {
|
|
17
17
|
"update:modelValue": (value?: number | undefined) => any;
|
|
18
|
-
change: (value?: number | undefined) => any;
|
|
19
18
|
clear: () => any;
|
|
19
|
+
change: (value?: number | undefined) => any;
|
|
20
20
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
21
|
"onUpdate:modelValue"?: ((value?: number | undefined) => any) | undefined;
|
|
22
|
-
onChange?: ((value?: number | undefined) => any) | undefined;
|
|
23
22
|
onClear?: (() => any) | undefined;
|
|
23
|
+
onChange?: ((value?: number | undefined) => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
25
|
disabled: boolean;
|
|
26
|
-
readonly: boolean;
|
|
27
26
|
placeholder: string;
|
|
28
27
|
clearable: boolean;
|
|
28
|
+
readonly: boolean;
|
|
29
29
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
30
30
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
31
|
declare const _default: typeof __VLS_export;
|
|
@@ -25,8 +25,8 @@ declare const __VLS_export: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {},
|
|
|
25
25
|
"onUpdate:end"?: ((value: number | undefined) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
27
|
disabled: boolean;
|
|
28
|
-
readonly: boolean;
|
|
29
28
|
clearable: boolean;
|
|
29
|
+
readonly: boolean;
|
|
30
30
|
startPlaceholder: string;
|
|
31
31
|
endPlaceholder: string;
|
|
32
32
|
separator: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _sfc_main$1 from "../icon/icon.js";
|
|
2
2
|
import input_default from "../input/input.js";
|
|
3
|
-
import {
|
|
3
|
+
import { computed, createBlock, createCommentVNode, createElementVNode, createSlots, createVNode, defineComponent, mergeModels, mergeProps, nextTick, normalizeClass, openBlock, ref, renderSlot, shallowRef, unref, useModel, useSlots, withCtx, withModifiers } from "vue";
|
|
4
4
|
import { useFormFallbackProps } from "@veltra/compositions";
|
|
5
5
|
import { bem, injectFormContext } from "@veltra/utils";
|
|
6
|
-
import { Hide, View } from "@veltra/icons/normal";
|
|
6
|
+
import { Close, Hide, View } from "@veltra/icons/normal";
|
|
7
7
|
import { o } from "@cat-kit/core";
|
|
8
8
|
//#region src/components/password-input/password-input.vue
|
|
9
9
|
const passwordChar = "●";
|
|
@@ -50,7 +50,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
50
|
});
|
|
51
51
|
const inputProps = computed(() => {
|
|
52
52
|
return o(props).pick([
|
|
53
|
-
"clearable",
|
|
54
53
|
"disabled",
|
|
55
54
|
"placeholder",
|
|
56
55
|
"size"
|
|
@@ -58,6 +57,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
58
57
|
});
|
|
59
58
|
const cls = bem("password-input");
|
|
60
59
|
const model = useModel(__props, "modelValue");
|
|
60
|
+
const hovered = ref(false);
|
|
61
|
+
const handleMouseEnter = () => {
|
|
62
|
+
hovered.value = true;
|
|
63
|
+
};
|
|
64
|
+
const handleMouseLeave = () => {
|
|
65
|
+
hovered.value = false;
|
|
66
|
+
};
|
|
67
|
+
const showClear = computed(() => {
|
|
68
|
+
return props.clearable && !disabled.value && !!model.value && hovered.value;
|
|
69
|
+
});
|
|
61
70
|
const handleUpdatePwd = (e) => {
|
|
62
71
|
const target = e.target;
|
|
63
72
|
const val = target.value;
|
|
@@ -101,20 +110,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
101
110
|
size: unref(size),
|
|
102
111
|
readonly: unref(readonly),
|
|
103
112
|
disabled: unref(disabled),
|
|
113
|
+
clearable: false,
|
|
104
114
|
"onNative:input": handleUpdatePwd,
|
|
105
115
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => !$event && handleClear()),
|
|
106
|
-
|
|
116
|
+
onMouseenter: handleMouseEnter,
|
|
117
|
+
onMouseleave: handleMouseLeave
|
|
107
118
|
}), createSlots({
|
|
108
|
-
suffix: withCtx(() => [
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
119
|
+
suffix: withCtx(() => [createElementVNode("span", { class: normalizeClass(unref(cls).e("suffix")) }, [showClear.value ? (openBlock(), createBlock(unref(_sfc_main$1), {
|
|
120
|
+
key: 0,
|
|
121
|
+
class: normalizeClass(unref(cls).e("clear")),
|
|
122
|
+
title: "清除",
|
|
123
|
+
onClick: withModifiers(handleClear, ["stop"])
|
|
124
|
+
}, {
|
|
125
|
+
default: withCtx(() => [createVNode(unref(Close))]),
|
|
126
|
+
_: 1
|
|
127
|
+
}, 8, ["class"])) : createCommentVNode("v-if", true), createVNode(unref(_sfc_main$1), {
|
|
128
|
+
class: normalizeClass(unref(cls).e("visibility-toggle")),
|
|
129
|
+
size: 18,
|
|
130
|
+
onClick: withModifiers(toggleVisible, ["stop"])
|
|
131
|
+
}, {
|
|
132
|
+
default: withCtx(() => [pwdVisible.value ? (openBlock(), createBlock(unref(Hide), { key: 0 })) : (openBlock(), createBlock(unref(View), { key: 1 }))]),
|
|
116
133
|
_: 1
|
|
117
|
-
})]),
|
|
134
|
+
}, 8, ["class"])], 2)]),
|
|
118
135
|
_: 2
|
|
119
136
|
}, [slots.prefix ? {
|
|
120
137
|
name: "prefix",
|