@antify/ui-module 1.4.0 → 1.5.1
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/module.json +1 -1
- package/dist/module.mjs +2 -1
- package/dist/runtime/components/AntAccordionItem.vue +17 -14
- package/dist/runtime/components/AntDropdown.vue +6 -6
- package/dist/runtime/components/AntListGroupItem.vue +16 -10
- package/dist/runtime/components/AntModal.vue +10 -9
- package/dist/runtime/components/AntPopover.vue +10 -8
- package/dist/runtime/components/AntTooltip.vue +32 -20
- package/dist/runtime/components/__stories/AntTooltip.stories.d.ts +1 -1
- package/dist/runtime/components/__stories/AntTooltip.stories.mjs +164 -12
- package/dist/runtime/components/buttons/AntActionButton.vue +40 -32
- package/dist/runtime/components/buttons/AntButton.vue +188 -168
- package/dist/runtime/components/buttons/AntCreateButton.vue +19 -6
- package/dist/runtime/components/buttons/AntDeleteButton.vue +21 -10
- package/dist/runtime/components/buttons/AntDuplicateButton.vue +54 -0
- package/dist/runtime/components/buttons/AntEditButton.vue +54 -0
- package/dist/runtime/components/buttons/AntSaveAndNewButton.vue +21 -8
- package/dist/runtime/components/buttons/AntSaveButton.vue +21 -10
- package/dist/runtime/components/buttons/__stories/AntActionButton.stories.d.ts +1 -1
- package/dist/runtime/components/buttons/__stories/AntActionButton.stories.mjs +22 -19
- package/dist/runtime/components/buttons/__stories/AntButton.stories.d.ts +1 -0
- package/dist/runtime/components/buttons/__stories/AntButton.stories.mjs +166 -131
- package/dist/runtime/components/buttons/__stories/AntCreateButton.stories.d.ts +1 -0
- package/dist/runtime/components/buttons/__stories/AntCreateButton.stories.mjs +16 -6
- package/dist/runtime/components/buttons/__stories/AntDeleteButton.stories.d.ts +1 -0
- package/dist/runtime/components/buttons/__stories/AntDeleteButton.stories.mjs +16 -6
- package/dist/runtime/components/buttons/__stories/AntDuplicateButton.stories.d.ts +12 -0
- package/dist/runtime/components/buttons/__stories/AntDuplicateButton.stories.mjs +76 -0
- package/dist/runtime/components/buttons/__stories/AntEditButton.stories.d.ts +12 -0
- package/dist/runtime/components/buttons/__stories/AntEditButton.stories.mjs +76 -0
- package/dist/runtime/components/buttons/__stories/AntSaveAndNewButton.stories.d.ts +1 -0
- package/dist/runtime/components/buttons/__stories/AntSaveAndNewButton.stories.mjs +16 -6
- package/dist/runtime/components/buttons/__stories/AntSaveButton.stories.d.ts +1 -0
- package/dist/runtime/components/buttons/__stories/AntSaveButton.stories.mjs +16 -6
- package/dist/runtime/components/crud/AntCrud.vue +13 -10
- package/dist/runtime/components/crud/AntCrudDetail.vue +1 -1
- package/dist/runtime/components/crud/AntCrudDetailActions.vue +1 -1
- package/dist/runtime/components/crud/AntCrudDetailNav.vue +1 -1
- package/dist/runtime/components/crud/AntCrudTableFilter.vue +1 -1
- package/dist/runtime/components/crud/AntCrudTableNav.vue +15 -4
- package/dist/runtime/components/dialogs/AntDialog.vue +7 -7
- package/dist/runtime/components/form/AntCheckboxWidget/AntCheckbox.vue +1 -2
- package/dist/runtime/components/form/AntFormGroup.vue +22 -7
- package/dist/runtime/components/form/AntSelect.vue +57 -53
- package/dist/runtime/components/form/AntSwitch.vue +13 -10
- package/dist/runtime/components/form/AntSwitcher.vue +4 -4
- package/dist/runtime/components/form/AntTextarea.vue +6 -3
- package/dist/runtime/components/form/Elements/AntBaseInput.vue +45 -41
- package/dist/runtime/components/form/Elements/AntDropDown.vue +1 -1
- package/dist/runtime/components/layouts/AntNavLeftLayout.vue +4 -4
- package/dist/runtime/components/table/AntTable.vue +95 -73
- package/dist/runtime/components/table/AntTableSortButton.vue +16 -4
- package/dist/runtime/components/tabs/AntTabItem.vue +7 -4
- package/dist/runtime/tailwind.config.mjs +1 -1
- package/package.json +11 -11
- package/src/runtime/components/AntAccordionItem.vue +17 -14
- package/src/runtime/components/AntDropdown.vue +6 -6
- package/src/runtime/components/AntListGroupItem.vue +16 -10
- package/src/runtime/components/AntModal.vue +10 -9
- package/src/runtime/components/AntPopover.vue +10 -8
- package/src/runtime/components/AntTooltip.vue +32 -20
- package/src/runtime/components/buttons/AntActionButton.vue +40 -32
- package/src/runtime/components/buttons/AntButton.vue +188 -168
- package/src/runtime/components/buttons/AntCreateButton.vue +19 -6
- package/src/runtime/components/buttons/AntDeleteButton.vue +21 -10
- package/src/runtime/components/buttons/AntDuplicateButton.vue +54 -0
- package/src/runtime/components/buttons/AntEditButton.vue +54 -0
- package/src/runtime/components/buttons/AntSaveAndNewButton.vue +21 -8
- package/src/runtime/components/buttons/AntSaveButton.vue +21 -10
- package/src/runtime/components/crud/AntCrud.vue +13 -10
- package/src/runtime/components/crud/AntCrudDetail.vue +1 -1
- package/src/runtime/components/crud/AntCrudDetailActions.vue +1 -1
- package/src/runtime/components/crud/AntCrudDetailNav.vue +1 -1
- package/src/runtime/components/crud/AntCrudTableFilter.vue +1 -1
- package/src/runtime/components/crud/AntCrudTableNav.vue +15 -4
- package/src/runtime/components/dialogs/AntDialog.vue +7 -7
- package/src/runtime/components/form/AntCheckboxWidget/AntCheckbox.vue +1 -2
- package/src/runtime/components/form/AntFormGroup.vue +22 -7
- package/src/runtime/components/form/AntSelect.vue +57 -53
- package/src/runtime/components/form/AntSwitch.vue +13 -10
- package/src/runtime/components/form/AntSwitcher.vue +4 -4
- package/src/runtime/components/form/AntTextarea.vue +6 -3
- package/src/runtime/components/form/Elements/AntBaseInput.vue +45 -41
- package/src/runtime/components/form/Elements/AntDropDown.vue +1 -1
- package/src/runtime/components/layouts/AntNavLeftLayout.vue +4 -4
- package/src/runtime/components/table/AntTable.vue +95 -73
- package/src/runtime/components/table/AntTableSortButton.vue +16 -4
- package/src/runtime/components/tabs/AntTabItem.vue +7 -4
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import AntActionButton from './AntActionButton.vue';
|
|
3
|
+
import {Position, Size, Grouped, ColorType} from '../../enums';
|
|
4
|
+
import {faCopy} from '@fortawesome/free-solid-svg-icons';
|
|
5
|
+
|
|
6
|
+
defineEmits(['click', 'blur']);
|
|
7
|
+
withDefaults(defineProps<{
|
|
8
|
+
iconVariant?: boolean;
|
|
9
|
+
size?: Size;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
grouped?: Grouped;
|
|
12
|
+
skeleton?: boolean;
|
|
13
|
+
expanded?: boolean;
|
|
14
|
+
canDuplicate?: boolean;
|
|
15
|
+
tooltipPosition?: Position;
|
|
16
|
+
}>(), {
|
|
17
|
+
iconVariant: false,
|
|
18
|
+
canDuplicate: true
|
|
19
|
+
});
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<AntActionButton
|
|
24
|
+
:filled="false"
|
|
25
|
+
:color-type="ColorType.base"
|
|
26
|
+
:size="size"
|
|
27
|
+
:disabled="disabled"
|
|
28
|
+
:icon-left="iconVariant ? faCopy : undefined"
|
|
29
|
+
:grouped="grouped"
|
|
30
|
+
:skeleton="skeleton"
|
|
31
|
+
:expanded="expanded"
|
|
32
|
+
:has-permission="canDuplicate"
|
|
33
|
+
:tooltip-position="tooltipPosition"
|
|
34
|
+
data-e2e="duplicate-button"
|
|
35
|
+
@click="$emit('click')"
|
|
36
|
+
@blur="$emit('blur')"
|
|
37
|
+
>
|
|
38
|
+
<template
|
|
39
|
+
v-if="!iconVariant"
|
|
40
|
+
#default
|
|
41
|
+
>
|
|
42
|
+
Duplicate
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<template #invalidPermissionTooltipContent>
|
|
46
|
+
You have no permission to duplicate entries.<br>
|
|
47
|
+
Please contact your administrator.
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<template #tooltipContent>
|
|
51
|
+
Duplicate entry
|
|
52
|
+
</template>
|
|
53
|
+
</AntActionButton>
|
|
54
|
+
</template>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import AntActionButton from './AntActionButton.vue';
|
|
3
|
+
import {Position, Size, Grouped, ColorType} from '../../enums';
|
|
4
|
+
import {faPencil} from '@fortawesome/free-solid-svg-icons';
|
|
5
|
+
|
|
6
|
+
defineEmits(['click', 'blur']);
|
|
7
|
+
withDefaults(defineProps<{
|
|
8
|
+
iconVariant?: boolean;
|
|
9
|
+
size?: Size;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
grouped?: Grouped;
|
|
12
|
+
skeleton?: boolean;
|
|
13
|
+
expanded?: boolean;
|
|
14
|
+
canEdit?: boolean;
|
|
15
|
+
tooltipPosition?: Position;
|
|
16
|
+
}>(), {
|
|
17
|
+
iconVariant: false,
|
|
18
|
+
canEdit: true
|
|
19
|
+
});
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<AntActionButton
|
|
24
|
+
:filled="false"
|
|
25
|
+
:color-type="ColorType.base"
|
|
26
|
+
:size="size"
|
|
27
|
+
:disabled="disabled"
|
|
28
|
+
:icon-left="iconVariant ? faPencil : undefined"
|
|
29
|
+
:grouped="grouped"
|
|
30
|
+
:skeleton="skeleton"
|
|
31
|
+
:expanded="expanded"
|
|
32
|
+
:has-permission="canEdit"
|
|
33
|
+
:tooltip-position="tooltipPosition"
|
|
34
|
+
data-e2e="edit-button"
|
|
35
|
+
@click="$emit('click')"
|
|
36
|
+
@blur="$emit('blur')"
|
|
37
|
+
>
|
|
38
|
+
<template
|
|
39
|
+
v-if="!iconVariant"
|
|
40
|
+
#default
|
|
41
|
+
>
|
|
42
|
+
Edit
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<template #invalidPermissionTooltipContent>
|
|
46
|
+
You have no permission to edit entries.<br>
|
|
47
|
+
Please contact your administrator.
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<template #tooltipContent>
|
|
51
|
+
Edit entry
|
|
52
|
+
</template>
|
|
53
|
+
</AntActionButton>
|
|
54
|
+
</template>
|
|
@@ -1,42 +1,55 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import {Grouped} from '../../enums/Grouped.enum';
|
|
3
|
-
import {Size} from '../../enums/Size.enum';
|
|
4
2
|
import AntActionButton from './AntActionButton.vue';
|
|
5
|
-
import {Position} from '../../enums';
|
|
3
|
+
import {Position, Size, Grouped, ColorType} from '../../enums';
|
|
4
|
+
import {faFloppyDisk, faPlus} from '@fortawesome/free-solid-svg-icons';
|
|
6
5
|
|
|
7
6
|
defineEmits(['click', 'blur']);
|
|
8
7
|
withDefaults(defineProps<{
|
|
8
|
+
iconVariant?: boolean;
|
|
9
9
|
size?: Size;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
grouped?: Grouped;
|
|
12
12
|
skeleton?: boolean;
|
|
13
13
|
expanded?: boolean;
|
|
14
14
|
canSave?: boolean;
|
|
15
|
-
|
|
15
|
+
tooltipPosition?: Position;
|
|
16
16
|
}>(), {
|
|
17
|
+
iconVariant: false,
|
|
17
18
|
canSave: true
|
|
18
19
|
});
|
|
19
20
|
</script>
|
|
20
21
|
|
|
21
22
|
<template>
|
|
22
23
|
<AntActionButton
|
|
24
|
+
:filled="false"
|
|
25
|
+
:color-type="ColorType.primary"
|
|
23
26
|
:size="size"
|
|
24
27
|
:disabled="disabled"
|
|
28
|
+
:icon-left="iconVariant ? faFloppyDisk : undefined"
|
|
29
|
+
:icon-right="iconVariant ? faPlus : undefined"
|
|
25
30
|
:grouped="grouped"
|
|
26
31
|
:skeleton="skeleton"
|
|
27
32
|
:expanded="expanded"
|
|
28
|
-
:filled="false"
|
|
29
33
|
:has-permission="canSave"
|
|
30
|
-
:
|
|
34
|
+
:tooltip-position="tooltipPosition"
|
|
31
35
|
data-e2e="save-and-new-button"
|
|
32
36
|
@click="$emit('click')"
|
|
33
37
|
@blur="$emit('blur')"
|
|
34
38
|
>
|
|
35
|
-
<template
|
|
39
|
+
<template
|
|
40
|
+
v-if="!iconVariant"
|
|
41
|
+
#default
|
|
42
|
+
>
|
|
43
|
+
Save and new
|
|
44
|
+
</template>
|
|
36
45
|
|
|
37
46
|
<template #invalidPermissionTooltipContent>
|
|
38
|
-
You have no permission to save
|
|
47
|
+
You have no permission to save entries.<br>
|
|
39
48
|
Please contact your administrator.
|
|
40
49
|
</template>
|
|
50
|
+
|
|
51
|
+
<template #tooltipContent>
|
|
52
|
+
Save entry
|
|
53
|
+
</template>
|
|
41
54
|
</AntActionButton>
|
|
42
55
|
</template>
|
|
@@ -1,43 +1,54 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import {Grouped} from '../../enums/Grouped.enum';
|
|
3
|
-
import {Size} from '../../enums/Size.enum';
|
|
4
|
-
import {ColorType} from '../../enums/ColorType.enum';
|
|
5
2
|
import AntActionButton from './AntActionButton.vue';
|
|
6
|
-
import {Position} from '../../enums';
|
|
3
|
+
import {Position, Size, Grouped, ColorType} from '../../enums';
|
|
4
|
+
import {faFloppyDisk} from '@fortawesome/free-solid-svg-icons';
|
|
7
5
|
|
|
8
6
|
defineEmits(['click', 'blur']);
|
|
9
7
|
withDefaults(defineProps<{
|
|
8
|
+
iconVariant?: boolean;
|
|
10
9
|
size?: Size;
|
|
11
10
|
disabled?: boolean;
|
|
12
11
|
grouped?: Grouped;
|
|
13
12
|
skeleton?: boolean;
|
|
14
13
|
expanded?: boolean;
|
|
15
14
|
canSave?: boolean;
|
|
16
|
-
|
|
15
|
+
tooltipPosition?: Position;
|
|
17
16
|
}>(), {
|
|
17
|
+
iconVariant: false,
|
|
18
18
|
canSave: true
|
|
19
19
|
});
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
22
|
<template>
|
|
23
23
|
<AntActionButton
|
|
24
|
+
:filled="true"
|
|
25
|
+
:color-type="ColorType.primary"
|
|
24
26
|
:size="size"
|
|
25
27
|
:disabled="disabled"
|
|
28
|
+
:icon-left="iconVariant ? faFloppyDisk : undefined"
|
|
26
29
|
:grouped="grouped"
|
|
27
30
|
:skeleton="skeleton"
|
|
28
31
|
:expanded="expanded"
|
|
29
|
-
:color-type="ColorType.primary"
|
|
30
|
-
data-e2e="save-button"
|
|
31
32
|
:has-permission="canSave"
|
|
32
|
-
:
|
|
33
|
+
:tooltip-position="tooltipPosition"
|
|
34
|
+
data-e2e="save-button"
|
|
33
35
|
@click="$emit('click')"
|
|
34
36
|
@blur="$emit('blur')"
|
|
35
37
|
>
|
|
36
|
-
<template
|
|
38
|
+
<template
|
|
39
|
+
v-if="!iconVariant"
|
|
40
|
+
#default
|
|
41
|
+
>
|
|
42
|
+
Save
|
|
43
|
+
</template>
|
|
37
44
|
|
|
38
45
|
<template #invalidPermissionTooltipContent>
|
|
39
|
-
You have no permission to save
|
|
46
|
+
You have no permission to save entries.<br>
|
|
40
47
|
Please contact your administrator.
|
|
41
48
|
</template>
|
|
49
|
+
|
|
50
|
+
<template #tooltipContent>
|
|
51
|
+
Save entry
|
|
52
|
+
</template>
|
|
42
53
|
</AntActionButton>
|
|
43
54
|
</template>
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import AntActionButton from "../AntActionButton.vue";
|
|
2
|
-
import { Size } from "../../../enums/Size.enum.mjs";
|
|
3
2
|
import { Grouped as _Grouped } from "../../../enums/Grouped.enum.mjs";
|
|
4
|
-
import { Position } from "../../../enums/index.mjs";
|
|
3
|
+
import { ColorType, InputColorType, Position, Size } from "../../../enums/index.mjs";
|
|
5
4
|
const meta = {
|
|
6
5
|
title: "Components/Buttons/Action Button",
|
|
7
6
|
component: AntActionButton,
|
|
8
7
|
parameters: { controls: { sort: "requiredFirst" } },
|
|
9
8
|
argTypes: {
|
|
9
|
+
colorType: {
|
|
10
|
+
control: { type: "select" },
|
|
11
|
+
options: Object.values(ColorType)
|
|
12
|
+
},
|
|
10
13
|
size: {
|
|
11
14
|
control: { type: "radio" },
|
|
12
15
|
options: Object.values(Size)
|
|
@@ -15,9 +18,13 @@ const meta = {
|
|
|
15
18
|
control: { type: "select" },
|
|
16
19
|
options: Object.values(_Grouped)
|
|
17
20
|
},
|
|
18
|
-
|
|
21
|
+
tooltipPosition: {
|
|
19
22
|
control: { type: "select" },
|
|
20
23
|
options: Object.values(Position)
|
|
24
|
+
},
|
|
25
|
+
tooltipColorType: {
|
|
26
|
+
control: { type: "select" },
|
|
27
|
+
options: Object.values(InputColorType)
|
|
21
28
|
}
|
|
22
29
|
}
|
|
23
30
|
};
|
|
@@ -28,9 +35,15 @@ export const Docs = {
|
|
|
28
35
|
setup() {
|
|
29
36
|
return { args };
|
|
30
37
|
},
|
|
31
|
-
template:
|
|
38
|
+
template: `<AntActionButton v-bind="args">
|
|
39
|
+
<template #default>Action Button</template>
|
|
40
|
+
<template #tooltipContent>This is an action button</template>
|
|
41
|
+
<template #invalidPermissionTooltipContent>You have no permission <br>to click this button</template>
|
|
42
|
+
</AntActionButton>`
|
|
32
43
|
}),
|
|
33
|
-
args: {
|
|
44
|
+
args: {
|
|
45
|
+
tooltipPosition: Position.right
|
|
46
|
+
}
|
|
34
47
|
};
|
|
35
48
|
export const Disabled = {
|
|
36
49
|
render: Docs.render,
|
|
@@ -60,20 +73,10 @@ export const Expanded = {
|
|
|
60
73
|
expanded: true
|
|
61
74
|
}
|
|
62
75
|
};
|
|
63
|
-
export const
|
|
64
|
-
render:
|
|
65
|
-
components: { AntActionButton },
|
|
66
|
-
setup() {
|
|
67
|
-
return { args };
|
|
68
|
-
},
|
|
69
|
-
template: `<AntActionButton v-bind="args">
|
|
70
|
-
Action Button
|
|
71
|
-
|
|
72
|
-
<template #invalidPermissionTooltipContent>You have no permission to do this</template>
|
|
73
|
-
</AntActionButton>`
|
|
74
|
-
}),
|
|
76
|
+
export const WithoutPermission = {
|
|
77
|
+
render: Docs.render,
|
|
75
78
|
args: {
|
|
76
|
-
|
|
77
|
-
|
|
79
|
+
...Docs.args,
|
|
80
|
+
hasPermission: false
|
|
78
81
|
}
|
|
79
82
|
};
|