@veltra/desktop 1.0.14 → 1.1.0
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 +3 -3
- package/dist/components/action/action.vue.d.ts +1 -1
- package/dist/components/action/style2.css +2 -2
- package/dist/components/auto-complete/auto-complete.vue.d.ts +2 -2
- package/dist/components/auto-complete/style2.css +5 -4
- package/dist/components/badge/badge.js +2 -1
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/components/batch-edit/style2.css +2 -2
- package/dist/components/breadcrumb/style2.css +1 -1
- package/dist/components/button/button.vue.d.ts +1 -1
- package/dist/components/button/style2.css +8 -7
- package/dist/components/card/style2.css +2 -0
- package/dist/components/cascade/cascade.vue.d.ts +5 -5
- package/dist/components/cascade/style2.css +4 -3
- package/dist/components/check-tag/check-tag.js +1 -1
- package/dist/components/checkbox/style2.css +1 -1
- package/dist/components/code-editor/style2.css +7 -9
- package/dist/components/collapse/collapse.vue.d.ts +1 -1
- package/dist/components/collapse/style2.css +3 -3
- package/dist/components/context-menu/style2.css +3 -1
- package/dist/components/date-picker/date-picker.vue.d.ts +4 -4
- package/dist/components/date-range-picker/date-range-picker.vue.d.ts +2 -2
- package/dist/components/date-range-picker/style2.css +5 -4
- package/dist/components/dialog/style2.css +2 -0
- package/dist/components/drawer/style2.css +2 -1
- package/dist/components/dropdown/style2.css +2 -0
- package/dist/components/expression-editor/components/variable-picker.js +1 -0
- package/dist/components/expression-editor/components/variable-picker.js.map +1 -1
- package/dist/components/expression-editor/core/editor.js +1 -0
- package/dist/components/expression-editor/core/editor.js.map +1 -1
- package/dist/components/expression-editor/style2.css +7 -6
- package/dist/components/file-viewer/style2.css +6 -6
- package/dist/components/form-item/style2.css +5 -2
- package/dist/components/input/input.js.map +1 -1
- package/dist/components/input/input.vue.d.ts +6 -6
- package/dist/components/input/input.vue_vue_type_script_setup_true_lang.js +30 -13
- package/dist/components/input/input.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/input/style2.css +11 -14
- package/dist/components/menu/style2.css +4 -2
- package/dist/components/multi-select/multi-select.vue.d.ts +3 -3
- package/dist/components/multi-select/style2.css +5 -4
- package/dist/components/multi-tree-select/multi-tree-select.vue.d.ts +5 -5
- package/dist/components/multi-tree-select/style2.css +5 -4
- package/dist/components/notification/notification.vue.d.ts +2 -2
- package/dist/components/number/number.vue.d.ts +1 -1
- package/dist/components/number-input/number-input.js +48 -10
- package/dist/components/number-input/number-input.js.map +1 -1
- package/dist/components/number-input/number-input.vue.d.ts +4 -2
- package/dist/components/number-input/style2.css +25 -0
- package/dist/components/number-range-input/number-range-input.vue.d.ts +1 -1
- package/dist/components/palette/palette.js +10 -3
- package/dist/components/palette/palette.js.map +1 -1
- package/dist/components/password-input/password-input.vue.d.ts +1 -1
- package/dist/components/progress-nodes/style2.css +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.vue.d.ts +1 -1
- package/dist/components/rich-text-editor/style2.css +2 -2
- package/dist/components/select/select.js +6 -2
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/select/select.vue.d.ts +2 -2
- package/dist/components/switch/style2.css +3 -0
- package/dist/components/tabs/tabs-horizontal.vue.d.ts +2 -2
- package/dist/components/tabs/tabs-vertical.vue.d.ts +1 -1
- package/dist/components/tabs/tabs.vue.d.ts +2 -2
- package/dist/components/textarea/style2.css +7 -6
- package/dist/components/textarea/textarea.vue.d.ts +4 -4
- package/dist/components/theme/style2.css +2 -1
- package/dist/components/tip/tip.js +4 -5
- package/dist/components/tip/tip.js.map +1 -1
- package/dist/components/tip/tip.vue.d.ts +1 -1
- package/dist/components/tree-select/tree-select.vue.d.ts +5 -5
- package/dist/types/badge.d.ts +1 -1
- package/dist/types/check-tag.d.ts +1 -1
- package/dist/types/date-picker.d.ts +2 -2
- package/dist/types/number-input.d.ts +1 -0
- package/package.json +11 -11
- package/src/components/action/style.scss +2 -2
- package/src/components/auto-complete/style.scss +5 -4
- package/src/components/badge/badge.vue +4 -1
- package/src/components/batch-edit/style.scss +2 -2
- package/src/components/breadcrumb/style.scss +4 -2
- package/src/components/button/style.scss +2 -1
- package/src/components/card/style.scss +2 -0
- package/src/components/cascade/style.scss +4 -4
- package/src/components/checkbox/style.scss +2 -1
- package/src/components/code-editor/style.scss +7 -8
- package/src/components/collapse/style.scss +13 -7
- package/src/components/context-menu/style.scss +6 -2
- package/src/components/date-range-picker/style.scss +5 -5
- package/src/components/dialog/style.scss +2 -1
- package/src/components/drawer/style.scss +2 -1
- package/src/components/dropdown/style.scss +2 -0
- package/src/components/expression-editor/__test__/editor.test.ts +47 -0
- package/src/components/expression-editor/components/variable-picker.vue +1 -0
- package/src/components/expression-editor/core/editor.ts +1 -0
- package/src/components/expression-editor/style.scss +13 -10
- package/src/components/file-viewer/style.scss +7 -7
- package/src/components/form-item/style.scss +3 -3
- package/src/components/input/input.vue +30 -11
- package/src/components/input/style.scss +16 -17
- package/src/components/menu/style.scss +4 -2
- package/src/components/multi-select/style.scss +5 -5
- package/src/components/multi-tree-select/style.scss +5 -4
- package/src/components/number-input/__test__/number-input.test.ts +60 -0
- package/src/components/number-input/number-input.vue +48 -5
- package/src/components/number-input/style.scss +30 -0
- package/src/components/palette/palette.vue +14 -4
- package/src/components/progress-nodes/style.scss +1 -1
- package/src/components/rich-text-editor/style.scss +8 -4
- package/src/components/select/select.vue +9 -2
- package/src/components/switch/style.scss +3 -0
- package/src/components/tabs/style.scss +4 -2
- package/src/components/textarea/style.scss +9 -8
- package/src/components/theme/style.scss +2 -1
- package/src/components/tip/tip.vue +4 -3
- package/src/components/tree/style.scss +2 -2
- package/src/types/badge.ts +1 -1
- package/src/types/check-tag.ts +1 -1
- package/src/types/date-picker.ts +2 -2
- package/src/types/number-input.ts +1 -0
|
@@ -87,7 +87,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
87
87
|
const triggerDom = computed(() => {
|
|
88
88
|
return props.triggerDom || triggerRef.value?.$el;
|
|
89
89
|
});
|
|
90
|
-
const { popperContainerId } = usePop({
|
|
90
|
+
const { update, popperContainerId } = usePop({
|
|
91
91
|
triggerRef: triggerDom,
|
|
92
92
|
contentRef,
|
|
93
93
|
arrowRef,
|
|
@@ -98,10 +98,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
100
|
watch(triggerDom, (dom) => {
|
|
101
|
-
if (dom?.nodeType === Node.ELEMENT_NODE && visible.value) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
101
|
+
if (dom?.nodeType === Node.ELEMENT_NODE && visible.value) nextTick(() => {
|
|
102
|
+
update();
|
|
103
|
+
});
|
|
105
104
|
});
|
|
106
105
|
/** 外部节点 */
|
|
107
106
|
const externalNode = shallowRef();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tip.js","names":[],"sources":["../../../src/components/tip/tip.vue"],"sourcesContent":["<template>\n <!-- 触发 -->\n <UNodeRender v-bind=\"eventsHandlers\" :content=\"renderDefaultSlotTrigger()\" ref=\"triggerRef\" />\n\n <!-- 弹出内容 -->\n <teleport :to=\"`#${popperContainerId}`\">\n <transition name=\"tip\">\n <component\n v-if=\"tipVisible\"\n :is=\"contentTag\"\n :class=\"contentClass\"\n :style=\"[style, { zIndex: zIndex() }]\"\n ref=\"contentRef\"\n @mouseenter=\"eventsHandlers.onMouseenter\"\n @mouseleave=\"eventsHandlers.onMouseleave\"\n @click.stop\n v-click-outside=\"handleClickOutside\"\n >\n <UNodeRender v-if=\"externalNode\" :content=\"externalNode\" />\n\n <slot name=\"content\">{{ content }}</slot>\n\n <div :class=\"cls.e('arrow')\" v-if=\"!hideArrow\" ref=\"arrowRef\"></div>\n </component>\n </transition>\n </teleport>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useFallbackProps, usePop } from '@veltra/compositions'\nimport { vClickOutside } from '@veltra/directives'\nimport { bem, extractNormalVNodes, zIndex } from '@veltra/utils'\nimport { shallowRef, computed, useSlots, onBeforeUnmount, toRef, watch, nextTick } from 'vue'\n\nimport type { TipProps, ComponentSize, TipEmits } from '../../types'\nimport { UNodeRender } from '../node-render'\nimport { useNest } from './use-nest'\n\ndefineOptions({ name: 'Tip' })\n\nconst props = withDefaults(defineProps<TipProps>(), {\n content: '',\n trigger: 'hover',\n direction: 'top',\n alignment: 'center',\n contentTag: 'div',\n visible: undefined\n})\n\nconst emit = defineEmits<TipEmits>()\n\nconst cls = bem('tip')\nconst slots = useSlots()\nconst { size } = useFallbackProps([props], {\n size: 'default' as ComponentSize\n})\n\nconst contentClass = computed(() => {\n const fixed = [cls.e('content'), cls.m(size.value)]\n const className = props.class\n if (!Array.isArray(className)) {\n return [...fixed, className]\n }\n return [...fixed, ...className]\n})\n\nconst triggerRef = shallowRef<InstanceType<typeof UNodeRender>>()\nconst contentRef = shallowRef<HTMLElement>()\nconst arrowRef = shallowRef<HTMLElement>()\n\nconst _visible = shallowRef(false)\n\nconst visible = computed(() => {\n return props.visible !== undefined ? props.visible : _visible.value\n})\n\nfunction updateVisible(v: boolean) {\n if (props.visible === undefined) {\n _visible.value = v\n } else {\n emit('update:visible', v)\n }\n}\n\nconst tipVisible = useNest(visible)\n\nfunction renderDefaultSlotTrigger() {\n const nodes = slots.default?.()\n if (!nodes?.length) return null\n return extractNormalVNodes(nodes)[0]\n}\n\nconst eventsHandlers = computed(() => {\n const { trigger, disabled } = props\n\n const handlers: Record<string, Function> = {}\n\n if (disabled) return handlers\n\n if (trigger === 'click') {\n handlers.onClick = open\n } else if (trigger === 'hover') {\n handlers.onMouseenter = open\n handlers.onMouseleave = close\n }\n\n return handlers\n})\n\nconst handleClickOutside = (e: MouseEvent) => {\n if (props.trigger === 'hover') return\n\n // 点击的元素在触发元素中则啥也\n if (props.trigger === 'click' && triggerDom.value.contains(e.target as Node)) {\n return\n }\n close()\n}\n\nlet closeTimer: number | undefined = undefined\n\n/** 弹出 */\nconst open = (e?: PointerEvent) => {\n e?.stopPropagation()\n closeTimer !== undefined && clearTimeout(closeTimer)\n\n updateVisible(true)\n}\n/** 关闭 */\nconst close = () => {\n if (props.trigger === 'hover') {\n closeTimer = setTimeout(() => {\n updateVisible(false)\n }, 250)\n } else {\n updateVisible(false)\n }\n}\n\nconst triggerDom = computed(() => {\n return props.triggerDom || triggerRef.value?.$el\n})\n\nconst { popperContainerId } = usePop({\n triggerRef: triggerDom,\n contentRef,\n arrowRef,\n direction: toRef(() => props.direction),\n alignment: toRef(() => props.alignment),\n onTriggerPositionChange() {\n close()\n }\n})\n\nwatch(triggerDom, (dom) => {\n // TODO: 看起来不是很优雅\n if (dom?.nodeType === Node.ELEMENT_NODE && visible.value) {\n
|
|
1
|
+
{"version":3,"file":"tip.js","names":[],"sources":["../../../src/components/tip/tip.vue"],"sourcesContent":["<template>\n <!-- 触发 -->\n <UNodeRender v-bind=\"eventsHandlers\" :content=\"renderDefaultSlotTrigger()\" ref=\"triggerRef\" />\n\n <!-- 弹出内容 -->\n <teleport :to=\"`#${popperContainerId}`\">\n <transition name=\"tip\">\n <component\n v-if=\"tipVisible\"\n :is=\"contentTag\"\n :class=\"contentClass\"\n :style=\"[style, { zIndex: zIndex() }]\"\n ref=\"contentRef\"\n @mouseenter=\"eventsHandlers.onMouseenter\"\n @mouseleave=\"eventsHandlers.onMouseleave\"\n @click.stop\n v-click-outside=\"handleClickOutside\"\n >\n <UNodeRender v-if=\"externalNode\" :content=\"externalNode\" />\n\n <slot name=\"content\">{{ content }}</slot>\n\n <div :class=\"cls.e('arrow')\" v-if=\"!hideArrow\" ref=\"arrowRef\"></div>\n </component>\n </transition>\n </teleport>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useFallbackProps, usePop } from '@veltra/compositions'\nimport { vClickOutside } from '@veltra/directives'\nimport { bem, extractNormalVNodes, zIndex } from '@veltra/utils'\nimport { shallowRef, computed, useSlots, onBeforeUnmount, toRef, watch, nextTick } from 'vue'\n\nimport type { TipProps, ComponentSize, TipEmits } from '../../types'\nimport { UNodeRender } from '../node-render'\nimport { useNest } from './use-nest'\n\ndefineOptions({ name: 'Tip' })\n\nconst props = withDefaults(defineProps<TipProps>(), {\n content: '',\n trigger: 'hover',\n direction: 'top',\n alignment: 'center',\n contentTag: 'div',\n visible: undefined\n})\n\nconst emit = defineEmits<TipEmits>()\n\nconst cls = bem('tip')\nconst slots = useSlots()\nconst { size } = useFallbackProps([props], {\n size: 'default' as ComponentSize\n})\n\nconst contentClass = computed(() => {\n const fixed = [cls.e('content'), cls.m(size.value)]\n const className = props.class\n if (!Array.isArray(className)) {\n return [...fixed, className]\n }\n return [...fixed, ...className]\n})\n\nconst triggerRef = shallowRef<InstanceType<typeof UNodeRender>>()\nconst contentRef = shallowRef<HTMLElement>()\nconst arrowRef = shallowRef<HTMLElement>()\n\nconst _visible = shallowRef(false)\n\nconst visible = computed(() => {\n return props.visible !== undefined ? props.visible : _visible.value\n})\n\nfunction updateVisible(v: boolean) {\n if (props.visible === undefined) {\n _visible.value = v\n } else {\n emit('update:visible', v)\n }\n}\n\nconst tipVisible = useNest(visible)\n\nfunction renderDefaultSlotTrigger() {\n const nodes = slots.default?.()\n if (!nodes?.length) return null\n return extractNormalVNodes(nodes)[0]\n}\n\nconst eventsHandlers = computed(() => {\n const { trigger, disabled } = props\n\n const handlers: Record<string, Function> = {}\n\n if (disabled) return handlers\n\n if (trigger === 'click') {\n handlers.onClick = open\n } else if (trigger === 'hover') {\n handlers.onMouseenter = open\n handlers.onMouseleave = close\n }\n\n return handlers\n})\n\nconst handleClickOutside = (e: MouseEvent) => {\n if (props.trigger === 'hover') return\n\n // 点击的元素在触发元素中则啥也\n if (props.trigger === 'click' && triggerDom.value.contains(e.target as Node)) {\n return\n }\n close()\n}\n\nlet closeTimer: number | undefined = undefined\n\n/** 弹出 */\nconst open = (e?: PointerEvent) => {\n e?.stopPropagation()\n closeTimer !== undefined && clearTimeout(closeTimer)\n\n updateVisible(true)\n}\n/** 关闭 */\nconst close = () => {\n if (props.trigger === 'hover') {\n closeTimer = setTimeout(() => {\n updateVisible(false)\n }, 250)\n } else {\n updateVisible(false)\n }\n}\n\nconst triggerDom = computed(() => {\n return props.triggerDom || triggerRef.value?.$el\n})\n\nconst { update, popperContainerId } = usePop({\n triggerRef: triggerDom,\n contentRef,\n arrowRef,\n direction: toRef(() => props.direction),\n alignment: toRef(() => props.alignment),\n onTriggerPositionChange() {\n close()\n }\n})\n\nwatch(triggerDom, (dom) => {\n // TODO: 看起来不是很优雅\n if (dom?.nodeType === Node.ELEMENT_NODE && visible.value) {\n nextTick(() => {\n void update()\n })\n }\n})\n\n/** 外部节点 */\nconst externalNode = shallowRef<any>()\n\nonBeforeUnmount(() => {\n clearTimeout(closeTimer)\n})\n</script>\n"],"mappings":"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"}
|
|
@@ -14,8 +14,8 @@ declare const __VLS_base: _$vue.DefineComponent<TipProps, {}, {}, {}, {}, _$vue.
|
|
|
14
14
|
trigger: "hover" | "click";
|
|
15
15
|
contentTag: string;
|
|
16
16
|
visible: boolean;
|
|
17
|
-
direction: TipDirection;
|
|
18
17
|
content: string;
|
|
18
|
+
direction: TipDirection;
|
|
19
19
|
alignment: TipAlign;
|
|
20
20
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -15,24 +15,24 @@ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
|
15
15
|
declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
16
16
|
"update:modelValue": (value: string | number | undefined) => any;
|
|
17
17
|
} & {
|
|
18
|
-
clear: () => any;
|
|
19
18
|
change: (value?: string | number | undefined, selectedData?: Record<string, any> | undefined) => any;
|
|
19
|
+
clear: () => any;
|
|
20
20
|
"update:text": (text?: string | undefined) => any;
|
|
21
21
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
22
22
|
"onUpdate:modelValue"?: ((value: string | number | undefined) => any) | undefined;
|
|
23
|
-
onClear?: (() => any) | undefined;
|
|
24
23
|
onChange?: ((value?: string | number | undefined, selectedData?: Record<string, any> | undefined) => any) | undefined;
|
|
24
|
+
onClear?: (() => any) | undefined;
|
|
25
25
|
"onUpdate:text"?: ((text?: string | undefined) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
27
|
expandAll: boolean;
|
|
28
28
|
labelKey: string;
|
|
29
29
|
valueKey: string;
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
readonly: boolean;
|
|
32
|
+
minWidth: string;
|
|
30
33
|
placeholder: string;
|
|
31
34
|
clearable: boolean;
|
|
32
35
|
filterable: boolean;
|
|
33
|
-
minWidth: string;
|
|
34
|
-
disabled: boolean;
|
|
35
|
-
readonly: boolean;
|
|
36
36
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
37
37
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
38
38
|
declare const _default: typeof __VLS_export;
|
package/dist/types/badge.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Dater } from "@cat-kit/core";
|
|
|
4
4
|
//#region src/types/date-picker.d.ts
|
|
5
5
|
/** date-picker组件属性 */
|
|
6
6
|
interface DatePickerProps extends FormComponentProps {
|
|
7
|
-
modelValue?: string;
|
|
7
|
+
modelValue?: string | number | Date;
|
|
8
8
|
/** 占位 */
|
|
9
9
|
placeholder?: string;
|
|
10
10
|
/** 日期类型 */
|
|
@@ -20,7 +20,7 @@ interface DatePickerProps extends FormComponentProps {
|
|
|
20
20
|
}
|
|
21
21
|
/** date-picker组件定义的事件 */
|
|
22
22
|
interface DatePickerEmits {
|
|
23
|
-
(e: 'update:modelValue', value?: string): void;
|
|
23
|
+
(e: 'update:modelValue', value?: string | number | Date): void;
|
|
24
24
|
}
|
|
25
25
|
/** date-picker组件暴露的属性和方法(组件内部使用) */
|
|
26
26
|
interface _DatePickerExposed {}
|
|
@@ -25,6 +25,7 @@ interface NumberInputProps extends Omit<InputProps, 'modelValue'> {
|
|
|
25
25
|
interface NumberInputEmits {
|
|
26
26
|
(event: 'update:modelValue', value?: number): void;
|
|
27
27
|
(event: 'change', value?: number): void;
|
|
28
|
+
(event: 'clear'): void;
|
|
28
29
|
}
|
|
29
30
|
/** 数字输入组件暴露的属性和方法 */
|
|
30
31
|
interface NumberInputExposed {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltra/desktop",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"src"
|
|
@@ -61,22 +61,22 @@
|
|
|
61
61
|
"@lexical/rich-text": "^0.43.0",
|
|
62
62
|
"@lexical/selection": "^0.43.0",
|
|
63
63
|
"@lexical/utils": "^0.43.0",
|
|
64
|
-
"@veltra/compositions": "1.0
|
|
65
|
-
"@veltra/directives": "1.0
|
|
66
|
-
"@veltra/icons": "1.0
|
|
67
|
-
"@veltra/styles": "1.0
|
|
68
|
-
"@veltra/utils": "1.0
|
|
64
|
+
"@veltra/compositions": "1.1.0",
|
|
65
|
+
"@veltra/directives": "1.1.0",
|
|
66
|
+
"@veltra/icons": "1.1.0",
|
|
67
|
+
"@veltra/styles": "1.1.0",
|
|
68
|
+
"@veltra/utils": "1.1.0",
|
|
69
69
|
"@visactor/vtable": "^1.26.0",
|
|
70
70
|
"codemirror": "^6.0.2",
|
|
71
71
|
"docx-preview": "^0.3.7",
|
|
72
72
|
"lexical": "^0.43.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@veltra/compositions": "1.0
|
|
76
|
-
"@veltra/directives": "1.0
|
|
77
|
-
"@veltra/icons": "1.0
|
|
78
|
-
"@veltra/styles": "1.0
|
|
79
|
-
"@veltra/utils": "1.0
|
|
75
|
+
"@veltra/compositions": "1.1.0",
|
|
76
|
+
"@veltra/directives": "1.1.0",
|
|
77
|
+
"@veltra/icons": "1.1.0",
|
|
78
|
+
"@veltra/styles": "1.1.0",
|
|
79
|
+
"@veltra/utils": "1.1.0",
|
|
80
80
|
"vue": "^3.5.33"
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -31,8 +31,8 @@ $group-name: action-group;
|
|
|
31
31
|
&:focus-within {
|
|
32
32
|
opacity: 1;
|
|
33
33
|
background-color: color-mix(in srgb, #{fn.use-var(bg-color, top)} 70%, transparent);
|
|
34
|
-
backdrop-filter:
|
|
35
|
-
-webkit-backdrop-filter:
|
|
34
|
+
backdrop-filter: fn.use-var(bg-filter);
|
|
35
|
+
-webkit-backdrop-filter: fn.use-var(bg-filter);
|
|
36
36
|
box-shadow: 0 1px 4px color-mix(in srgb, #{fn.use-var(shadow, color)} 35%, transparent);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -14,7 +14,7 @@ $root-name: auto-complete;
|
|
|
14
14
|
|
|
15
15
|
@include m.is(disabled) {
|
|
16
16
|
background-color: fn.use-var(color, disabled);
|
|
17
|
-
box-shadow:
|
|
17
|
+
box-shadow: none;
|
|
18
18
|
cursor: not-allowed;
|
|
19
19
|
|
|
20
20
|
@include m.bem($root-name, arrow) {
|
|
@@ -68,12 +68,13 @@ $root-name: auto-complete;
|
|
|
68
68
|
|
|
69
69
|
@include m.is(multiple) {
|
|
70
70
|
line-height: 1;
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
border: fn.use-var(border);
|
|
72
|
+
box-shadow: fn.use-var(shadow, emboss);
|
|
73
|
+
transition: border-color 0.25s ease, box-shadow 0.25s ease;
|
|
73
74
|
overflow: hidden;
|
|
74
75
|
@include m.flex($display: inline-flex);
|
|
75
76
|
&:hover {
|
|
76
|
-
|
|
77
|
+
border-color: fn.use-var(color, primary);
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
80
|
|
|
@@ -28,7 +28,10 @@ const { size } = useFallbackProps([props], {
|
|
|
28
28
|
|
|
29
29
|
const badgeValue = computed(() => {
|
|
30
30
|
if (props.dot) return ''
|
|
31
|
-
|
|
31
|
+
if (typeof props.value === 'number' && typeof props.max === 'number') {
|
|
32
|
+
return props.value > props.max ? `${props.max}+` : props.value
|
|
33
|
+
}
|
|
34
|
+
return props.value
|
|
32
35
|
})
|
|
33
36
|
|
|
34
37
|
const classList = computed(() => {
|
|
@@ -21,8 +21,8 @@ $root-name: batch-edit;
|
|
|
21
21
|
.u-table__row.is-current .#{vars.$namespace}action-group.is-hover {
|
|
22
22
|
opacity: 1;
|
|
23
23
|
background-color: color-mix(in srgb, #{fn.use-var(bg-color, top)} 70%, transparent);
|
|
24
|
-
backdrop-filter:
|
|
25
|
-
-webkit-backdrop-filter:
|
|
24
|
+
backdrop-filter: fn.use-var(bg-filter);
|
|
25
|
+
-webkit-backdrop-filter: fn.use-var(bg-filter);
|
|
26
26
|
box-shadow: 0 1px 4px color-mix(in srgb, #{fn.use-var(shadow, color)} 35%, transparent);
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -44,8 +44,10 @@ $root-name: breadcrumb;
|
|
|
44
44
|
border-radius: fn.use-var(radius, small);
|
|
45
45
|
transition: color 0.15s ease;
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
@include m.is-not(disabled) {
|
|
48
|
+
&:hover {
|
|
49
|
+
color: fn.use-var(color, primary);
|
|
50
|
+
}
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
&:focus-visible {
|
|
@@ -19,6 +19,7 @@ $root-name: button;
|
|
|
19
19
|
-webkit-appearance: none;
|
|
20
20
|
border: none;
|
|
21
21
|
background-color: fn.use-var(color, default);
|
|
22
|
+
box-shadow: fn.use-var(shadow, emboss);
|
|
22
23
|
transition:
|
|
23
24
|
background-color 0.25s,
|
|
24
25
|
box-shadow 0.2s;
|
|
@@ -101,7 +102,7 @@ $root-name: button;
|
|
|
101
102
|
box-shadow: 0px 0px 0px 1px fn.use-var(color, $type);
|
|
102
103
|
}
|
|
103
104
|
|
|
104
|
-
|
|
105
|
+
@include m.is-not(disabled, loading) {
|
|
105
106
|
&:hover,
|
|
106
107
|
&:focus {
|
|
107
108
|
background-color: fn.use-var(color, $type, 'light-9');
|
|
@@ -8,6 +8,8 @@ $root-name: card;
|
|
|
8
8
|
border-radius: fn.use-var(radius, default);
|
|
9
9
|
background-color: fn.use-var(bg-color, top);
|
|
10
10
|
box-shadow: fn.use-var(shadow);
|
|
11
|
+
backdrop-filter: fn.use-var(bg-filter);
|
|
12
|
+
-webkit-backdrop-filter: fn.use-var(bg-filter);
|
|
11
13
|
overflow: hidden;
|
|
12
14
|
|
|
13
15
|
@include m.is(integrate) {
|
|
@@ -10,16 +10,16 @@ $menu-name: $root-name + '-panel-item';
|
|
|
10
10
|
width: 100%;
|
|
11
11
|
|
|
12
12
|
@include m.is(multiple) {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
border: fn.use-var(border);
|
|
14
|
+
box-shadow: fn.use-var(shadow, emboss);
|
|
15
|
+
transition: border-color 0.25s ease, box-shadow 0.25s ease;
|
|
15
16
|
overflow: hidden;
|
|
16
17
|
cursor: pointer;
|
|
17
18
|
|
|
18
19
|
@include m.flex($display: inline-flex);
|
|
19
20
|
|
|
20
21
|
&:hover {
|
|
21
|
-
|
|
22
|
-
box-shadow: inset 0 0 1px 1px fn.use-var(color, primary);
|
|
22
|
+
border-color: fn.use-var(color, primary);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@use 'pkg:@veltra/styles/vars';
|
|
4
4
|
|
|
5
5
|
$root-name: checkbox;
|
|
6
|
+
|
|
6
7
|
@include m.b($root-name) {
|
|
7
8
|
user-select: none;
|
|
8
9
|
vertical-align: middle;
|
|
@@ -51,7 +52,7 @@ $root-name: checkbox;
|
|
|
51
52
|
@include m.e(wrap) {
|
|
52
53
|
border: fn.use-var(border, width) fn.use-var(border, style)
|
|
53
54
|
#{fn.component-var(checkbox, border, #ccc)};
|
|
54
|
-
border-radius:
|
|
55
|
+
border-radius: 6px;
|
|
55
56
|
color: #fff;
|
|
56
57
|
transition: background-color 0.15s ease;
|
|
57
58
|
@include m.flex(inline-flex, center);
|
|
@@ -21,13 +21,14 @@ $root-name: code-editor;
|
|
|
21
21
|
max-height: 480px;
|
|
22
22
|
border-radius: fn.use-var(radius, default);
|
|
23
23
|
background-color: var(--u-code-editor-bg);
|
|
24
|
-
|
|
24
|
+
border: 1px solid var(--u-code-editor-border);
|
|
25
|
+
box-shadow: fn.use-var(shadow, emboss);
|
|
25
26
|
overflow: hidden;
|
|
26
|
-
transition: box-shadow 0.2s ease;
|
|
27
|
+
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
|
27
28
|
|
|
28
29
|
&:hover,
|
|
29
30
|
&:focus-within {
|
|
30
|
-
|
|
31
|
+
border-color: fn.use-var(color, primary);
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
.cm-editor {
|
|
@@ -106,12 +107,12 @@ $root-name: code-editor;
|
|
|
106
107
|
|
|
107
108
|
@include m.is(disabled) {
|
|
108
109
|
background-color: fn.use-var(color, disabled);
|
|
109
|
-
box-shadow:
|
|
110
|
+
box-shadow: none;
|
|
110
111
|
cursor: not-allowed;
|
|
111
112
|
|
|
112
113
|
&:hover,
|
|
113
114
|
&:focus-within {
|
|
114
|
-
|
|
115
|
+
border-color: var(--u-code-editor-border);
|
|
115
116
|
}
|
|
116
117
|
|
|
117
118
|
.cm-editor,
|
|
@@ -121,11 +122,9 @@ $root-name: code-editor;
|
|
|
121
122
|
}
|
|
122
123
|
|
|
123
124
|
@include m.is(readonly) {
|
|
124
|
-
box-shadow: inset 0 0 0 1px var(--u-code-editor-border);
|
|
125
|
-
|
|
126
125
|
&:hover,
|
|
127
126
|
&:focus-within {
|
|
128
|
-
|
|
127
|
+
border-color: var(--u-code-editor-border);
|
|
129
128
|
}
|
|
130
129
|
}
|
|
131
130
|
}
|
|
@@ -73,8 +73,10 @@ $header-padding-y: (
|
|
|
73
73
|
color $transition-fast,
|
|
74
74
|
background-color $transition-fast;
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
@include m.is-not(disabled) {
|
|
77
|
+
&:hover {
|
|
78
|
+
background-color: fn.use-var(bg-color, hover);
|
|
79
|
+
}
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
&:focus-visible {
|
|
@@ -158,7 +160,7 @@ $header-padding-y: (
|
|
|
158
160
|
|
|
159
161
|
// ===== Ghost(无边框):项级胶囊化,反馈完全由 item hover 承担 =====
|
|
160
162
|
// 嵌入卡片 / 对话框时使用,不引入额外的容器边界
|
|
161
|
-
|
|
163
|
+
@include m.is-not(bordered) {
|
|
162
164
|
background-color: transparent;
|
|
163
165
|
|
|
164
166
|
#{fn.bem($root-name, item)} {
|
|
@@ -169,8 +171,10 @@ $header-padding-y: (
|
|
|
169
171
|
margin-top: 4px;
|
|
170
172
|
}
|
|
171
173
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
+
@include m.is-not(disabled) {
|
|
175
|
+
&:hover {
|
|
176
|
+
background-color: fn.use-var(bg-color, hover);
|
|
177
|
+
}
|
|
174
178
|
}
|
|
175
179
|
}
|
|
176
180
|
|
|
@@ -178,8 +182,10 @@ $header-padding-y: (
|
|
|
178
182
|
#{fn.bem($root-name, header)} {
|
|
179
183
|
border-radius: inherit;
|
|
180
184
|
|
|
181
|
-
|
|
182
|
-
|
|
185
|
+
@include m.is-not(disabled) {
|
|
186
|
+
&:hover {
|
|
187
|
+
background-color: transparent;
|
|
188
|
+
}
|
|
183
189
|
}
|
|
184
190
|
}
|
|
185
191
|
}
|
|
@@ -11,6 +11,8 @@ $root-name: context-menu;
|
|
|
11
11
|
box-shadow: fn.use-var(shadow);
|
|
12
12
|
border-radius: fn.use-var(radius, default);
|
|
13
13
|
padding: fn.use-var(gap, small);
|
|
14
|
+
backdrop-filter: fn.use-var(bg-filter);
|
|
15
|
+
-webkit-backdrop-filter: fn.use-var(bg-filter);
|
|
14
16
|
|
|
15
17
|
@include m.e(label) {
|
|
16
18
|
margin-left: fn.use-var(gap, small);
|
|
@@ -31,8 +33,10 @@ $root-name: context-menu;
|
|
|
31
33
|
border-radius: fn.use-var(radius, default);
|
|
32
34
|
@include m.flex;
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
@include m.is-not(disabled, loading) {
|
|
37
|
+
&:hover {
|
|
38
|
+
background-color: fn.use-var(color, primary, light-9);
|
|
39
|
+
}
|
|
36
40
|
}
|
|
37
41
|
|
|
38
42
|
@include m.is(disabled, loading) {
|
|
@@ -9,8 +9,9 @@ $root-name: date-range-picker;
|
|
|
9
9
|
width: 100%;
|
|
10
10
|
vertical-align: middle;
|
|
11
11
|
line-height: 1;
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
border: fn.use-var(border);
|
|
13
|
+
box-shadow: fn.use-var(shadow, emboss);
|
|
14
|
+
transition: border-color 0.25s ease, box-shadow 0.25s ease;
|
|
14
15
|
overflow: hidden;
|
|
15
16
|
|
|
16
17
|
@include m.flex($display: inline-flex);
|
|
@@ -26,8 +27,7 @@ $root-name: date-range-picker;
|
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
&:hover {
|
|
29
|
-
|
|
30
|
-
box-shadow: inset 0 0 0px 1px fn.use-var(color, primary);
|
|
30
|
+
border-color: fn.use-var(color, primary);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
@include m.e(input) {
|
|
@@ -71,7 +71,7 @@ $root-name: date-range-picker;
|
|
|
71
71
|
|
|
72
72
|
@include m.is(disabled) {
|
|
73
73
|
background-color: fn.use-var(color, disabled);
|
|
74
|
-
box-shadow:
|
|
74
|
+
box-shadow: none;
|
|
75
75
|
|
|
76
76
|
@include m.bem($root-name, input) {
|
|
77
77
|
cursor: not-allowed;
|
|
@@ -40,7 +40,8 @@ $root-name: dialog;
|
|
|
40
40
|
flex-shrink: 0;
|
|
41
41
|
overflow: hidden;
|
|
42
42
|
background-color: fn.use-var(bg-color, middle);
|
|
43
|
-
|
|
43
|
+
backdrop-filter: fn.use-var(bg-filter);
|
|
44
|
+
-webkit-backdrop-filter: fn.use-var(bg-filter);
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
// 弹框头
|
|
@@ -24,7 +24,8 @@ $direction-map: (
|
|
|
24
24
|
position: absolute;
|
|
25
25
|
border-radius: fn.use-var(radius, large);
|
|
26
26
|
background-color: fn.use-var(bg-color, top);
|
|
27
|
-
backdrop-filter:
|
|
27
|
+
backdrop-filter: fn.use-var(bg-filter);
|
|
28
|
+
-webkit-backdrop-filter: fn.use-var(bg-filter);
|
|
28
29
|
box-shadow: 0 0 10px 2px fn.use-var(shadow, color);
|
|
29
30
|
|
|
30
31
|
@include m.e(close) {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// @vitest-environment happy-dom
|
|
2
|
+
import { afterEach, describe, expect, it, vi } from 'vitest'
|
|
3
|
+
|
|
4
|
+
import { createEditor } from '../core/editor'
|
|
5
|
+
import { parse } from '../core/model'
|
|
6
|
+
|
|
7
|
+
const B = 'u-expression-editor'
|
|
8
|
+
const cls = {
|
|
9
|
+
b: B,
|
|
10
|
+
e: (n: string) => `${B}__${n}`,
|
|
11
|
+
m: (n: string) => `${B}--${n}`,
|
|
12
|
+
em: (e: string, m: string) => `${B}__${e}--${m}`,
|
|
13
|
+
create: () => cls
|
|
14
|
+
} as any
|
|
15
|
+
|
|
16
|
+
afterEach(() => {
|
|
17
|
+
document.body.innerHTML = ''
|
|
18
|
+
document.getSelection()?.removeAllRanges()
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
describe('createEditor composition', () => {
|
|
22
|
+
it('does not emit selection changes while IME composition text is pending', () => {
|
|
23
|
+
const container = document.createElement('div')
|
|
24
|
+
document.body.appendChild(container)
|
|
25
|
+
|
|
26
|
+
const onChange = vi.fn()
|
|
27
|
+
const onSelectionChange = vi.fn()
|
|
28
|
+
const editor = createEditor({
|
|
29
|
+
container,
|
|
30
|
+
cls,
|
|
31
|
+
initialDoc: parse('@'),
|
|
32
|
+
onChange,
|
|
33
|
+
onSelectionChange
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
container.dispatchEvent(new Event('compositionstart'))
|
|
37
|
+
container.querySelector('[data-seg="text"]')!.textContent = '@n'
|
|
38
|
+
container.dispatchEvent(new Event('input'))
|
|
39
|
+
editor.setCaretOffset(2)
|
|
40
|
+
document.dispatchEvent(new Event('selectionchange'))
|
|
41
|
+
|
|
42
|
+
expect(onChange).not.toHaveBeenCalled()
|
|
43
|
+
expect(onSelectionChange).not.toHaveBeenCalled()
|
|
44
|
+
|
|
45
|
+
editor.dispose()
|
|
46
|
+
})
|
|
47
|
+
})
|
|
@@ -368,6 +368,7 @@ export function createEditor(opts: EditorOptions): EditorAPI {
|
|
|
368
368
|
insertPlainTextAtCaret(text)
|
|
369
369
|
}
|
|
370
370
|
function onSelectionChange() {
|
|
371
|
+
if (composing) return
|
|
371
372
|
if (!opts.onSelectionChange) return
|
|
372
373
|
const sel = document.getSelection()
|
|
373
374
|
if (!sel || sel.rangeCount === 0) {
|
|
@@ -12,13 +12,15 @@ $root-name: expression-editor;
|
|
|
12
12
|
border-color: fn.use-var(border, color);
|
|
13
13
|
border-radius: fn.use-var(radius, default);
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
@include m.is-not(disabled, readonly) {
|
|
16
|
+
&:hover {
|
|
17
|
+
border-color: fn.use-var(color, primary);
|
|
18
|
+
}
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
&:focus-within {
|
|
21
|
+
border-color: fn.use-var(color, primary);
|
|
22
|
+
outline: none;
|
|
23
|
+
}
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
@include m.is('disabled') {
|
|
@@ -81,8 +83,8 @@ $root-name: expression-editor;
|
|
|
81
83
|
height: 22px;
|
|
82
84
|
line-height: 1;
|
|
83
85
|
font-size: 12px;
|
|
84
|
-
color: fn.use-var(
|
|
85
|
-
background-color: fn.use-var(color, primary);
|
|
86
|
+
color: fn.use-var(color, primary);
|
|
87
|
+
background-color: fn.use-var(color, primary, light-9);
|
|
86
88
|
border-radius: 999px;
|
|
87
89
|
cursor: pointer;
|
|
88
90
|
user-select: none;
|
|
@@ -91,7 +93,8 @@ $root-name: expression-editor;
|
|
|
91
93
|
box-shadow 0.12s ease;
|
|
92
94
|
|
|
93
95
|
&:hover {
|
|
94
|
-
|
|
96
|
+
color: fn.use-var(color, primary);
|
|
97
|
+
background-color: fn.use-var(color, primary, light-8);
|
|
95
98
|
box-shadow: 0 1px 4px fn.use-var(shadow, color);
|
|
96
99
|
|
|
97
100
|
.#{vars.$namespace}#{$root-name}__chip-close {
|
|
@@ -120,7 +123,7 @@ $root-name: expression-editor;
|
|
|
120
123
|
overflow: hidden;
|
|
121
124
|
font-size: 14px;
|
|
122
125
|
line-height: 1;
|
|
123
|
-
color: fn.use-var(
|
|
126
|
+
color: fn.use-var(color, primary);
|
|
124
127
|
opacity: 0;
|
|
125
128
|
transition:
|
|
126
129
|
opacity 0.12s ease,
|