@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
|
@@ -4,7 +4,8 @@ import AntFormGroup from "../../form/AntFormGroup.vue";
|
|
|
4
4
|
import { faCaretRight, faCaretLeft } from "@fortawesome/free-solid-svg-icons";
|
|
5
5
|
import { Size } from "../../../enums/Size.enum.mjs";
|
|
6
6
|
import { Grouped as _Grouped } from "../../../enums/Grouped.enum.mjs";
|
|
7
|
-
import { ColorType } from "../../../enums/index.mjs";
|
|
7
|
+
import { ColorType, InputColorType, Position } from "../../../enums/index.mjs";
|
|
8
|
+
import { within } from "@storybook/test";
|
|
8
9
|
const meta = {
|
|
9
10
|
component: AntButton,
|
|
10
11
|
title: "Components/Buttons/Button",
|
|
@@ -39,6 +40,16 @@ const meta = {
|
|
|
39
40
|
},
|
|
40
41
|
submit: {
|
|
41
42
|
description: 'Change the button type to type="submit"'
|
|
43
|
+
},
|
|
44
|
+
tooltipPosition: {
|
|
45
|
+
control: { type: "select" },
|
|
46
|
+
options: Object.values(Position),
|
|
47
|
+
description: "The tooltips position. Tooltip is only shown if a tooltip-content slot is provided."
|
|
48
|
+
},
|
|
49
|
+
tooltipColorType: {
|
|
50
|
+
control: { type: "select" },
|
|
51
|
+
options: Object.values(InputColorType),
|
|
52
|
+
description: "The tooltips color type. Tooltip is only shown if a tooltip-content slot is provided."
|
|
42
53
|
}
|
|
43
54
|
}
|
|
44
55
|
};
|
|
@@ -82,24 +93,24 @@ export const Icons = {
|
|
|
82
93
|
};
|
|
83
94
|
},
|
|
84
95
|
template: `
|
|
85
|
-
|
|
86
|
-
|
|
96
|
+
<AntFormGroup>
|
|
97
|
+
<AntFormGroupLabel>Icons only</AntFormGroupLabel>
|
|
87
98
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
99
|
+
<AntFormGroup direction="row">
|
|
100
|
+
<AntButton v-bind="args" :icon-left="faCaretLeft"></AntButton>
|
|
101
|
+
<AntButton v-bind="args" :icon-right="faCaretRight"></AntButton>
|
|
102
|
+
<AntButton v-bind="args" :icon-left="faCaretLeft" :icon-right="faCaretRight"></AntButton>
|
|
103
|
+
</AntFormGroup>
|
|
93
104
|
|
|
94
|
-
|
|
105
|
+
<AntFormGroupLabel>Icons with text</AntFormGroupLabel>
|
|
95
106
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
107
|
+
<AntFormGroup direction="row">
|
|
108
|
+
<AntButton v-bind="args" :icon-left="faCaretLeft">Button</AntButton>
|
|
109
|
+
<AntButton v-bind="args" :icon-right="faCaretRight">Button</AntButton>
|
|
110
|
+
<AntButton v-bind="args" :icon-left="faCaretLeft" :icon-right="faCaretRight">Button</AntButton>
|
|
111
|
+
</AntFormGroup>
|
|
112
|
+
</AntFormGroup>
|
|
113
|
+
`
|
|
103
114
|
})
|
|
104
115
|
};
|
|
105
116
|
export const Grouped = {
|
|
@@ -138,6 +149,29 @@ export const WithoutBorder = {
|
|
|
138
149
|
outlined: false
|
|
139
150
|
}
|
|
140
151
|
};
|
|
152
|
+
export const WithTooltip = {
|
|
153
|
+
render: (args) => ({
|
|
154
|
+
components: { AntButton },
|
|
155
|
+
setup() {
|
|
156
|
+
return { args };
|
|
157
|
+
},
|
|
158
|
+
template: `
|
|
159
|
+
<AntButton v-bind="args">
|
|
160
|
+
<template #default>Button</template>
|
|
161
|
+
|
|
162
|
+
<template #tooltip-content>This is a button</template>
|
|
163
|
+
</AntButton>`
|
|
164
|
+
}),
|
|
165
|
+
play: async ({ canvasElement, step }) => {
|
|
166
|
+
const canvas = within(canvasElement);
|
|
167
|
+
},
|
|
168
|
+
args: {
|
|
169
|
+
tooltipDelay: 800
|
|
170
|
+
},
|
|
171
|
+
parameters: {
|
|
172
|
+
chromatic: { disableSnapshot: false }
|
|
173
|
+
}
|
|
174
|
+
};
|
|
141
175
|
export const Summary = {
|
|
142
176
|
parameters: {
|
|
143
177
|
chromatic: { disableSnapshot: false }
|
|
@@ -152,121 +186,122 @@ export const Summary = {
|
|
|
152
186
|
return { args };
|
|
153
187
|
},
|
|
154
188
|
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
|
-
|
|
189
|
+
<div class="flex flex-col gap-2.5">
|
|
190
|
+
<AntFormGroup>
|
|
191
|
+
<AntFormGroupLabel>
|
|
192
|
+
Grouped | Filled | Outlined combinations
|
|
193
|
+
</AntFormGroupLabel>
|
|
194
|
+
<div class="flex">
|
|
195
|
+
<AntButton v-bind="args" color-type="base" grouped="left" :filled="true" :outlined="false">
|
|
196
|
+
Button
|
|
197
|
+
</AntButton>
|
|
198
|
+
<AntButton v-bind="args" color-type="base" grouped="center" :filled="false" :outlined="false">
|
|
199
|
+
Button
|
|
200
|
+
</AntButton>
|
|
201
|
+
<AntButton v-bind="args" color-type="base" grouped="center" :filled="true" :outlined="true">
|
|
202
|
+
Button
|
|
203
|
+
</AntButton>
|
|
204
|
+
<AntButton v-bind="args" color-type="base" grouped="right" :filled="false" :outlined="true">
|
|
205
|
+
Button
|
|
206
|
+
</AntButton>
|
|
207
|
+
</div>
|
|
208
|
+
<div class="flex">
|
|
209
|
+
<AntButton v-bind="args" color-type="primary" grouped="left" :filled="true" :outlined="false">
|
|
210
|
+
Button
|
|
211
|
+
</AntButton>
|
|
212
|
+
<AntButton v-bind="args" color-type="primary" grouped="center" :filled="false" :outlined="false">
|
|
213
|
+
Button
|
|
214
|
+
</AntButton>
|
|
215
|
+
<AntButton v-bind="args" color-type="primary" grouped="center" :filled="true" :outlined="true">
|
|
216
|
+
Button
|
|
217
|
+
</AntButton>
|
|
218
|
+
<AntButton v-bind="args" color-type="primary" grouped="right" :filled="false" :outlined="true">
|
|
219
|
+
Button
|
|
220
|
+
</AntButton>
|
|
221
|
+
</div>
|
|
222
|
+
<div class="flex">
|
|
223
|
+
<AntButton v-bind="args" color-type="secondary" grouped="left" :filled="true" :outlined="false">
|
|
224
|
+
Button
|
|
225
|
+
</AntButton>
|
|
226
|
+
<AntButton v-bind="args" color-type="secondary" grouped="center" :filled="false" :outlined="false">
|
|
227
|
+
Button
|
|
228
|
+
</AntButton>
|
|
229
|
+
<AntButton v-bind="args" color-type="secondary" grouped="center" :filled="true" :outlined="true">
|
|
230
|
+
Button
|
|
231
|
+
</AntButton>
|
|
232
|
+
<AntButton v-bind="args" color-type="secondary" grouped="right" :filled="false" :outlined="true">
|
|
233
|
+
Button
|
|
234
|
+
</AntButton>
|
|
235
|
+
</div>
|
|
236
|
+
<div class="flex">
|
|
237
|
+
<AntButton v-bind="args" color-type="success" grouped="left" :filled="true" :outlined="false">
|
|
238
|
+
Button
|
|
239
|
+
</AntButton>
|
|
240
|
+
<AntButton v-bind="args" color-type="success" grouped="center" :filled="false" :outlined="false">
|
|
241
|
+
Button
|
|
242
|
+
</AntButton>
|
|
243
|
+
<AntButton v-bind="args" color-type="success" grouped="center" :filled="true" :outlined="true">
|
|
244
|
+
Button
|
|
245
|
+
</AntButton>
|
|
246
|
+
<AntButton v-bind="args" color-type="success" grouped="right" :filled="false" :outlined="true">
|
|
247
|
+
Button
|
|
248
|
+
</AntButton>
|
|
249
|
+
</div>
|
|
250
|
+
<div class="flex">
|
|
251
|
+
<AntButton v-bind="args" color-type="info" grouped="left" :filled="true" :outlined="false">
|
|
252
|
+
Button
|
|
253
|
+
</AntButton>
|
|
254
|
+
<AntButton v-bind="args" color-type="info" grouped="center" :filled="false" :outlined="false">
|
|
255
|
+
Button
|
|
256
|
+
</AntButton>
|
|
257
|
+
<AntButton v-bind="args" color-type="info" grouped="center" :filled="true" :outlined="true">
|
|
258
|
+
Button
|
|
259
|
+
</AntButton>
|
|
260
|
+
<AntButton v-bind="args" color-type="info" grouped="right" :filled="false" :outlined="true">
|
|
261
|
+
Button
|
|
262
|
+
</AntButton>
|
|
263
|
+
</div>
|
|
264
|
+
<div class="flex">
|
|
265
|
+
<AntButton v-bind="args" color-type="warning" grouped="left" :filled="true" :outlined="false">
|
|
266
|
+
Button
|
|
267
|
+
</AntButton>
|
|
268
|
+
<AntButton v-bind="args" color-type="warning" grouped="center" :filled="false" :outlined="false">
|
|
269
|
+
Button
|
|
270
|
+
</AntButton>
|
|
271
|
+
<AntButton v-bind="args" color-type="warning" grouped="center" :filled="true" :outlined="true">
|
|
272
|
+
Button
|
|
273
|
+
</AntButton>
|
|
274
|
+
<AntButton v-bind="args" color-type="warning" grouped="right" :filled="false" :outlined="true">
|
|
275
|
+
Button
|
|
276
|
+
</AntButton>
|
|
277
|
+
</div>
|
|
278
|
+
<div class="flex">
|
|
279
|
+
<AntButton v-bind="args" color-type="danger" grouped="left" :filled="true" :outlined="false">
|
|
280
|
+
Button
|
|
281
|
+
</AntButton>
|
|
282
|
+
<AntButton v-bind="args" color-type="danger" grouped="center" :filled="false" :outlined="false">
|
|
283
|
+
Button
|
|
284
|
+
</AntButton>
|
|
285
|
+
<AntButton v-bind="args" color-type="danger" grouped="center" :filled="true" :outlined="true">
|
|
286
|
+
Button
|
|
287
|
+
</AntButton>
|
|
288
|
+
<AntButton v-bind="args" color-type="danger" grouped="right" :filled="false" :outlined="true">
|
|
289
|
+
Button
|
|
290
|
+
</AntButton>
|
|
291
|
+
</div>
|
|
292
|
+
</AntFormGroup>
|
|
293
|
+
|
|
294
|
+
<AntFormGroup>
|
|
295
|
+
<AntFormGroupLabel>
|
|
296
|
+
Size
|
|
297
|
+
</AntFormGroupLabel>
|
|
298
|
+
<AntFormGroup direction="row">
|
|
299
|
+
<AntButton v-bind="args" size="md">Button</AntButton>
|
|
300
|
+
<AntButton v-bind="args" size="sm">Button</AntButton>
|
|
301
|
+
</AntFormGroup>
|
|
302
|
+
</AntFormGroup>
|
|
303
|
+
</div>
|
|
304
|
+
`
|
|
270
305
|
}),
|
|
271
306
|
args: {
|
|
272
307
|
iconLeft: faCaretLeft,
|
|
@@ -4,6 +4,7 @@ declare const meta: Meta<typeof AntCreateButton>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof AntCreateButton>;
|
|
6
6
|
export declare const Docs: Story;
|
|
7
|
+
export declare const IconVariant: Story;
|
|
7
8
|
export declare const Disabled: Story;
|
|
8
9
|
export declare const Grouped: Story;
|
|
9
10
|
export declare const Skeleton: Story;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import AntCreateButton from "../AntCreateButton.vue";
|
|
2
|
-
import { Size } from "../../../enums/
|
|
3
|
-
import { Grouped as _Grouped } from "../../../enums/Grouped.enum.mjs";
|
|
4
|
-
import { Position } from "../../../enums/index.mjs";
|
|
2
|
+
import { Position, Grouped as _Grouped, Size } from "../../../enums/index.mjs";
|
|
5
3
|
const meta = {
|
|
6
4
|
title: "Components/Buttons/Create Button",
|
|
7
5
|
component: AntCreateButton,
|
|
@@ -14,6 +12,10 @@ const meta = {
|
|
|
14
12
|
grouped: {
|
|
15
13
|
control: { type: "select" },
|
|
16
14
|
options: Object.values(_Grouped)
|
|
15
|
+
},
|
|
16
|
+
tooltipPosition: {
|
|
17
|
+
control: { type: "select" },
|
|
18
|
+
options: Object.values(Position)
|
|
17
19
|
}
|
|
18
20
|
}
|
|
19
21
|
};
|
|
@@ -26,7 +28,16 @@ export const Docs = {
|
|
|
26
28
|
},
|
|
27
29
|
template: '<AntCreateButton v-bind="args"/>'
|
|
28
30
|
}),
|
|
29
|
-
args: {
|
|
31
|
+
args: {
|
|
32
|
+
tooltipPosition: Position.right
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export const IconVariant = {
|
|
36
|
+
render: Docs.render,
|
|
37
|
+
args: {
|
|
38
|
+
...Docs.args,
|
|
39
|
+
iconVariant: true
|
|
40
|
+
}
|
|
30
41
|
};
|
|
31
42
|
export const Disabled = {
|
|
32
43
|
render: Docs.render,
|
|
@@ -60,7 +71,6 @@ export const InvalidPermission = {
|
|
|
60
71
|
render: Docs.render,
|
|
61
72
|
args: {
|
|
62
73
|
...Docs.args,
|
|
63
|
-
canCreate: false
|
|
64
|
-
invalidPermissionTooltipPosition: Position.right
|
|
74
|
+
canCreate: false
|
|
65
75
|
}
|
|
66
76
|
};
|
|
@@ -4,6 +4,7 @@ declare const meta: Meta<typeof AntDeleteButton>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof AntDeleteButton>;
|
|
6
6
|
export declare const Docs: Story;
|
|
7
|
+
export declare const IconVariant: Story;
|
|
7
8
|
export declare const Disabled: Story;
|
|
8
9
|
export declare const Grouped: Story;
|
|
9
10
|
export declare const Skeleton: Story;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import AntDeleteButton from "../AntDeleteButton.vue";
|
|
2
|
-
import { Size } from "../../../enums/
|
|
3
|
-
import { Grouped as _Grouped } from "../../../enums/Grouped.enum.mjs";
|
|
4
|
-
import { Position } from "../../../enums/index.mjs";
|
|
2
|
+
import { Position, Grouped as _Grouped, Size } from "../../../enums/index.mjs";
|
|
5
3
|
const meta = {
|
|
6
4
|
title: "Components/Buttons/Delete Button",
|
|
7
5
|
component: AntDeleteButton,
|
|
@@ -14,6 +12,10 @@ const meta = {
|
|
|
14
12
|
grouped: {
|
|
15
13
|
control: { type: "select" },
|
|
16
14
|
options: Object.values(_Grouped)
|
|
15
|
+
},
|
|
16
|
+
tooltipPosition: {
|
|
17
|
+
control: { type: "select" },
|
|
18
|
+
options: Object.values(Position)
|
|
17
19
|
}
|
|
18
20
|
}
|
|
19
21
|
};
|
|
@@ -26,7 +28,16 @@ export const Docs = {
|
|
|
26
28
|
},
|
|
27
29
|
template: '<AntDeleteButton v-bind="args"/>'
|
|
28
30
|
}),
|
|
29
|
-
args: {
|
|
31
|
+
args: {
|
|
32
|
+
tooltipPosition: Position.right
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export const IconVariant = {
|
|
36
|
+
render: Docs.render,
|
|
37
|
+
args: {
|
|
38
|
+
...Docs.args,
|
|
39
|
+
iconVariant: true
|
|
40
|
+
}
|
|
30
41
|
};
|
|
31
42
|
export const Disabled = {
|
|
32
43
|
render: Docs.render,
|
|
@@ -60,7 +71,6 @@ export const InvalidPermission = {
|
|
|
60
71
|
render: Docs.render,
|
|
61
72
|
args: {
|
|
62
73
|
...Docs.args,
|
|
63
|
-
canDelete: false
|
|
64
|
-
invalidPermissionTooltipPosition: Position.right
|
|
74
|
+
canDelete: false
|
|
65
75
|
}
|
|
66
76
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
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 IconVariant: Story;
|
|
8
|
+
export declare const Disabled: Story;
|
|
9
|
+
export declare const Grouped: Story;
|
|
10
|
+
export declare const Skeleton: Story;
|
|
11
|
+
export declare const Expanded: Story;
|
|
12
|
+
export declare const InvalidPermission: Story;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import AntDuplicateButton from "../AntDuplicateButton.vue";
|
|
2
|
+
import { Position, Grouped as _Grouped, Size } from "../../../enums/index.mjs";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: "Components/Buttons/Duplicate Button",
|
|
5
|
+
component: AntDuplicateButton,
|
|
6
|
+
parameters: { controls: { sort: "requiredFirst" } },
|
|
7
|
+
argTypes: {
|
|
8
|
+
size: {
|
|
9
|
+
control: { type: "radio" },
|
|
10
|
+
options: Object.values(Size)
|
|
11
|
+
},
|
|
12
|
+
grouped: {
|
|
13
|
+
control: { type: "select" },
|
|
14
|
+
options: Object.values(_Grouped)
|
|
15
|
+
},
|
|
16
|
+
tooltipPosition: {
|
|
17
|
+
control: { type: "select" },
|
|
18
|
+
options: Object.values(Position)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export default meta;
|
|
23
|
+
export const Docs = {
|
|
24
|
+
render: (args) => ({
|
|
25
|
+
components: { AntDuplicateButton },
|
|
26
|
+
setup() {
|
|
27
|
+
return { args };
|
|
28
|
+
},
|
|
29
|
+
template: '<AntDuplicateButton v-bind="args"/>'
|
|
30
|
+
}),
|
|
31
|
+
args: {
|
|
32
|
+
tooltipPosition: Position.right
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export const IconVariant = {
|
|
36
|
+
render: Docs.render,
|
|
37
|
+
args: {
|
|
38
|
+
...Docs.args,
|
|
39
|
+
iconVariant: true
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
export const Disabled = {
|
|
43
|
+
render: Docs.render,
|
|
44
|
+
args: {
|
|
45
|
+
...Docs.args,
|
|
46
|
+
disabled: true
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
export const Grouped = {
|
|
50
|
+
render: Docs.render,
|
|
51
|
+
args: {
|
|
52
|
+
...Docs.args,
|
|
53
|
+
grouped: _Grouped.left
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
export const Skeleton = {
|
|
57
|
+
render: Docs.render,
|
|
58
|
+
args: {
|
|
59
|
+
...Docs.args,
|
|
60
|
+
skeleton: true
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
export const Expanded = {
|
|
64
|
+
render: Docs.render,
|
|
65
|
+
args: {
|
|
66
|
+
...Docs.args,
|
|
67
|
+
expanded: true
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
export const InvalidPermission = {
|
|
71
|
+
render: Docs.render,
|
|
72
|
+
args: {
|
|
73
|
+
...Docs.args,
|
|
74
|
+
canDuplicate: false
|
|
75
|
+
}
|
|
76
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import AntEditButton from '../AntEditButton.vue';
|
|
2
|
+
import { type Meta, type StoryObj } from '@storybook/vue3';
|
|
3
|
+
declare const meta: Meta<typeof AntEditButton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AntEditButton>;
|
|
6
|
+
export declare const Docs: Story;
|
|
7
|
+
export declare const IconVariant: Story;
|
|
8
|
+
export declare const Disabled: Story;
|
|
9
|
+
export declare const Grouped: Story;
|
|
10
|
+
export declare const Skeleton: Story;
|
|
11
|
+
export declare const Expanded: Story;
|
|
12
|
+
export declare const InvalidPermission: Story;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import AntEditButton from "../AntEditButton.vue";
|
|
2
|
+
import { Position, Grouped as _Grouped, Size } from "../../../enums/index.mjs";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: "Components/Buttons/Edit Button",
|
|
5
|
+
component: AntEditButton,
|
|
6
|
+
parameters: { controls: { sort: "requiredFirst" } },
|
|
7
|
+
argTypes: {
|
|
8
|
+
size: {
|
|
9
|
+
control: { type: "radio" },
|
|
10
|
+
options: Object.values(Size)
|
|
11
|
+
},
|
|
12
|
+
grouped: {
|
|
13
|
+
control: { type: "select" },
|
|
14
|
+
options: Object.values(_Grouped)
|
|
15
|
+
},
|
|
16
|
+
tooltipPosition: {
|
|
17
|
+
control: { type: "select" },
|
|
18
|
+
options: Object.values(Position)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export default meta;
|
|
23
|
+
export const Docs = {
|
|
24
|
+
render: (args) => ({
|
|
25
|
+
components: { AntEditButton },
|
|
26
|
+
setup() {
|
|
27
|
+
return { args };
|
|
28
|
+
},
|
|
29
|
+
template: '<AntEditButton v-bind="args"/>'
|
|
30
|
+
}),
|
|
31
|
+
args: {
|
|
32
|
+
tooltipPosition: Position.right
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export const IconVariant = {
|
|
36
|
+
render: Docs.render,
|
|
37
|
+
args: {
|
|
38
|
+
...Docs.args,
|
|
39
|
+
iconVariant: true
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
export const Disabled = {
|
|
43
|
+
render: Docs.render,
|
|
44
|
+
args: {
|
|
45
|
+
...Docs.args,
|
|
46
|
+
disabled: true
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
export const Grouped = {
|
|
50
|
+
render: Docs.render,
|
|
51
|
+
args: {
|
|
52
|
+
...Docs.args,
|
|
53
|
+
grouped: _Grouped.left
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
export const Skeleton = {
|
|
57
|
+
render: Docs.render,
|
|
58
|
+
args: {
|
|
59
|
+
...Docs.args,
|
|
60
|
+
skeleton: true
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
export const Expanded = {
|
|
64
|
+
render: Docs.render,
|
|
65
|
+
args: {
|
|
66
|
+
...Docs.args,
|
|
67
|
+
expanded: true
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
export const InvalidPermission = {
|
|
71
|
+
render: Docs.render,
|
|
72
|
+
args: {
|
|
73
|
+
...Docs.args,
|
|
74
|
+
canEdit: false
|
|
75
|
+
}
|
|
76
|
+
};
|
|
@@ -4,6 +4,7 @@ declare const meta: Meta<typeof AntSaveAndNewButton>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof AntSaveAndNewButton>;
|
|
6
6
|
export declare const Docs: Story;
|
|
7
|
+
export declare const IconVariant: Story;
|
|
7
8
|
export declare const Disabled: Story;
|
|
8
9
|
export declare const Grouped: Story;
|
|
9
10
|
export declare const Skeleton: Story;
|