@antify/ui 2.2.1 → 2.2.4
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 +60 -36
- package/dist/components/inputs/AntCheckboxGroup.vue +39 -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 +35 -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 +210 -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 +1 -1
- package/dist/components/table/__stories/AntTable.stories.mjs +190 -62
- 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,53 +1,90 @@
|
|
|
1
1
|
import AntButton from "../AntButton.vue";
|
|
2
2
|
import AntFormGroupLabel from "../../forms/AntFormGroupLabel.vue";
|
|
3
3
|
import AntFormGroup from "../../forms/AntFormGroup.vue";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
faCaretRight,
|
|
6
|
+
faCaretLeft
|
|
7
|
+
} from "@fortawesome/free-solid-svg-icons";
|
|
8
|
+
import {
|
|
9
|
+
Size
|
|
10
|
+
} from "../../../enums/Size.enum.mjs";
|
|
11
|
+
import {
|
|
12
|
+
Grouped as _Grouped
|
|
13
|
+
} from "../../../enums/Grouped.enum.mjs";
|
|
14
|
+
import {
|
|
15
|
+
State,
|
|
16
|
+
InputState,
|
|
17
|
+
Position
|
|
18
|
+
} from "../../../enums/index.mjs";
|
|
19
|
+
import {
|
|
20
|
+
within
|
|
21
|
+
} from "@storybook/test";
|
|
9
22
|
const meta = {
|
|
10
23
|
component: AntButton,
|
|
11
24
|
title: "Components/Buttons/Button",
|
|
12
|
-
parameters: {
|
|
25
|
+
parameters: {
|
|
26
|
+
controls: {
|
|
27
|
+
sort: "requiredFirst"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
13
30
|
argTypes: {
|
|
14
31
|
state: {
|
|
15
|
-
control: {
|
|
32
|
+
control: {
|
|
33
|
+
type: "select"
|
|
34
|
+
},
|
|
16
35
|
options: Object.values(State)
|
|
17
36
|
},
|
|
18
37
|
grouped: {
|
|
19
|
-
control: {
|
|
38
|
+
control: {
|
|
39
|
+
type: "select"
|
|
40
|
+
},
|
|
20
41
|
options: Object.values(_Grouped),
|
|
21
42
|
description: "Where is this fields position in a group"
|
|
22
43
|
},
|
|
23
44
|
size: {
|
|
24
|
-
control: {
|
|
45
|
+
control: {
|
|
46
|
+
type: "select"
|
|
47
|
+
},
|
|
25
48
|
options: Object.values(Size),
|
|
26
49
|
description: "Defines the size of the button"
|
|
27
50
|
},
|
|
28
51
|
iconLeft: {
|
|
29
|
-
control: {
|
|
52
|
+
control: {
|
|
53
|
+
type: "none"
|
|
54
|
+
},
|
|
30
55
|
description: "Will be displayed left to the label or the default slot.<br>Use Font-awesome Icons."
|
|
31
56
|
},
|
|
32
57
|
iconRight: {
|
|
33
|
-
control: {
|
|
58
|
+
control: {
|
|
59
|
+
type: "none"
|
|
60
|
+
},
|
|
34
61
|
description: "Will be displayed right to the label or the default slot.<br>Use Font-awesome Icons."
|
|
35
62
|
},
|
|
36
63
|
to: {
|
|
37
|
-
control: {
|
|
64
|
+
control: {
|
|
65
|
+
type: "RouteLocationRaw"
|
|
66
|
+
},
|
|
38
67
|
description: "If provided transforms the button into an a-tag with the provided link. Style is still the same as a button.",
|
|
39
|
-
table: {
|
|
68
|
+
table: {
|
|
69
|
+
type: {
|
|
70
|
+
summary: "string|object"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
40
73
|
},
|
|
41
74
|
submit: {
|
|
42
75
|
description: 'Change the button type to type="submit"'
|
|
43
76
|
},
|
|
44
77
|
tooltipPosition: {
|
|
45
|
-
control: {
|
|
78
|
+
control: {
|
|
79
|
+
type: "select"
|
|
80
|
+
},
|
|
46
81
|
options: Object.values(Position),
|
|
47
82
|
description: "The tooltips position. Tooltip is only shown if a tooltip-content slot is provided."
|
|
48
83
|
},
|
|
49
84
|
tooltipState: {
|
|
50
|
-
control: {
|
|
85
|
+
control: {
|
|
86
|
+
type: "select"
|
|
87
|
+
},
|
|
51
88
|
options: Object.values(InputState),
|
|
52
89
|
description: "The tooltips color type. Tooltip is only shown if a tooltip-content slot is provided."
|
|
53
90
|
}
|
|
@@ -56,9 +93,13 @@ const meta = {
|
|
|
56
93
|
export default meta;
|
|
57
94
|
export const Docs = {
|
|
58
95
|
render: (args) => ({
|
|
59
|
-
components: {
|
|
96
|
+
components: {
|
|
97
|
+
AntButton
|
|
98
|
+
},
|
|
60
99
|
setup() {
|
|
61
|
-
return {
|
|
100
|
+
return {
|
|
101
|
+
args
|
|
102
|
+
};
|
|
62
103
|
},
|
|
63
104
|
template: '<AntButton v-bind="args">Button</AntButton>'
|
|
64
105
|
}),
|
|
@@ -151,9 +192,13 @@ export const WithoutBorder = {
|
|
|
151
192
|
};
|
|
152
193
|
export const WithTooltip = {
|
|
153
194
|
render: (args) => ({
|
|
154
|
-
components: {
|
|
195
|
+
components: {
|
|
196
|
+
AntButton
|
|
197
|
+
},
|
|
155
198
|
setup() {
|
|
156
|
-
return {
|
|
199
|
+
return {
|
|
200
|
+
args
|
|
201
|
+
};
|
|
157
202
|
},
|
|
158
203
|
template: `
|
|
159
204
|
<AntButton v-bind="args">
|
|
@@ -162,19 +207,26 @@ export const WithTooltip = {
|
|
|
162
207
|
<template #tooltip-content>This is a button</template>
|
|
163
208
|
</AntButton>`
|
|
164
209
|
}),
|
|
165
|
-
play: async ({
|
|
210
|
+
play: async ({
|
|
211
|
+
canvasElement,
|
|
212
|
+
step
|
|
213
|
+
}) => {
|
|
166
214
|
const canvas = within(canvasElement);
|
|
167
215
|
},
|
|
168
216
|
args: {
|
|
169
217
|
tooltipDelay: 800
|
|
170
218
|
},
|
|
171
219
|
parameters: {
|
|
172
|
-
chromatic: {
|
|
220
|
+
chromatic: {
|
|
221
|
+
disableSnapshot: false
|
|
222
|
+
}
|
|
173
223
|
}
|
|
174
224
|
};
|
|
175
225
|
export const Summary = {
|
|
176
226
|
parameters: {
|
|
177
|
-
chromatic: {
|
|
227
|
+
chromatic: {
|
|
228
|
+
disableSnapshot: false
|
|
229
|
+
}
|
|
178
230
|
},
|
|
179
231
|
render: (args) => ({
|
|
180
232
|
components: {
|
|
@@ -183,7 +235,9 @@ export const Summary = {
|
|
|
183
235
|
AntFormGroup
|
|
184
236
|
},
|
|
185
237
|
setup() {
|
|
186
|
-
return {
|
|
238
|
+
return {
|
|
239
|
+
args
|
|
240
|
+
};
|
|
187
241
|
},
|
|
188
242
|
template: `
|
|
189
243
|
<div class="flex flex-col gap-2.5">
|
|
@@ -1,20 +1,34 @@
|
|
|
1
1
|
import AntCreateButton from "../AntCreateButton.vue";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Position,
|
|
4
|
+
Grouped as _Grouped,
|
|
5
|
+
Size
|
|
6
|
+
} from "../../../enums/index.mjs";
|
|
3
7
|
const meta = {
|
|
4
8
|
title: "Components/Buttons/Create Button",
|
|
5
9
|
component: AntCreateButton,
|
|
6
|
-
parameters: {
|
|
10
|
+
parameters: {
|
|
11
|
+
controls: {
|
|
12
|
+
sort: "requiredFirst"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
7
15
|
argTypes: {
|
|
8
16
|
size: {
|
|
9
|
-
control: {
|
|
17
|
+
control: {
|
|
18
|
+
type: "select"
|
|
19
|
+
},
|
|
10
20
|
options: Object.values(Size)
|
|
11
21
|
},
|
|
12
22
|
grouped: {
|
|
13
|
-
control: {
|
|
23
|
+
control: {
|
|
24
|
+
type: "select"
|
|
25
|
+
},
|
|
14
26
|
options: Object.values(_Grouped)
|
|
15
27
|
},
|
|
16
28
|
tooltipPosition: {
|
|
17
|
-
control: {
|
|
29
|
+
control: {
|
|
30
|
+
type: "select"
|
|
31
|
+
},
|
|
18
32
|
options: Object.values(Position)
|
|
19
33
|
}
|
|
20
34
|
}
|
|
@@ -22,9 +36,13 @@ const meta = {
|
|
|
22
36
|
export default meta;
|
|
23
37
|
export const Docs = {
|
|
24
38
|
render: (args) => ({
|
|
25
|
-
components: {
|
|
39
|
+
components: {
|
|
40
|
+
AntCreateButton
|
|
41
|
+
},
|
|
26
42
|
setup() {
|
|
27
|
-
return {
|
|
43
|
+
return {
|
|
44
|
+
args
|
|
45
|
+
};
|
|
28
46
|
},
|
|
29
47
|
template: '<AntCreateButton v-bind="args"/>'
|
|
30
48
|
}),
|
|
@@ -1,20 +1,34 @@
|
|
|
1
1
|
import AntDeleteButton from "../AntDeleteButton.vue";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Position,
|
|
4
|
+
Grouped as _Grouped,
|
|
5
|
+
Size
|
|
6
|
+
} from "../../../enums/index.mjs";
|
|
3
7
|
const meta = {
|
|
4
8
|
title: "Components/Buttons/Delete Button",
|
|
5
9
|
component: AntDeleteButton,
|
|
6
|
-
parameters: {
|
|
10
|
+
parameters: {
|
|
11
|
+
controls: {
|
|
12
|
+
sort: "requiredFirst"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
7
15
|
argTypes: {
|
|
8
16
|
size: {
|
|
9
|
-
control: {
|
|
17
|
+
control: {
|
|
18
|
+
type: "select"
|
|
19
|
+
},
|
|
10
20
|
options: Object.values(Size)
|
|
11
21
|
},
|
|
12
22
|
grouped: {
|
|
13
|
-
control: {
|
|
23
|
+
control: {
|
|
24
|
+
type: "select"
|
|
25
|
+
},
|
|
14
26
|
options: Object.values(_Grouped)
|
|
15
27
|
},
|
|
16
28
|
tooltipPosition: {
|
|
17
|
-
control: {
|
|
29
|
+
control: {
|
|
30
|
+
type: "select"
|
|
31
|
+
},
|
|
18
32
|
options: Object.values(Position)
|
|
19
33
|
}
|
|
20
34
|
}
|
|
@@ -22,9 +36,13 @@ const meta = {
|
|
|
22
36
|
export default meta;
|
|
23
37
|
export const Docs = {
|
|
24
38
|
render: (args) => ({
|
|
25
|
-
components: {
|
|
39
|
+
components: {
|
|
40
|
+
AntDeleteButton
|
|
41
|
+
},
|
|
26
42
|
setup() {
|
|
27
|
-
return {
|
|
43
|
+
return {
|
|
44
|
+
args
|
|
45
|
+
};
|
|
28
46
|
},
|
|
29
47
|
template: '<AntDeleteButton v-bind="args"/>'
|
|
30
48
|
}),
|
|
@@ -1,20 +1,34 @@
|
|
|
1
1
|
import AntDuplicateButton from "../AntDuplicateButton.vue";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Position,
|
|
4
|
+
Grouped as _Grouped,
|
|
5
|
+
Size
|
|
6
|
+
} from "../../../enums/index.mjs";
|
|
3
7
|
const meta = {
|
|
4
8
|
title: "Components/Buttons/Duplicate Button",
|
|
5
9
|
component: AntDuplicateButton,
|
|
6
|
-
parameters: {
|
|
10
|
+
parameters: {
|
|
11
|
+
controls: {
|
|
12
|
+
sort: "requiredFirst"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
7
15
|
argTypes: {
|
|
8
16
|
size: {
|
|
9
|
-
control: {
|
|
17
|
+
control: {
|
|
18
|
+
type: "select"
|
|
19
|
+
},
|
|
10
20
|
options: Object.values(Size)
|
|
11
21
|
},
|
|
12
22
|
grouped: {
|
|
13
|
-
control: {
|
|
23
|
+
control: {
|
|
24
|
+
type: "select"
|
|
25
|
+
},
|
|
14
26
|
options: Object.values(_Grouped)
|
|
15
27
|
},
|
|
16
28
|
tooltipPosition: {
|
|
17
|
-
control: {
|
|
29
|
+
control: {
|
|
30
|
+
type: "select"
|
|
31
|
+
},
|
|
18
32
|
options: Object.values(Position)
|
|
19
33
|
}
|
|
20
34
|
}
|
|
@@ -22,9 +36,13 @@ const meta = {
|
|
|
22
36
|
export default meta;
|
|
23
37
|
export const Docs = {
|
|
24
38
|
render: (args) => ({
|
|
25
|
-
components: {
|
|
39
|
+
components: {
|
|
40
|
+
AntDuplicateButton
|
|
41
|
+
},
|
|
26
42
|
setup() {
|
|
27
|
-
return {
|
|
43
|
+
return {
|
|
44
|
+
args
|
|
45
|
+
};
|
|
28
46
|
},
|
|
29
47
|
template: '<AntDuplicateButton v-bind="args"/>'
|
|
30
48
|
}),
|
|
@@ -1,20 +1,34 @@
|
|
|
1
1
|
import AntEditButton from "../AntEditButton.vue";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Position,
|
|
4
|
+
Grouped as _Grouped,
|
|
5
|
+
Size
|
|
6
|
+
} from "../../../enums/index.mjs";
|
|
3
7
|
const meta = {
|
|
4
8
|
title: "Components/Buttons/Edit Button",
|
|
5
9
|
component: AntEditButton,
|
|
6
|
-
parameters: {
|
|
10
|
+
parameters: {
|
|
11
|
+
controls: {
|
|
12
|
+
sort: "requiredFirst"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
7
15
|
argTypes: {
|
|
8
16
|
size: {
|
|
9
|
-
control: {
|
|
17
|
+
control: {
|
|
18
|
+
type: "select"
|
|
19
|
+
},
|
|
10
20
|
options: Object.values(Size)
|
|
11
21
|
},
|
|
12
22
|
grouped: {
|
|
13
|
-
control: {
|
|
23
|
+
control: {
|
|
24
|
+
type: "select"
|
|
25
|
+
},
|
|
14
26
|
options: Object.values(_Grouped)
|
|
15
27
|
},
|
|
16
28
|
tooltipPosition: {
|
|
17
|
-
control: {
|
|
29
|
+
control: {
|
|
30
|
+
type: "select"
|
|
31
|
+
},
|
|
18
32
|
options: Object.values(Position)
|
|
19
33
|
}
|
|
20
34
|
}
|
|
@@ -22,9 +36,13 @@ const meta = {
|
|
|
22
36
|
export default meta;
|
|
23
37
|
export const Docs = {
|
|
24
38
|
render: (args) => ({
|
|
25
|
-
components: {
|
|
39
|
+
components: {
|
|
40
|
+
AntEditButton
|
|
41
|
+
},
|
|
26
42
|
setup() {
|
|
27
|
-
return {
|
|
43
|
+
return {
|
|
44
|
+
args
|
|
45
|
+
};
|
|
28
46
|
},
|
|
29
47
|
template: '<AntEditButton v-bind="args"/>'
|
|
30
48
|
}),
|
|
@@ -1,20 +1,34 @@
|
|
|
1
1
|
import AntSaveAndNewButton from "../AntSaveAndNewButton.vue";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Position,
|
|
4
|
+
Grouped as _Grouped,
|
|
5
|
+
Size
|
|
6
|
+
} from "../../../enums/index.mjs";
|
|
3
7
|
const meta = {
|
|
4
8
|
title: "Components/Buttons/Save And New Button",
|
|
5
9
|
component: AntSaveAndNewButton,
|
|
6
|
-
parameters: {
|
|
10
|
+
parameters: {
|
|
11
|
+
controls: {
|
|
12
|
+
sort: "requiredFirst"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
7
15
|
argTypes: {
|
|
8
16
|
size: {
|
|
9
|
-
control: {
|
|
17
|
+
control: {
|
|
18
|
+
type: "select"
|
|
19
|
+
},
|
|
10
20
|
options: Object.values(Size)
|
|
11
21
|
},
|
|
12
22
|
grouped: {
|
|
13
|
-
control: {
|
|
23
|
+
control: {
|
|
24
|
+
type: "select"
|
|
25
|
+
},
|
|
14
26
|
options: Object.values(_Grouped)
|
|
15
27
|
},
|
|
16
28
|
tooltipPosition: {
|
|
17
|
-
control: {
|
|
29
|
+
control: {
|
|
30
|
+
type: "select"
|
|
31
|
+
},
|
|
18
32
|
options: Object.values(Position)
|
|
19
33
|
}
|
|
20
34
|
}
|
|
@@ -22,9 +36,13 @@ const meta = {
|
|
|
22
36
|
export default meta;
|
|
23
37
|
export const Docs = {
|
|
24
38
|
render: (args) => ({
|
|
25
|
-
components: {
|
|
39
|
+
components: {
|
|
40
|
+
AntSaveAndNewButton
|
|
41
|
+
},
|
|
26
42
|
setup() {
|
|
27
|
-
return {
|
|
43
|
+
return {
|
|
44
|
+
args
|
|
45
|
+
};
|
|
28
46
|
},
|
|
29
47
|
template: '<AntSaveAndNewButton v-bind="args"/>'
|
|
30
48
|
}),
|
|
@@ -1,20 +1,34 @@
|
|
|
1
1
|
import AntSaveButton from "../AntSaveButton.vue";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Position,
|
|
4
|
+
Grouped as _Grouped,
|
|
5
|
+
Size
|
|
6
|
+
} from "../../../enums/index.mjs";
|
|
3
7
|
const meta = {
|
|
4
8
|
title: "Components/Buttons/Save Button",
|
|
5
9
|
component: AntSaveButton,
|
|
6
|
-
parameters: {
|
|
10
|
+
parameters: {
|
|
11
|
+
controls: {
|
|
12
|
+
sort: "requiredFirst"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
7
15
|
argTypes: {
|
|
8
16
|
size: {
|
|
9
|
-
control: {
|
|
17
|
+
control: {
|
|
18
|
+
type: "select"
|
|
19
|
+
},
|
|
10
20
|
options: Object.values(Size)
|
|
11
21
|
},
|
|
12
22
|
grouped: {
|
|
13
|
-
control: {
|
|
23
|
+
control: {
|
|
24
|
+
type: "select"
|
|
25
|
+
},
|
|
14
26
|
options: Object.values(_Grouped)
|
|
15
27
|
},
|
|
16
28
|
tooltipPosition: {
|
|
17
|
-
control: {
|
|
29
|
+
control: {
|
|
30
|
+
type: "select"
|
|
31
|
+
},
|
|
18
32
|
options: Object.values(Position)
|
|
19
33
|
}
|
|
20
34
|
}
|
|
@@ -22,9 +36,13 @@ const meta = {
|
|
|
22
36
|
export default meta;
|
|
23
37
|
export const Docs = {
|
|
24
38
|
render: (args) => ({
|
|
25
|
-
components: {
|
|
39
|
+
components: {
|
|
40
|
+
AntSaveButton
|
|
41
|
+
},
|
|
26
42
|
setup() {
|
|
27
|
-
return {
|
|
43
|
+
return {
|
|
44
|
+
args
|
|
45
|
+
};
|
|
28
46
|
},
|
|
29
47
|
template: '<AntSaveButton v-bind="args"/>'
|
|
30
48
|
}),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
withDefaults(defineProps<{
|
|
3
|
-
showDetail?: boolean
|
|
3
|
+
showDetail?: boolean;
|
|
4
4
|
}>(), {
|
|
5
5
|
showDetail: false,
|
|
6
6
|
});
|
|
@@ -16,15 +16,15 @@ withDefaults(defineProps<{
|
|
|
16
16
|
:class="{'w-[40rem]': showDetail, 'w-full': !showDetail}"
|
|
17
17
|
>
|
|
18
18
|
<div class="bg-white">
|
|
19
|
-
<slot name="search-section"/>
|
|
19
|
+
<slot name="search-section" />
|
|
20
20
|
</div>
|
|
21
21
|
|
|
22
|
-
<div class="bg-white
|
|
23
|
-
<slot name="table-section"/>
|
|
22
|
+
<div class="bg-white grow h-px overflow-hidden">
|
|
23
|
+
<slot name="table-section" />
|
|
24
24
|
</div>
|
|
25
25
|
|
|
26
26
|
<div class="bg-white">
|
|
27
|
-
<slot name="table-nav-section"/>
|
|
27
|
+
<slot name="table-nav-section" />
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
@@ -34,7 +34,7 @@ withDefaults(defineProps<{
|
|
|
34
34
|
class="flex flex-col gap-px border-l border-base-300 overflow-hidden"
|
|
35
35
|
:class="{'w-full': showDetail}"
|
|
36
36
|
>
|
|
37
|
-
<slot/>
|
|
37
|
+
<slot />
|
|
38
38
|
</div>
|
|
39
39
|
</Transition>
|
|
40
40
|
</div>
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
2
|
+
<div
|
|
3
|
+
class="flex flex-col bg-base-300 gap-px h-full"
|
|
4
|
+
data-e2e="crud-detail"
|
|
5
|
+
>
|
|
6
|
+
<slot name="header" />
|
|
4
7
|
|
|
5
|
-
<div class="
|
|
6
|
-
<slot/>
|
|
8
|
+
<div class="grow bg-white h-full overflow-y-auto">
|
|
9
|
+
<slot />
|
|
7
10
|
</div>
|
|
8
11
|
|
|
9
|
-
<slot name="footer"/>
|
|
12
|
+
<slot name="footer" />
|
|
10
13
|
</div>
|
|
11
14
|
</template>
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import AntButton from '../buttons/AntButton.vue';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
faAngleLeft,
|
|
5
|
+
} from '@fortawesome/free-solid-svg-icons';
|
|
4
6
|
import AntSaveAndNewButton from '../buttons/AntSaveAndNewButton.vue';
|
|
5
7
|
import AntSaveButton from '../buttons/AntSaveButton.vue';
|
|
6
8
|
|
|
7
|
-
defineEmits([
|
|
9
|
+
defineEmits([
|
|
10
|
+
'back',
|
|
11
|
+
'save',
|
|
12
|
+
'save-and-new',
|
|
13
|
+
]);
|
|
8
14
|
withDefaults(defineProps<{
|
|
9
|
-
disabled?: boolean
|
|
10
|
-
skeleton?: boolean
|
|
11
|
-
canSave?: boolean
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
skeleton?: boolean;
|
|
17
|
+
canSave?: boolean;
|
|
12
18
|
}>(), {
|
|
13
19
|
disabled: false,
|
|
14
20
|
skeleton: false,
|
|
15
|
-
canSave: true
|
|
21
|
+
canSave: true,
|
|
16
22
|
});
|
|
17
23
|
</script>
|
|
18
24
|
|
|
@@ -37,7 +43,7 @@ withDefaults(defineProps<{
|
|
|
37
43
|
</div>
|
|
38
44
|
|
|
39
45
|
<div class="flex gap-2.5">
|
|
40
|
-
<slot name="before-buttons-right"/>
|
|
46
|
+
<slot name="before-buttons-right" />
|
|
41
47
|
<slot name="buttons-right">
|
|
42
48
|
<AntSaveAndNewButton
|
|
43
49
|
:skeleton="skeleton"
|
|
@@ -53,7 +59,7 @@ withDefaults(defineProps<{
|
|
|
53
59
|
@click="$emit('save')"
|
|
54
60
|
/>
|
|
55
61
|
</slot>
|
|
56
|
-
<slot name="after-buttons-right"/>
|
|
62
|
+
<slot name="after-buttons-right" />
|
|
57
63
|
</div>
|
|
58
64
|
</div>
|
|
59
65
|
</template>
|
|
@@ -1,26 +1,34 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
// TODO:: fix why tabs are not full height in story
|
|
3
|
-
import type {
|
|
3
|
+
import type {
|
|
4
|
+
TabItem,
|
|
5
|
+
} from '../tabs/__types/AntTabItem.types';
|
|
4
6
|
import AntTabs from '../tabs/AntTabs.vue';
|
|
5
7
|
import AntDeleteButton from '../buttons/AntDeleteButton.vue';
|
|
6
8
|
import AntDeleteDialog from '../dialogs/AntDeleteDialog.vue';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
+
import {
|
|
10
|
+
ref,
|
|
11
|
+
} from 'vue';
|
|
12
|
+
import {
|
|
13
|
+
Position,
|
|
14
|
+
} from '../../enums';
|
|
9
15
|
|
|
10
|
-
defineEmits([
|
|
16
|
+
defineEmits([
|
|
17
|
+
'delete',
|
|
18
|
+
]);
|
|
11
19
|
withDefaults(defineProps<{
|
|
12
|
-
tabItems?: TabItem[]
|
|
13
|
-
deleteButtonDisabled?: boolean
|
|
14
|
-
getEntityName: () => string
|
|
15
|
-
canDelete?: boolean
|
|
16
|
-
showDeleteButton?: boolean
|
|
17
|
-
skeleton?: boolean
|
|
20
|
+
tabItems?: TabItem[];
|
|
21
|
+
deleteButtonDisabled?: boolean;
|
|
22
|
+
getEntityName: () => string;
|
|
23
|
+
canDelete?: boolean;
|
|
24
|
+
showDeleteButton?: boolean;
|
|
25
|
+
skeleton?: boolean;
|
|
18
26
|
}>(), {
|
|
19
27
|
tabItems: () => [],
|
|
20
28
|
deleteButtonDisabled: false,
|
|
21
29
|
canDelete: true,
|
|
22
30
|
showDeleteButton: true,
|
|
23
|
-
skeleton: false
|
|
31
|
+
skeleton: false,
|
|
24
32
|
});
|
|
25
33
|
|
|
26
34
|
const dialogOpen = ref(false);
|
|
@@ -40,7 +48,7 @@ const dialogOpen = ref(false);
|
|
|
40
48
|
|
|
41
49
|
<div class="flex gap-2 pr-2 py-2">
|
|
42
50
|
<slot name="buttons">
|
|
43
|
-
<slot name="before-delete-button"/>
|
|
51
|
+
<slot name="before-delete-button" />
|
|
44
52
|
|
|
45
53
|
<AntDeleteButton
|
|
46
54
|
v-if="showDeleteButton"
|
|
@@ -52,7 +60,7 @@ const dialogOpen = ref(false);
|
|
|
52
60
|
@click="() => dialogOpen = true"
|
|
53
61
|
/>
|
|
54
62
|
|
|
55
|
-
<slot name="after-delete-button"/>
|
|
63
|
+
<slot name="after-delete-button" />
|
|
56
64
|
</slot>
|
|
57
65
|
</div>
|
|
58
66
|
|