@antify/ui 2.2.0 → 2.2.3
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/AntAccordion.vue +25 -12
- package/dist/components/AntAccordionItem.vue +28 -13
- package/dist/components/AntAlert.vue +25 -15
- package/dist/components/AntCard.vue +26 -14
- package/dist/components/AntContent.vue +4 -4
- package/dist/components/AntDropdown.vue +41 -23
- package/dist/components/AntIcon.vue +18 -6
- package/dist/components/AntKeycap.vue +31 -16
- package/dist/components/AntListGroup.vue +13 -11
- package/dist/components/AntListGroupItem.vue +19 -9
- package/dist/components/AntModal.vue +26 -15
- package/dist/components/AntPagination.vue +28 -15
- package/dist/components/AntPopover.vue +74 -51
- package/dist/components/AntSkeleton.vue +8 -4
- package/dist/components/AntSpinner.vue +14 -6
- package/dist/components/AntTag.vue +25 -13
- package/dist/components/AntToast.vue +19 -11
- package/dist/components/AntToaster.vue +13 -5
- package/dist/components/AntTooltip.vue +78 -54
- package/dist/components/__stories/AntAccordion.stories.js +4 -4
- package/dist/components/__stories/AntAccordion.stories.mjs +50 -17
- package/dist/components/__stories/AntAlert.stories.mjs +18 -5
- package/dist/components/__stories/AntCard.stories.mjs +36 -10
- package/dist/components/__stories/AntContent.stories.mjs +14 -4
- package/dist/components/__stories/AntDropdown.stories.mjs +20 -4
- package/dist/components/__stories/AntIcon.stories.mjs +38 -12
- package/dist/components/__stories/AntKeycap.stories.mjs +35 -10
- package/dist/components/__stories/AntListGroup.stories.d.ts +1 -1
- package/dist/components/__stories/AntListGroup.stories.mjs +22 -4
- package/dist/components/__stories/AntListGroupItem.stories.mjs +27 -8
- package/dist/components/__stories/AntModal.stories.mjs +17 -4
- package/dist/components/__stories/AntPagination.stories.mjs +21 -6
- package/dist/components/__stories/AntPopover.stories.mjs +20 -4
- package/dist/components/__stories/AntSkeleton.stories.mjs +17 -5
- package/dist/components/__stories/AntSpinner.stories.mjs +33 -9
- package/dist/components/__stories/AntTag.stories.mjs +28 -8
- package/dist/components/__stories/AntToast.stories.mjs +19 -5
- package/dist/components/__stories/AntToaster.stories.d.ts +1 -1
- package/dist/components/__stories/AntToaster.stories.mjs +35 -9
- package/dist/components/__stories/AntTooltip.stories.js +1 -1
- package/dist/components/__stories/AntTooltip.stories.mjs +44 -13
- package/dist/components/buttons/AntActionButton.vue +38 -29
- package/dist/components/buttons/AntButton.vue +34 -13
- package/dist/components/buttons/AntCreateButton.vue +11 -4
- package/dist/components/buttons/AntDeleteButton.vue +11 -4
- package/dist/components/buttons/AntDuplicateButton.vue +11 -4
- package/dist/components/buttons/AntEditButton.vue +11 -4
- package/dist/components/buttons/AntSaveAndNewButton.vue +11 -4
- package/dist/components/buttons/AntSaveButton.vue +11 -4
- package/dist/components/buttons/__stories/AntActionButton.stories.mjs +35 -10
- package/dist/components/buttons/__stories/AntButton.stories.mjs +77 -23
- package/dist/components/buttons/__stories/AntCreateButton.stories.mjs +25 -7
- package/dist/components/buttons/__stories/AntDeleteButton.stories.mjs +25 -7
- package/dist/components/buttons/__stories/AntDuplicateButton.stories.mjs +25 -7
- package/dist/components/buttons/__stories/AntEditButton.stories.mjs +25 -7
- package/dist/components/buttons/__stories/AntSaveAndNewButton.stories.mjs +25 -7
- package/dist/components/buttons/__stories/AntSaveButton.stories.mjs +25 -7
- package/dist/components/crud/AntCrud.vue +6 -6
- package/dist/components/crud/AntCrudDetail.vue +8 -5
- package/dist/components/crud/AntCrudDetailActions.vue +14 -8
- package/dist/components/crud/AntCrudDetailNav.vue +21 -13
- package/dist/components/crud/AntCrudTableFilter.vue +29 -17
- package/dist/components/crud/AntCrudTableNav.vue +36 -22
- package/dist/components/crud/__stories/AntCrud.stories.mjs +17 -5
- package/dist/components/crud/__stories/AntCrudDetail.stories.mjs +11 -3
- package/dist/components/crud/__stories/AntCrudDetailActions.stories.mjs +10 -2
- package/dist/components/crud/__stories/AntCrudDetailNav.stories.mjs +11 -3
- package/dist/components/crud/__stories/AntCrudTableFilter.stories.mjs +17 -5
- package/dist/components/crud/__stories/AntCrudTableNav.stories.mjs +23 -7
- package/dist/components/dialogs/AntDeleteDialog.vue +13 -5
- package/dist/components/dialogs/AntDialog.vue +23 -13
- package/dist/components/dialogs/__stories/AndDeleteDialog.stories.mjs +12 -3
- package/dist/components/dialogs/__stories/AntDialog.stories.mjs +28 -7
- package/dist/components/forms/AntField.vue +18 -7
- package/dist/components/forms/AntFormGroup.vue +9 -5
- package/dist/components/forms/AntFormGroupLabel.vue +1 -1
- package/dist/components/forms/__stories/AntField.stories.mjs +37 -9
- package/dist/components/forms/__stories/AntFormGroup.stories.mjs +20 -5
- package/dist/components/forms/__stories/AntFormGroupLabel.stories.mjs +11 -3
- package/dist/components/index.d.ts +1 -1
- package/dist/components/inputs/AntCheckbox.vue +61 -36
- package/dist/components/inputs/AntCheckboxGroup.vue +40 -15
- package/dist/components/inputs/AntDateInput.vue +35 -12
- package/dist/components/inputs/AntNumberInput.vue +33 -12
- package/dist/components/inputs/AntPasswordInput.vue +32 -11
- package/dist/components/inputs/AntRadio.vue +57 -34
- package/dist/components/inputs/AntRadioGroup.vue +60 -35
- package/dist/components/inputs/AntRangeSlider.vue +31 -12
- package/dist/components/inputs/AntSearch.vue +19 -7
- package/dist/components/inputs/AntSelect.vue +107 -83
- package/dist/components/inputs/AntSwitch.vue +36 -18
- package/dist/components/inputs/AntSwitcher.vue +30 -15
- package/dist/components/inputs/AntTagInput.vue +91 -61
- package/dist/components/inputs/AntTextInput.vue +31 -11
- package/dist/components/inputs/AntTextarea.vue +53 -25
- package/dist/components/inputs/AntUnitInput.vue +33 -12
- package/dist/components/inputs/Elements/AntBaseInput.vue +47 -18
- package/dist/components/inputs/Elements/AntInputDescription.vue +16 -8
- package/dist/components/inputs/Elements/AntInputLabel.vue +13 -5
- package/dist/components/inputs/Elements/AntInputLimiter.vue +13 -5
- package/dist/components/inputs/Elements/AntSelectMenu.vue +65 -41
- package/dist/components/inputs/Elements/__stories/AntBaseInput.stories.mjs +104 -27
- package/dist/components/inputs/Elements/__stories/AntInputDescription.stories.mjs +33 -9
- package/dist/components/inputs/Elements/__stories/AntInputLabel.stories.mjs +34 -9
- package/dist/components/inputs/Elements/__stories/AntInputLimiter.stories.mjs +33 -9
- package/dist/components/inputs/Elements/index.d.ts +1 -1
- package/dist/components/inputs/__stories/AntCheckbox.stories.mjs +34 -9
- package/dist/components/inputs/__stories/AntCheckboxGroup.stories.mjs +45 -21
- package/dist/components/inputs/__stories/AntDateInput.stories.mjs +52 -14
- package/dist/components/inputs/__stories/AntNumberInput.stories.mjs +66 -17
- package/dist/components/inputs/__stories/AntPasswordInput.stories.mjs +51 -13
- package/dist/components/inputs/__stories/AntRadioGroup.stories.mjs +45 -12
- package/dist/components/inputs/__stories/AntRangeSlider.stories.mjs +16 -5
- package/dist/components/inputs/__stories/AntSearch.stories.mjs +41 -10
- package/dist/components/inputs/__stories/AntSelect.stories.mjs +59 -15
- package/dist/components/inputs/__stories/AntSwitch.stories.js +126 -102
- package/dist/components/inputs/__stories/AntSwitch.stories.mjs +162 -112
- package/dist/components/inputs/__stories/AntSwitcher.stories.mjs +38 -10
- package/dist/components/inputs/__stories/AntTagInput.stories.mjs +46 -12
- package/dist/components/inputs/__stories/AntTextInput.stories.mjs +59 -16
- package/dist/components/inputs/__stories/AntTextarea.stories.mjs +47 -13
- package/dist/components/inputs/__stories/AntUnitInput.stories.mjs +46 -12
- package/dist/components/layouts/AntNavLeftLayout.vue +12 -6
- package/dist/components/layouts/__stories/AntNavLeftLayout.stories.mjs +10 -2
- package/dist/components/navbar/AntNavbar.vue +7 -3
- package/dist/components/navbar/AntNavbarItem.vue +12 -6
- package/dist/components/navbar/__stories/AntNavbar.stories.mjs +59 -37
- package/dist/components/table/AntCollapsibleTableRowContent.vue +7 -5
- package/dist/components/table/AntTable.vue +227 -165
- package/dist/components/table/AntTableSkeleton.vue +126 -0
- package/dist/components/table/AntTableSortButton.vue +22 -13
- package/dist/components/table/AntTd.vue +21 -17
- package/dist/components/table/AntTh.vue +19 -12
- package/dist/components/table/__stories/AntTable.stories.js +132 -14
- package/dist/components/table/__stories/AntTable.stories.mjs +253 -31
- package/dist/components/table/__types/index.d.ts +0 -1
- package/dist/components/table/__types/index.js +0 -11
- package/dist/components/table/__types/index.mjs +0 -1
- package/dist/components/tabs/AntTabItem.vue +20 -8
- package/dist/components/tabs/AntTabs.vue +35 -21
- package/dist/components/tabs/__stories/AntTabItem.stories.mjs +23 -7
- package/dist/components/tabs/__stories/AntTabs.stories.mjs +45 -13
- package/dist/components/transitions/AntTransitionCollapseHeight.vue +1 -1
- package/dist/composables/useToaster.mjs +25 -7
- package/dist/index.css +1 -0
- package/dist/utils.mjs +3 -1
- package/package.json +23 -16
- package/dist/tailwind.config.d.ts +0 -3
- package/dist/tailwind.config.js +0 -198
- package/dist/tailwind.config.mjs +0 -189
|
@@ -1,17 +1,31 @@
|
|
|
1
1
|
import AntTooltip from "../AntTooltip.vue";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
InputState
|
|
4
|
+
} from "../../enums/index.mjs";
|
|
3
5
|
import AntButton from "../buttons/AntButton.vue";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
+
import {
|
|
7
|
+
onMounted,
|
|
8
|
+
ref
|
|
9
|
+
} from "vue";
|
|
10
|
+
import {
|
|
11
|
+
expect,
|
|
12
|
+
userEvent,
|
|
13
|
+
waitFor,
|
|
14
|
+
within
|
|
15
|
+
} from "@storybook/test";
|
|
6
16
|
const meta = {
|
|
7
17
|
title: "Components/Tooltip",
|
|
8
18
|
component: AntTooltip,
|
|
9
19
|
parameters: {
|
|
10
|
-
controls: {
|
|
20
|
+
controls: {
|
|
21
|
+
sort: "requiredFirst"
|
|
22
|
+
}
|
|
11
23
|
},
|
|
12
24
|
argTypes: {
|
|
13
25
|
state: {
|
|
14
|
-
control: {
|
|
26
|
+
control: {
|
|
27
|
+
type: "select"
|
|
28
|
+
},
|
|
15
29
|
options: Object.values(InputState)
|
|
16
30
|
}
|
|
17
31
|
}
|
|
@@ -19,7 +33,10 @@ const meta = {
|
|
|
19
33
|
export default meta;
|
|
20
34
|
export const Docs = {
|
|
21
35
|
render: (args) => ({
|
|
22
|
-
components: {
|
|
36
|
+
components: {
|
|
37
|
+
AntTooltip,
|
|
38
|
+
AntButton
|
|
39
|
+
},
|
|
23
40
|
setup() {
|
|
24
41
|
const scrollContainer = ref(void 0);
|
|
25
42
|
onMounted(() => {
|
|
@@ -28,11 +45,14 @@ export const Docs = {
|
|
|
28
45
|
scrollContainer.value.scrollTop = (scrollContainer.value.scrollHeight - scrollContainer.value.clientHeight) / 2;
|
|
29
46
|
}
|
|
30
47
|
});
|
|
31
|
-
return {
|
|
48
|
+
return {
|
|
49
|
+
args,
|
|
50
|
+
scrollContainer
|
|
51
|
+
};
|
|
32
52
|
},
|
|
33
53
|
template: `
|
|
34
54
|
<div ref="scrollContainer" class="dashed h-[50vh] w-[50vw] overflow-scroll">
|
|
35
|
-
<div class="flex
|
|
55
|
+
<div class="flex grow justify-center items-center h-screen w-[1000px]">
|
|
36
56
|
<AntTooltip v-bind="args">
|
|
37
57
|
<AntButton>Hover me</AntButton>
|
|
38
58
|
|
|
@@ -46,7 +66,10 @@ export const Docs = {
|
|
|
46
66
|
</div>
|
|
47
67
|
`
|
|
48
68
|
}),
|
|
49
|
-
play: async ({
|
|
69
|
+
play: async ({
|
|
70
|
+
canvasElement,
|
|
71
|
+
step
|
|
72
|
+
}) => {
|
|
50
73
|
const canvas = within(canvasElement);
|
|
51
74
|
const target = canvas.getByText("Hover me");
|
|
52
75
|
function queryTooltip() {
|
|
@@ -54,21 +77,29 @@ export const Docs = {
|
|
|
54
77
|
}
|
|
55
78
|
await step("Hover over the target and expect showing the tooltip", async () => {
|
|
56
79
|
await userEvent.hover(target);
|
|
57
|
-
await waitFor(() => expect(queryTooltip()).toBeInTheDocument(), {
|
|
80
|
+
await waitFor(() => expect(queryTooltip()).toBeInTheDocument(), {
|
|
81
|
+
timeout: 600
|
|
82
|
+
});
|
|
58
83
|
});
|
|
59
84
|
await step("Leave hover state and expect not showing the tooltip anymore", async () => {
|
|
60
85
|
await userEvent.unhover(target);
|
|
61
|
-
await waitFor(() => expect(queryTooltip()).not.toBeInTheDocument(), {
|
|
86
|
+
await waitFor(() => expect(queryTooltip()).not.toBeInTheDocument(), {
|
|
87
|
+
timeout: 600
|
|
88
|
+
});
|
|
62
89
|
});
|
|
63
90
|
await step("Hover over the target, wait until the tooltip is visible, click the target and expect not showing the tooltip", async () => {
|
|
64
91
|
await userEvent.hover(target);
|
|
65
|
-
await waitFor(() => expect(queryTooltip()).toBeInTheDocument(), {
|
|
92
|
+
await waitFor(() => expect(queryTooltip()).toBeInTheDocument(), {
|
|
93
|
+
timeout: 600
|
|
94
|
+
});
|
|
66
95
|
await userEvent.click(target);
|
|
67
96
|
await expect(queryTooltip()).not.toBeInTheDocument();
|
|
68
97
|
});
|
|
69
98
|
await step("Hover over the target, click it while delay and expect not showing the tooltip", async () => {
|
|
70
99
|
await userEvent.hover(target);
|
|
71
|
-
await waitFor(() => expect(queryTooltip()).not.toBeInTheDocument(), {
|
|
100
|
+
await waitFor(() => expect(queryTooltip()).not.toBeInTheDocument(), {
|
|
101
|
+
timeout: 200
|
|
102
|
+
});
|
|
72
103
|
await userEvent.click(target);
|
|
73
104
|
await expect(queryTooltip()).not.toBeInTheDocument();
|
|
74
105
|
});
|
|
@@ -3,36 +3,45 @@
|
|
|
3
3
|
* This button is used for everything what is the primary
|
|
4
4
|
* action like save, confirm, create, etc.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
Position, State, InputState, Size, Grouped,
|
|
8
|
+
} from '../../enums';
|
|
7
9
|
import AntButton from './AntButton.vue';
|
|
8
|
-
import type {
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
import type {
|
|
11
|
+
IconDefinition,
|
|
12
|
+
} from '@fortawesome/free-solid-svg-icons';
|
|
13
|
+
import {
|
|
14
|
+
computed, useSlots,
|
|
15
|
+
} from 'vue';
|
|
16
|
+
import {
|
|
17
|
+
hasSlotContent,
|
|
18
|
+
} from '../../utils';
|
|
11
19
|
|
|
12
|
-
defineEmits([
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
defineEmits([
|
|
21
|
+
'click',
|
|
22
|
+
'blur',
|
|
23
|
+
]);
|
|
24
|
+
const props = withDefaults(defineProps<{
|
|
25
|
+
iconLeft?: IconDefinition;
|
|
26
|
+
iconRight?: IconDefinition;
|
|
27
|
+
size?: Size;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
grouped?: Grouped;
|
|
30
|
+
state?: State;
|
|
31
|
+
skeleton?: boolean;
|
|
32
|
+
expanded?: boolean;
|
|
33
|
+
filled?: boolean;
|
|
34
|
+
hasPermission?: boolean;
|
|
35
|
+
tooltipPosition?: Position;
|
|
36
|
+
tooltipState?: InputState;
|
|
37
|
+
tooltipDelay?: number;
|
|
38
|
+
submit?: boolean;
|
|
39
|
+
}>(), {
|
|
40
|
+
state: State.primary,
|
|
41
|
+
hasPermission: true,
|
|
42
|
+
filled: true,
|
|
43
|
+
submit: false,
|
|
44
|
+
});
|
|
36
45
|
const slots = useSlots();
|
|
37
46
|
const hasTooltip = computed(() => !props.skeleton && !props.disabled && props.hasPermission && hasSlotContent(slots['tooltipContent']));
|
|
38
47
|
const hasPermissionTooltip = computed(() => !props.skeleton && !props.disabled && !props.hasPermission && hasSlotContent(slots['invalidPermissionTooltipContent']));
|
|
@@ -57,7 +66,7 @@ const hasPermissionTooltip = computed(() => !props.skeleton && !props.disabled &
|
|
|
57
66
|
@click="$emit('click')"
|
|
58
67
|
@blur="$emit('blur')"
|
|
59
68
|
>
|
|
60
|
-
<slot/>
|
|
69
|
+
<slot />
|
|
61
70
|
|
|
62
71
|
<template #tooltip-content>
|
|
63
72
|
<slot
|
|
@@ -1,19 +1,40 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import {
|
|
3
|
+
type IconDefinition,
|
|
4
|
+
} from '@fortawesome/free-solid-svg-icons';
|
|
5
|
+
import {
|
|
6
|
+
computed, onMounted,
|
|
7
|
+
} from 'vue';
|
|
8
|
+
import {
|
|
9
|
+
type RouteLocationRaw,
|
|
10
|
+
} from 'vue-router';
|
|
5
11
|
import AntSkeleton from '../AntSkeleton.vue';
|
|
6
12
|
import AntSpinner from '../AntSpinner.vue';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
|
|
13
|
+
import {
|
|
14
|
+
Grouped,
|
|
15
|
+
} from '../../enums/Grouped.enum';
|
|
16
|
+
import {
|
|
17
|
+
Size,
|
|
18
|
+
} from '../../enums/Size.enum';
|
|
19
|
+
import {
|
|
20
|
+
handleEnumValidation,
|
|
21
|
+
} from '../../handler';
|
|
22
|
+
import {
|
|
23
|
+
State, InputState, Position,
|
|
24
|
+
} from '../../enums';
|
|
25
|
+
import {
|
|
26
|
+
ButtonType,
|
|
27
|
+
} from './__types';
|
|
12
28
|
import AntIcon from '../AntIcon.vue';
|
|
13
29
|
import AntTooltip from '../AntTooltip.vue';
|
|
14
|
-
import {
|
|
30
|
+
import {
|
|
31
|
+
IconSize,
|
|
32
|
+
} from '../__types/AntIcon.types';
|
|
15
33
|
|
|
16
|
-
defineEmits([
|
|
34
|
+
defineEmits([
|
|
35
|
+
'click',
|
|
36
|
+
'blur',
|
|
37
|
+
]);
|
|
17
38
|
|
|
18
39
|
const props = withDefaults(defineProps<{
|
|
19
40
|
filled?: boolean;
|
|
@@ -49,7 +70,7 @@ const props = withDefaults(defineProps<{
|
|
|
49
70
|
noFocus: false,
|
|
50
71
|
tooltipPosition: Position.bottom,
|
|
51
72
|
tooltipState: InputState.base,
|
|
52
|
-
tooltipDelay: 800
|
|
73
|
+
tooltipDelay: 800,
|
|
53
74
|
});
|
|
54
75
|
|
|
55
76
|
const hasInputState = computed(() => props.skeleton || props.readonly || props.disabled);
|
|
@@ -119,7 +140,7 @@ const classes = computed(() => {
|
|
|
119
140
|
'focus:ring-2': !props.readonly && props.size === Size.sm || props.size === Size.xs || props.size === Size.xs2,
|
|
120
141
|
'focus:ring-4': !props.readonly && props.size === Size.md || props.size === Size.lg,
|
|
121
142
|
'w-full': props.expanded,
|
|
122
|
-
|
|
143
|
+
invisible: props.skeleton,
|
|
123
144
|
'outline outline-1 outline-offset-[-1px]': props.outlined,
|
|
124
145
|
...groupedClassList.value,
|
|
125
146
|
[variants[props.state]]: true,
|
|
@@ -246,7 +267,7 @@ onMounted(() => {
|
|
|
246
267
|
</component>
|
|
247
268
|
|
|
248
269
|
<template #content>
|
|
249
|
-
<slot name="tooltip-content"/>
|
|
270
|
+
<slot name="tooltip-content" />
|
|
250
271
|
</template>
|
|
251
272
|
</AntTooltip>
|
|
252
273
|
</div>
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import AntActionButton from './AntActionButton.vue';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
Position, Size, Grouped, State,
|
|
5
|
+
} from '../../enums';
|
|
6
|
+
import {
|
|
7
|
+
faPlus,
|
|
8
|
+
} from '@fortawesome/free-solid-svg-icons';
|
|
5
9
|
|
|
6
|
-
defineEmits([
|
|
10
|
+
defineEmits([
|
|
11
|
+
'click',
|
|
12
|
+
'blur',
|
|
13
|
+
]);
|
|
7
14
|
withDefaults(defineProps<{
|
|
8
15
|
iconVariant?: boolean;
|
|
9
16
|
size?: Size;
|
|
@@ -15,7 +22,7 @@ withDefaults(defineProps<{
|
|
|
15
22
|
tooltipPosition?: Position;
|
|
16
23
|
}>(), {
|
|
17
24
|
iconVariant: false,
|
|
18
|
-
canCreate: true
|
|
25
|
+
canCreate: true,
|
|
19
26
|
});
|
|
20
27
|
</script>
|
|
21
28
|
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import AntActionButton from './AntActionButton.vue';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
Position, Size, Grouped, State,
|
|
5
|
+
} from '../../enums';
|
|
6
|
+
import {
|
|
7
|
+
faTrash,
|
|
8
|
+
} from '@fortawesome/free-solid-svg-icons';
|
|
5
9
|
|
|
6
|
-
defineEmits([
|
|
10
|
+
defineEmits([
|
|
11
|
+
'click',
|
|
12
|
+
'blur',
|
|
13
|
+
]);
|
|
7
14
|
withDefaults(defineProps<{
|
|
8
15
|
iconVariant?: boolean;
|
|
9
16
|
size?: Size;
|
|
@@ -15,7 +22,7 @@ withDefaults(defineProps<{
|
|
|
15
22
|
tooltipPosition?: Position;
|
|
16
23
|
}>(), {
|
|
17
24
|
iconVariant: false,
|
|
18
|
-
canDelete: true
|
|
25
|
+
canDelete: true,
|
|
19
26
|
});
|
|
20
27
|
</script>
|
|
21
28
|
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import AntActionButton from './AntActionButton.vue';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
Position, Size, Grouped, State,
|
|
5
|
+
} from '../../enums';
|
|
6
|
+
import {
|
|
7
|
+
faCopy,
|
|
8
|
+
} from '@fortawesome/free-solid-svg-icons';
|
|
5
9
|
|
|
6
|
-
defineEmits([
|
|
10
|
+
defineEmits([
|
|
11
|
+
'click',
|
|
12
|
+
'blur',
|
|
13
|
+
]);
|
|
7
14
|
withDefaults(defineProps<{
|
|
8
15
|
iconVariant?: boolean;
|
|
9
16
|
size?: Size;
|
|
@@ -15,7 +22,7 @@ withDefaults(defineProps<{
|
|
|
15
22
|
tooltipPosition?: Position;
|
|
16
23
|
}>(), {
|
|
17
24
|
iconVariant: false,
|
|
18
|
-
canDuplicate: true
|
|
25
|
+
canDuplicate: true,
|
|
19
26
|
});
|
|
20
27
|
</script>
|
|
21
28
|
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import AntActionButton from './AntActionButton.vue';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
Position, Size, Grouped, State,
|
|
5
|
+
} from '../../enums';
|
|
6
|
+
import {
|
|
7
|
+
faPencil,
|
|
8
|
+
} from '@fortawesome/free-solid-svg-icons';
|
|
5
9
|
|
|
6
|
-
defineEmits([
|
|
10
|
+
defineEmits([
|
|
11
|
+
'click',
|
|
12
|
+
'blur',
|
|
13
|
+
]);
|
|
7
14
|
withDefaults(defineProps<{
|
|
8
15
|
iconVariant?: boolean;
|
|
9
16
|
size?: Size;
|
|
@@ -15,7 +22,7 @@ withDefaults(defineProps<{
|
|
|
15
22
|
tooltipPosition?: Position;
|
|
16
23
|
}>(), {
|
|
17
24
|
iconVariant: false,
|
|
18
|
-
canEdit: true
|
|
25
|
+
canEdit: true,
|
|
19
26
|
});
|
|
20
27
|
</script>
|
|
21
28
|
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import AntActionButton from './AntActionButton.vue';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
Position, Size, Grouped, State,
|
|
5
|
+
} from '../../enums';
|
|
6
|
+
import {
|
|
7
|
+
faFloppyDisk, faPlus,
|
|
8
|
+
} from '@fortawesome/free-solid-svg-icons';
|
|
5
9
|
|
|
6
|
-
defineEmits([
|
|
10
|
+
defineEmits([
|
|
11
|
+
'click',
|
|
12
|
+
'blur',
|
|
13
|
+
]);
|
|
7
14
|
withDefaults(defineProps<{
|
|
8
15
|
iconVariant?: boolean;
|
|
9
16
|
size?: Size;
|
|
@@ -15,7 +22,7 @@ withDefaults(defineProps<{
|
|
|
15
22
|
tooltipPosition?: Position;
|
|
16
23
|
}>(), {
|
|
17
24
|
iconVariant: false,
|
|
18
|
-
canSave: true
|
|
25
|
+
canSave: true,
|
|
19
26
|
});
|
|
20
27
|
</script>
|
|
21
28
|
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import AntActionButton from './AntActionButton.vue';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
Position, Size, Grouped, State,
|
|
5
|
+
} from '../../enums';
|
|
6
|
+
import {
|
|
7
|
+
faFloppyDisk,
|
|
8
|
+
} from '@fortawesome/free-solid-svg-icons';
|
|
5
9
|
|
|
6
|
-
defineEmits([
|
|
10
|
+
defineEmits([
|
|
11
|
+
'click',
|
|
12
|
+
'blur',
|
|
13
|
+
]);
|
|
7
14
|
withDefaults(defineProps<{
|
|
8
15
|
iconVariant?: boolean;
|
|
9
16
|
size?: Size;
|
|
@@ -15,7 +22,7 @@ withDefaults(defineProps<{
|
|
|
15
22
|
tooltipPosition?: Position;
|
|
16
23
|
}>(), {
|
|
17
24
|
iconVariant: false,
|
|
18
|
-
canSave: true
|
|
25
|
+
canSave: true,
|
|
19
26
|
});
|
|
20
27
|
</script>
|
|
21
28
|
|
|
@@ -1,29 +1,50 @@
|
|
|
1
1
|
import AntActionButton from "../AntActionButton.vue";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
Grouped as _Grouped
|
|
4
|
+
} from "../../../enums/Grouped.enum.mjs";
|
|
5
|
+
import {
|
|
6
|
+
State,
|
|
7
|
+
InputState,
|
|
8
|
+
Position,
|
|
9
|
+
Size
|
|
10
|
+
} from "../../../enums/index.mjs";
|
|
4
11
|
const meta = {
|
|
5
12
|
title: "Components/Buttons/Action Button",
|
|
6
13
|
component: AntActionButton,
|
|
7
|
-
parameters: {
|
|
14
|
+
parameters: {
|
|
15
|
+
controls: {
|
|
16
|
+
sort: "requiredFirst"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
8
19
|
argTypes: {
|
|
9
20
|
state: {
|
|
10
|
-
control: {
|
|
21
|
+
control: {
|
|
22
|
+
type: "select"
|
|
23
|
+
},
|
|
11
24
|
options: Object.values(State)
|
|
12
25
|
},
|
|
13
26
|
size: {
|
|
14
|
-
control: {
|
|
27
|
+
control: {
|
|
28
|
+
type: "select"
|
|
29
|
+
},
|
|
15
30
|
options: Object.values(Size)
|
|
16
31
|
},
|
|
17
32
|
grouped: {
|
|
18
|
-
control: {
|
|
33
|
+
control: {
|
|
34
|
+
type: "select"
|
|
35
|
+
},
|
|
19
36
|
options: Object.values(_Grouped)
|
|
20
37
|
},
|
|
21
38
|
tooltipPosition: {
|
|
22
|
-
control: {
|
|
39
|
+
control: {
|
|
40
|
+
type: "select"
|
|
41
|
+
},
|
|
23
42
|
options: Object.values(Position)
|
|
24
43
|
},
|
|
25
44
|
tooltipState: {
|
|
26
|
-
control: {
|
|
45
|
+
control: {
|
|
46
|
+
type: "select"
|
|
47
|
+
},
|
|
27
48
|
options: Object.values(InputState)
|
|
28
49
|
},
|
|
29
50
|
submit: {
|
|
@@ -34,9 +55,13 @@ const meta = {
|
|
|
34
55
|
export default meta;
|
|
35
56
|
export const Docs = {
|
|
36
57
|
render: (args) => ({
|
|
37
|
-
components: {
|
|
58
|
+
components: {
|
|
59
|
+
AntActionButton
|
|
60
|
+
},
|
|
38
61
|
setup() {
|
|
39
|
-
return {
|
|
62
|
+
return {
|
|
63
|
+
args
|
|
64
|
+
};
|
|
40
65
|
},
|
|
41
66
|
template: `
|
|
42
67
|
<AntActionButton v-bind="args">
|