@antify/ui 3.1.6 → 3.1.8
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/AntButton.vue +9 -2
- package/dist/components/AntToaster.vue +2 -0
- package/dist/components/inputs/Elements/AntSelectMenu.vue +1 -0
- package/dist/enums/Position.enum.d.ts +2 -0
- package/dist/enums/Position.enum.js +2 -0
- package/dist/enums/Position.enum.mjs +2 -0
- package/package.json +1 -1
|
@@ -31,6 +31,10 @@ import {
|
|
|
31
31
|
IconSize,
|
|
32
32
|
} from './__types/AntIcon.types';
|
|
33
33
|
|
|
34
|
+
defineOptions({
|
|
35
|
+
inheritAttrs: false,
|
|
36
|
+
});
|
|
37
|
+
|
|
34
38
|
defineEmits([
|
|
35
39
|
'click',
|
|
36
40
|
'blur',
|
|
@@ -55,6 +59,7 @@ const props = withDefaults(defineProps<{
|
|
|
55
59
|
tooltipPosition?: Position;
|
|
56
60
|
tooltipState?: InputState;
|
|
57
61
|
tooltipDelay?: number;
|
|
62
|
+
dataE2e?: string;
|
|
58
63
|
}>(), {
|
|
59
64
|
state: State.base,
|
|
60
65
|
disabled: false,
|
|
@@ -71,6 +76,7 @@ const props = withDefaults(defineProps<{
|
|
|
71
76
|
tooltipPosition: Position.bottom,
|
|
72
77
|
tooltipState: InputState.base,
|
|
73
78
|
tooltipDelay: 800,
|
|
79
|
+
dataE2e: 'button',
|
|
74
80
|
});
|
|
75
81
|
|
|
76
82
|
const hasInputState = computed(() => props.skeleton || props.readonly || props.disabled);
|
|
@@ -209,8 +215,6 @@ onMounted(() => {
|
|
|
209
215
|
<div
|
|
210
216
|
class="inline-flex h-fit"
|
|
211
217
|
:class="{'w-full': props.expanded}"
|
|
212
|
-
data-e2e="button"
|
|
213
|
-
:data-e2e-state="props.state"
|
|
214
218
|
>
|
|
215
219
|
<AntTooltip
|
|
216
220
|
class="w-full"
|
|
@@ -224,6 +228,9 @@ onMounted(() => {
|
|
|
224
228
|
:to="to"
|
|
225
229
|
:disabled="disabled || undefined"
|
|
226
230
|
:tabindex="noFocus || hasInputState ? '-1' : '0'"
|
|
231
|
+
v-bind="$attrs"
|
|
232
|
+
:data-e2e="dataE2e"
|
|
233
|
+
:data-e2e-state="props.state"
|
|
227
234
|
@click="(e: MouseEvent) => !props.readonly ? $emit('click', e) : null"
|
|
228
235
|
@blur="(e: FocusEvent) => !props.readonly ? $emit('blur', e) : null"
|
|
229
236
|
>
|
|
@@ -41,8 +41,10 @@ const transitionName = computed(() => {
|
|
|
41
41
|
|
|
42
42
|
const classes = computed(() => ({
|
|
43
43
|
'left-0 top-0 items-start': props.position === CornerPosition.topLeft,
|
|
44
|
+
'left-[50%] -translate-x-1/2 top-0': props.position === CornerPosition.topCenter,
|
|
44
45
|
'right-0 top-0 items-end': props.position === CornerPosition.topRight,
|
|
45
46
|
'left-0 bottom-0 items-start': props.position === CornerPosition.bottomLeft,
|
|
47
|
+
'left-[50%] -translate-x-1/2 bottom-0': props.position === CornerPosition.bottomCenter,
|
|
46
48
|
'right-0 bottom-0 items-end': props.position === CornerPosition.bottomRight,
|
|
47
49
|
}));
|
|
48
50
|
</script>
|
|
@@ -13,8 +13,10 @@ var Position = exports.Position = /* @__PURE__ */(Position2 => {
|
|
|
13
13
|
})(Position || {});
|
|
14
14
|
var CornerPosition = exports.CornerPosition = /* @__PURE__ */(CornerPosition2 => {
|
|
15
15
|
CornerPosition2["topLeft"] = "topLeft";
|
|
16
|
+
CornerPosition2["topCenter"] = "topCenter";
|
|
16
17
|
CornerPosition2["topRight"] = "topRight";
|
|
17
18
|
CornerPosition2["bottomRight"] = "bottomRight";
|
|
19
|
+
CornerPosition2["bottomCenter"] = "bottomCenter";
|
|
18
20
|
CornerPosition2["bottomLeft"] = "bottomLeft";
|
|
19
21
|
return CornerPosition2;
|
|
20
22
|
})(CornerPosition || {});
|
|
@@ -7,8 +7,10 @@ export var Position = /* @__PURE__ */ ((Position2) => {
|
|
|
7
7
|
})(Position || {});
|
|
8
8
|
export var CornerPosition = /* @__PURE__ */ ((CornerPosition2) => {
|
|
9
9
|
CornerPosition2["topLeft"] = "topLeft";
|
|
10
|
+
CornerPosition2["topCenter"] = "topCenter";
|
|
10
11
|
CornerPosition2["topRight"] = "topRight";
|
|
11
12
|
CornerPosition2["bottomRight"] = "bottomRight";
|
|
13
|
+
CornerPosition2["bottomCenter"] = "bottomCenter";
|
|
12
14
|
CornerPosition2["bottomLeft"] = "bottomLeft";
|
|
13
15
|
return CornerPosition2;
|
|
14
16
|
})(CornerPosition || {});
|