@antify/ui-module 1.4.0 → 1.5.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/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 +2 -2
- package/dist/runtime/components/buttons/AntActionButton.vue +5 -0
- package/dist/runtime/components/buttons/AntButton.vue +126 -126
- package/dist/runtime/components/buttons/AntCreateButton.vue +1 -0
- package/dist/runtime/components/buttons/AntDeleteButton.vue +11 -1
- package/dist/runtime/components/buttons/AntDuplicateButton.vue +42 -0
- package/dist/runtime/components/buttons/__stories/AntActionButton.stories.mjs +6 -4
- package/dist/runtime/components/buttons/__stories/AntButton.stories.mjs +130 -130
- package/dist/runtime/components/buttons/__stories/AntCreateButton.stories.mjs +4 -3
- package/dist/runtime/components/buttons/__stories/AntDeleteButton.stories.d.ts +1 -0
- package/dist/runtime/components/buttons/__stories/AntDeleteButton.stories.mjs +11 -3
- package/dist/runtime/components/buttons/__stories/AntDuplicateButton.stories.d.ts +11 -0
- package/dist/runtime/components/buttons/__stories/AntDuplicateButton.stories.mjs +67 -0
- package/dist/runtime/components/buttons/__stories/AntSaveAndNewButton.stories.mjs +4 -3
- package/dist/runtime/components/buttons/__stories/AntSaveButton.stories.mjs +4 -3
- 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/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 +1 -1
- 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 +2 -2
- package/src/runtime/components/buttons/AntActionButton.vue +5 -0
- package/src/runtime/components/buttons/AntButton.vue +126 -126
- package/src/runtime/components/buttons/AntCreateButton.vue +1 -0
- package/src/runtime/components/buttons/AntDeleteButton.vue +11 -1
- package/src/runtime/components/buttons/AntDuplicateButton.vue +42 -0
- 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/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,42 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import {Grouped} from '../../enums/Grouped.enum';
|
|
3
|
+
import {Size} from '../../enums/Size.enum';
|
|
4
|
+
import AntActionButton from './AntActionButton.vue';
|
|
5
|
+
import {ColorType, Position} from '../../enums';
|
|
6
|
+
import {faCopy} from '@fortawesome/free-solid-svg-icons';
|
|
7
|
+
|
|
8
|
+
defineEmits(['click', 'blur']);
|
|
9
|
+
withDefaults(defineProps<{
|
|
10
|
+
size?: Size;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
grouped?: Grouped;
|
|
13
|
+
skeleton?: boolean;
|
|
14
|
+
expanded?: boolean;
|
|
15
|
+
canDuplicate?: boolean;
|
|
16
|
+
invalidPermissionTooltipPosition?: Position;
|
|
17
|
+
}>(), {
|
|
18
|
+
canDuplicate: true
|
|
19
|
+
});
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<AntActionButton
|
|
24
|
+
:icon-left="faCopy"
|
|
25
|
+
:color-type="ColorType.base"
|
|
26
|
+
:size="size"
|
|
27
|
+
:disabled="disabled"
|
|
28
|
+
:grouped="grouped"
|
|
29
|
+
:skeleton="skeleton"
|
|
30
|
+
:expanded="expanded"
|
|
31
|
+
:has-permission="canDuplicate"
|
|
32
|
+
:invalid-permission-tooltip-position="invalidPermissionTooltipPosition"
|
|
33
|
+
data-e2e="create-button"
|
|
34
|
+
@click="$emit('click')"
|
|
35
|
+
@blur="$emit('blur')"
|
|
36
|
+
>
|
|
37
|
+
<template #invalidPermissionTooltipContent>
|
|
38
|
+
You have no permission to duplicate entries.<br>
|
|
39
|
+
Please contact your administrator.
|
|
40
|
+
</template>
|
|
41
|
+
</AntActionButton>
|
|
42
|
+
</template>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import AntActionButton from "../AntActionButton.vue";
|
|
2
2
|
import { Size } from "../../../enums/Size.enum.mjs";
|
|
3
3
|
import { Grouped as _Grouped } from "../../../enums/Grouped.enum.mjs";
|
|
4
|
-
import { Position } from "../../../enums/
|
|
4
|
+
import { Position } from "../../../enums/Position.enum.mjs";
|
|
5
5
|
const meta = {
|
|
6
6
|
title: "Components/Buttons/Action Button",
|
|
7
7
|
component: AntActionButton,
|
|
@@ -30,7 +30,9 @@ export const Docs = {
|
|
|
30
30
|
},
|
|
31
31
|
template: '<AntActionButton v-bind="args">Action Button</AntActionButton>'
|
|
32
32
|
}),
|
|
33
|
-
args: {
|
|
33
|
+
args: {
|
|
34
|
+
invalidPermissionTooltipPosition: Position.right
|
|
35
|
+
}
|
|
34
36
|
};
|
|
35
37
|
export const Disabled = {
|
|
36
38
|
render: Docs.render,
|
|
@@ -73,7 +75,7 @@ export const WithPermissionTooltip = {
|
|
|
73
75
|
</AntActionButton>`
|
|
74
76
|
}),
|
|
75
77
|
args: {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
...Docs.args,
|
|
79
|
+
hasPermission: false
|
|
78
80
|
}
|
|
79
81
|
};
|
|
@@ -82,24 +82,24 @@ export const Icons = {
|
|
|
82
82
|
};
|
|
83
83
|
},
|
|
84
84
|
template: `
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
<AntFormGroup>
|
|
86
|
+
<AntFormGroupLabel>Icons only</AntFormGroupLabel>
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
<AntFormGroup direction="row">
|
|
89
|
+
<AntButton v-bind="args" :icon-left="faCaretLeft"></AntButton>
|
|
90
|
+
<AntButton v-bind="args" :icon-right="faCaretRight"></AntButton>
|
|
91
|
+
<AntButton v-bind="args" :icon-left="faCaretLeft" :icon-right="faCaretRight"></AntButton>
|
|
92
|
+
</AntFormGroup>
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
<AntFormGroupLabel>Icons with text</AntFormGroupLabel>
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
96
|
+
<AntFormGroup direction="row">
|
|
97
|
+
<AntButton v-bind="args" :icon-left="faCaretLeft">Button</AntButton>
|
|
98
|
+
<AntButton v-bind="args" :icon-right="faCaretRight">Button</AntButton>
|
|
99
|
+
<AntButton v-bind="args" :icon-left="faCaretLeft" :icon-right="faCaretRight">Button</AntButton>
|
|
100
|
+
</AntFormGroup>
|
|
101
|
+
</AntFormGroup>
|
|
102
|
+
`
|
|
103
103
|
})
|
|
104
104
|
};
|
|
105
105
|
export const Grouped = {
|
|
@@ -152,121 +152,121 @@ export const Summary = {
|
|
|
152
152
|
return { args };
|
|
153
153
|
},
|
|
154
154
|
template: `
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
155
|
+
<div class="flex flex-col gap-2.5">
|
|
156
|
+
<AntFormGroup>
|
|
157
|
+
<AntFormGroupLabel class="text-xl">
|
|
158
|
+
Grouped | Filled | Outlined combinations
|
|
159
|
+
</AntFormGroupLabel>
|
|
160
|
+
<div class="flex">
|
|
161
|
+
<AntButton v-bind="args" color-type="base" grouped="left" :filled="true" :outlined="false">
|
|
162
|
+
Button
|
|
163
|
+
</AntButton>
|
|
164
|
+
<AntButton v-bind="args" color-type="base" grouped="center" :filled="false" :outlined="false">
|
|
165
|
+
Button
|
|
166
|
+
</AntButton>
|
|
167
|
+
<AntButton v-bind="args" color-type="base" grouped="center" :filled="true" :outlined="true">
|
|
168
|
+
Button
|
|
169
|
+
</AntButton>
|
|
170
|
+
<AntButton v-bind="args" color-type="base" grouped="right" :filled="false" :outlined="true">
|
|
171
|
+
Button
|
|
172
|
+
</AntButton>
|
|
173
|
+
</div>
|
|
174
|
+
<div class="flex">
|
|
175
|
+
<AntButton v-bind="args" color-type="primary" grouped="left" :filled="true" :outlined="false">
|
|
176
|
+
Button
|
|
177
|
+
</AntButton>
|
|
178
|
+
<AntButton v-bind="args" color-type="primary" grouped="center" :filled="false" :outlined="false">
|
|
179
|
+
Button
|
|
180
|
+
</AntButton>
|
|
181
|
+
<AntButton v-bind="args" color-type="primary" grouped="center" :filled="true" :outlined="true">
|
|
182
|
+
Button
|
|
183
|
+
</AntButton>
|
|
184
|
+
<AntButton v-bind="args" color-type="primary" grouped="right" :filled="false" :outlined="true">
|
|
185
|
+
Button
|
|
186
|
+
</AntButton>
|
|
187
|
+
</div>
|
|
188
|
+
<div class="flex">
|
|
189
|
+
<AntButton v-bind="args" color-type="secondary" grouped="left" :filled="true" :outlined="false">
|
|
190
|
+
Button
|
|
191
|
+
</AntButton>
|
|
192
|
+
<AntButton v-bind="args" color-type="secondary" grouped="center" :filled="false" :outlined="false">
|
|
193
|
+
Button
|
|
194
|
+
</AntButton>
|
|
195
|
+
<AntButton v-bind="args" color-type="secondary" grouped="center" :filled="true" :outlined="true">
|
|
196
|
+
Button
|
|
197
|
+
</AntButton>
|
|
198
|
+
<AntButton v-bind="args" color-type="secondary" grouped="right" :filled="false" :outlined="true">
|
|
199
|
+
Button
|
|
200
|
+
</AntButton>
|
|
201
|
+
</div>
|
|
202
|
+
<div class="flex">
|
|
203
|
+
<AntButton v-bind="args" color-type="success" grouped="left" :filled="true" :outlined="false">
|
|
204
|
+
Button
|
|
205
|
+
</AntButton>
|
|
206
|
+
<AntButton v-bind="args" color-type="success" grouped="center" :filled="false" :outlined="false">
|
|
207
|
+
Button
|
|
208
|
+
</AntButton>
|
|
209
|
+
<AntButton v-bind="args" color-type="success" grouped="center" :filled="true" :outlined="true">
|
|
210
|
+
Button
|
|
211
|
+
</AntButton>
|
|
212
|
+
<AntButton v-bind="args" color-type="success" grouped="right" :filled="false" :outlined="true">
|
|
213
|
+
Button
|
|
214
|
+
</AntButton>
|
|
215
|
+
</div>
|
|
216
|
+
<div class="flex">
|
|
217
|
+
<AntButton v-bind="args" color-type="info" grouped="left" :filled="true" :outlined="false">
|
|
218
|
+
Button
|
|
219
|
+
</AntButton>
|
|
220
|
+
<AntButton v-bind="args" color-type="info" grouped="center" :filled="false" :outlined="false">
|
|
221
|
+
Button
|
|
222
|
+
</AntButton>
|
|
223
|
+
<AntButton v-bind="args" color-type="info" grouped="center" :filled="true" :outlined="true">
|
|
224
|
+
Button
|
|
225
|
+
</AntButton>
|
|
226
|
+
<AntButton v-bind="args" color-type="info" grouped="right" :filled="false" :outlined="true">
|
|
227
|
+
Button
|
|
228
|
+
</AntButton>
|
|
229
|
+
</div>
|
|
230
|
+
<div class="flex">
|
|
231
|
+
<AntButton v-bind="args" color-type="warning" grouped="left" :filled="true" :outlined="false">
|
|
232
|
+
Button
|
|
233
|
+
</AntButton>
|
|
234
|
+
<AntButton v-bind="args" color-type="warning" grouped="center" :filled="false" :outlined="false">
|
|
235
|
+
Button
|
|
236
|
+
</AntButton>
|
|
237
|
+
<AntButton v-bind="args" color-type="warning" grouped="center" :filled="true" :outlined="true">
|
|
238
|
+
Button
|
|
239
|
+
</AntButton>
|
|
240
|
+
<AntButton v-bind="args" color-type="warning" grouped="right" :filled="false" :outlined="true">
|
|
241
|
+
Button
|
|
242
|
+
</AntButton>
|
|
243
|
+
</div>
|
|
244
|
+
<div class="flex">
|
|
245
|
+
<AntButton v-bind="args" color-type="danger" grouped="left" :filled="true" :outlined="false">
|
|
246
|
+
Button
|
|
247
|
+
</AntButton>
|
|
248
|
+
<AntButton v-bind="args" color-type="danger" grouped="center" :filled="false" :outlined="false">
|
|
249
|
+
Button
|
|
250
|
+
</AntButton>
|
|
251
|
+
<AntButton v-bind="args" color-type="danger" grouped="center" :filled="true" :outlined="true">
|
|
252
|
+
Button
|
|
253
|
+
</AntButton>
|
|
254
|
+
<AntButton v-bind="args" color-type="danger" grouped="right" :filled="false" :outlined="true">
|
|
255
|
+
Button
|
|
256
|
+
</AntButton>
|
|
257
|
+
</div>
|
|
258
|
+
</AntFormGroup>
|
|
259
|
+
<AntFormGroup>
|
|
260
|
+
<AntFormGroupLabel class="text-xl">
|
|
261
|
+
Size
|
|
262
|
+
</AntFormGroupLabel>
|
|
263
|
+
<AntFormGroup direction="row">
|
|
264
|
+
<AntButton v-bind="args" size="md">Button</AntButton>
|
|
265
|
+
<AntButton v-bind="args" size="sm">Button</AntButton>
|
|
266
|
+
</AntFormGroup>
|
|
267
|
+
</AntFormGroup>
|
|
268
|
+
</div>
|
|
269
|
+
`
|
|
270
270
|
}),
|
|
271
271
|
args: {
|
|
272
272
|
iconLeft: faCaretLeft,
|
|
@@ -26,7 +26,9 @@ export const Docs = {
|
|
|
26
26
|
},
|
|
27
27
|
template: '<AntCreateButton v-bind="args"/>'
|
|
28
28
|
}),
|
|
29
|
-
args: {
|
|
29
|
+
args: {
|
|
30
|
+
invalidPermissionTooltipPosition: Position.right
|
|
31
|
+
}
|
|
30
32
|
};
|
|
31
33
|
export const Disabled = {
|
|
32
34
|
render: Docs.render,
|
|
@@ -60,7 +62,6 @@ export const InvalidPermission = {
|
|
|
60
62
|
render: Docs.render,
|
|
61
63
|
args: {
|
|
62
64
|
...Docs.args,
|
|
63
|
-
canCreate: false
|
|
64
|
-
invalidPermissionTooltipPosition: Position.right
|
|
65
|
+
canCreate: false
|
|
65
66
|
}
|
|
66
67
|
};
|
|
@@ -26,7 +26,9 @@ export const Docs = {
|
|
|
26
26
|
},
|
|
27
27
|
template: '<AntDeleteButton v-bind="args"/>'
|
|
28
28
|
}),
|
|
29
|
-
args: {
|
|
29
|
+
args: {
|
|
30
|
+
invalidPermissionTooltipPosition: Position.right
|
|
31
|
+
}
|
|
30
32
|
};
|
|
31
33
|
export const Disabled = {
|
|
32
34
|
render: Docs.render,
|
|
@@ -56,11 +58,17 @@ export const Expanded = {
|
|
|
56
58
|
expanded: true
|
|
57
59
|
}
|
|
58
60
|
};
|
|
61
|
+
export const IconVariant = {
|
|
62
|
+
render: Docs.render,
|
|
63
|
+
args: {
|
|
64
|
+
...Docs.args,
|
|
65
|
+
iconVariant: true
|
|
66
|
+
}
|
|
67
|
+
};
|
|
59
68
|
export const InvalidPermission = {
|
|
60
69
|
render: Docs.render,
|
|
61
70
|
args: {
|
|
62
71
|
...Docs.args,
|
|
63
|
-
canDelete: false
|
|
64
|
-
invalidPermissionTooltipPosition: Position.right
|
|
72
|
+
canDelete: false
|
|
65
73
|
}
|
|
66
74
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import AntDuplicateButton from '../AntDuplicateButton.vue';
|
|
2
|
+
import { type Meta, type StoryObj } from '@storybook/vue3';
|
|
3
|
+
declare const meta: Meta<typeof AntDuplicateButton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AntDuplicateButton>;
|
|
6
|
+
export declare const Docs: Story;
|
|
7
|
+
export declare const Disabled: Story;
|
|
8
|
+
export declare const Grouped: Story;
|
|
9
|
+
export declare const Skeleton: Story;
|
|
10
|
+
export declare const Expanded: Story;
|
|
11
|
+
export declare const InvalidPermission: Story;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import AntDuplicateButton from "../AntDuplicateButton.vue";
|
|
2
|
+
import { Size } from "../../../enums/Size.enum.mjs";
|
|
3
|
+
import { Grouped as _Grouped } from "../../../enums/Grouped.enum.mjs";
|
|
4
|
+
import { Position } from "../../../enums/index.mjs";
|
|
5
|
+
const meta = {
|
|
6
|
+
title: "Components/Buttons/Duplicate Button",
|
|
7
|
+
component: AntDuplicateButton,
|
|
8
|
+
parameters: { controls: { sort: "requiredFirst" } },
|
|
9
|
+
argTypes: {
|
|
10
|
+
size: {
|
|
11
|
+
control: { type: "radio" },
|
|
12
|
+
options: Object.values(Size)
|
|
13
|
+
},
|
|
14
|
+
grouped: {
|
|
15
|
+
control: { type: "select" },
|
|
16
|
+
options: Object.values(_Grouped)
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
export default meta;
|
|
21
|
+
export const Docs = {
|
|
22
|
+
render: (args) => ({
|
|
23
|
+
components: { AntDuplicateButton },
|
|
24
|
+
setup() {
|
|
25
|
+
return { args };
|
|
26
|
+
},
|
|
27
|
+
template: '<AntDuplicateButton v-bind="args"/>'
|
|
28
|
+
}),
|
|
29
|
+
args: {
|
|
30
|
+
invalidPermissionTooltipPosition: Position.right
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export const Disabled = {
|
|
34
|
+
render: Docs.render,
|
|
35
|
+
args: {
|
|
36
|
+
...Docs.args,
|
|
37
|
+
disabled: true
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
export const Grouped = {
|
|
41
|
+
render: Docs.render,
|
|
42
|
+
args: {
|
|
43
|
+
...Docs.args,
|
|
44
|
+
grouped: _Grouped.left
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
export const Skeleton = {
|
|
48
|
+
render: Docs.render,
|
|
49
|
+
args: {
|
|
50
|
+
...Docs.args,
|
|
51
|
+
skeleton: true
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
export const Expanded = {
|
|
55
|
+
render: Docs.render,
|
|
56
|
+
args: {
|
|
57
|
+
...Docs.args,
|
|
58
|
+
expanded: true
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
export const InvalidPermission = {
|
|
62
|
+
render: Docs.render,
|
|
63
|
+
args: {
|
|
64
|
+
...Docs.args,
|
|
65
|
+
canDuplicate: false
|
|
66
|
+
}
|
|
67
|
+
};
|
|
@@ -26,7 +26,9 @@ export const Docs = {
|
|
|
26
26
|
},
|
|
27
27
|
template: '<AntSaveAndNewButton v-bind="args"/>'
|
|
28
28
|
}),
|
|
29
|
-
args: {
|
|
29
|
+
args: {
|
|
30
|
+
invalidPermissionTooltipPosition: Position.right
|
|
31
|
+
}
|
|
30
32
|
};
|
|
31
33
|
export const Disabled = {
|
|
32
34
|
render: Docs.render,
|
|
@@ -60,7 +62,6 @@ export const InvalidPermission = {
|
|
|
60
62
|
render: Docs.render,
|
|
61
63
|
args: {
|
|
62
64
|
...Docs.args,
|
|
63
|
-
canSave: false
|
|
64
|
-
invalidPermissionTooltipPosition: Position.right
|
|
65
|
+
canSave: false
|
|
65
66
|
}
|
|
66
67
|
};
|
|
@@ -26,7 +26,9 @@ export const Docs = {
|
|
|
26
26
|
},
|
|
27
27
|
template: '<AntSaveButton v-bind="args"/>'
|
|
28
28
|
}),
|
|
29
|
-
args: {
|
|
29
|
+
args: {
|
|
30
|
+
invalidPermissionTooltipPosition: Position.right
|
|
31
|
+
}
|
|
30
32
|
};
|
|
31
33
|
export const Disabled = {
|
|
32
34
|
render: Docs.render,
|
|
@@ -60,7 +62,6 @@ export const InvalidPermission = {
|
|
|
60
62
|
render: Docs.render,
|
|
61
63
|
args: {
|
|
62
64
|
...Docs.args,
|
|
63
|
-
canSave: false
|
|
64
|
-
invalidPermissionTooltipPosition: Position.right
|
|
65
|
+
canSave: false
|
|
65
66
|
}
|
|
66
67
|
};
|
|
@@ -7,33 +7,36 @@ withDefaults(defineProps<{
|
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
9
|
<template>
|
|
10
|
-
<div
|
|
10
|
+
<div
|
|
11
|
+
class="flex w-full h-full"
|
|
12
|
+
data-e2e="crud"
|
|
13
|
+
>
|
|
11
14
|
<div
|
|
12
15
|
class="left-content h-full flex flex-col bg-neutral-300 gap-px overflow-hidden"
|
|
13
16
|
:class="{'w-[40rem]': showDetail, 'w-full': !showDetail}"
|
|
14
17
|
>
|
|
15
|
-
<div class="bg-
|
|
16
|
-
<slot name="search-section"/>
|
|
18
|
+
<div class="bg-white">
|
|
19
|
+
<slot name="search-section" />
|
|
17
20
|
</div>
|
|
18
21
|
|
|
19
|
-
<div class="bg-
|
|
20
|
-
<slot name="table-section"/>
|
|
22
|
+
<div class="bg-white flex-grow h-full overflow-hidden">
|
|
23
|
+
<slot name="table-section" />
|
|
21
24
|
</div>
|
|
22
25
|
|
|
23
|
-
<div class="bg-
|
|
24
|
-
<slot name="table-nav-section"/>
|
|
26
|
+
<div class="bg-white">
|
|
27
|
+
<slot name="table-nav-section" />
|
|
25
28
|
</div>
|
|
26
29
|
</div>
|
|
27
30
|
|
|
28
|
-
<
|
|
31
|
+
<Transition name="right-content">
|
|
29
32
|
<div
|
|
30
33
|
v-if="showDetail"
|
|
31
34
|
class="flex flex-col gap-px border-l border-neutral-300 overflow-hidden"
|
|
32
35
|
:class="{'w-full': showDetail}"
|
|
33
36
|
>
|
|
34
|
-
<slot/>
|
|
37
|
+
<slot />
|
|
35
38
|
</div>
|
|
36
|
-
</
|
|
39
|
+
</Transition>
|
|
37
40
|
</div>
|
|
38
41
|
</template>
|
|
39
42
|
|