@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.
Files changed (88) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +2 -1
  3. package/dist/runtime/components/AntAccordionItem.vue +17 -14
  4. package/dist/runtime/components/AntDropdown.vue +6 -6
  5. package/dist/runtime/components/AntListGroupItem.vue +16 -10
  6. package/dist/runtime/components/AntModal.vue +10 -9
  7. package/dist/runtime/components/AntPopover.vue +10 -8
  8. package/dist/runtime/components/AntTooltip.vue +32 -20
  9. package/dist/runtime/components/__stories/AntTooltip.stories.d.ts +1 -1
  10. package/dist/runtime/components/__stories/AntTooltip.stories.mjs +164 -12
  11. package/dist/runtime/components/buttons/AntActionButton.vue +40 -32
  12. package/dist/runtime/components/buttons/AntButton.vue +188 -168
  13. package/dist/runtime/components/buttons/AntCreateButton.vue +19 -6
  14. package/dist/runtime/components/buttons/AntDeleteButton.vue +21 -10
  15. package/dist/runtime/components/buttons/AntDuplicateButton.vue +54 -0
  16. package/dist/runtime/components/buttons/AntEditButton.vue +54 -0
  17. package/dist/runtime/components/buttons/AntSaveAndNewButton.vue +21 -8
  18. package/dist/runtime/components/buttons/AntSaveButton.vue +21 -10
  19. package/dist/runtime/components/buttons/__stories/AntActionButton.stories.d.ts +1 -1
  20. package/dist/runtime/components/buttons/__stories/AntActionButton.stories.mjs +22 -19
  21. package/dist/runtime/components/buttons/__stories/AntButton.stories.d.ts +1 -0
  22. package/dist/runtime/components/buttons/__stories/AntButton.stories.mjs +166 -131
  23. package/dist/runtime/components/buttons/__stories/AntCreateButton.stories.d.ts +1 -0
  24. package/dist/runtime/components/buttons/__stories/AntCreateButton.stories.mjs +16 -6
  25. package/dist/runtime/components/buttons/__stories/AntDeleteButton.stories.d.ts +1 -0
  26. package/dist/runtime/components/buttons/__stories/AntDeleteButton.stories.mjs +16 -6
  27. package/dist/runtime/components/buttons/__stories/AntDuplicateButton.stories.d.ts +12 -0
  28. package/dist/runtime/components/buttons/__stories/AntDuplicateButton.stories.mjs +76 -0
  29. package/dist/runtime/components/buttons/__stories/AntEditButton.stories.d.ts +12 -0
  30. package/dist/runtime/components/buttons/__stories/AntEditButton.stories.mjs +76 -0
  31. package/dist/runtime/components/buttons/__stories/AntSaveAndNewButton.stories.d.ts +1 -0
  32. package/dist/runtime/components/buttons/__stories/AntSaveAndNewButton.stories.mjs +16 -6
  33. package/dist/runtime/components/buttons/__stories/AntSaveButton.stories.d.ts +1 -0
  34. package/dist/runtime/components/buttons/__stories/AntSaveButton.stories.mjs +16 -6
  35. package/dist/runtime/components/crud/AntCrud.vue +13 -10
  36. package/dist/runtime/components/crud/AntCrudDetail.vue +1 -1
  37. package/dist/runtime/components/crud/AntCrudDetailActions.vue +1 -1
  38. package/dist/runtime/components/crud/AntCrudDetailNav.vue +1 -1
  39. package/dist/runtime/components/crud/AntCrudTableFilter.vue +1 -1
  40. package/dist/runtime/components/crud/AntCrudTableNav.vue +15 -4
  41. package/dist/runtime/components/dialogs/AntDialog.vue +7 -7
  42. package/dist/runtime/components/form/AntCheckboxWidget/AntCheckbox.vue +1 -2
  43. package/dist/runtime/components/form/AntFormGroup.vue +22 -7
  44. package/dist/runtime/components/form/AntSelect.vue +57 -53
  45. package/dist/runtime/components/form/AntSwitch.vue +13 -10
  46. package/dist/runtime/components/form/AntSwitcher.vue +4 -4
  47. package/dist/runtime/components/form/AntTextarea.vue +6 -3
  48. package/dist/runtime/components/form/Elements/AntBaseInput.vue +45 -41
  49. package/dist/runtime/components/form/Elements/AntDropDown.vue +1 -1
  50. package/dist/runtime/components/layouts/AntNavLeftLayout.vue +4 -4
  51. package/dist/runtime/components/table/AntTable.vue +95 -73
  52. package/dist/runtime/components/table/AntTableSortButton.vue +16 -4
  53. package/dist/runtime/components/tabs/AntTabItem.vue +7 -4
  54. package/dist/runtime/tailwind.config.mjs +1 -1
  55. package/package.json +11 -11
  56. package/src/runtime/components/AntAccordionItem.vue +17 -14
  57. package/src/runtime/components/AntDropdown.vue +6 -6
  58. package/src/runtime/components/AntListGroupItem.vue +16 -10
  59. package/src/runtime/components/AntModal.vue +10 -9
  60. package/src/runtime/components/AntPopover.vue +10 -8
  61. package/src/runtime/components/AntTooltip.vue +32 -20
  62. package/src/runtime/components/buttons/AntActionButton.vue +40 -32
  63. package/src/runtime/components/buttons/AntButton.vue +188 -168
  64. package/src/runtime/components/buttons/AntCreateButton.vue +19 -6
  65. package/src/runtime/components/buttons/AntDeleteButton.vue +21 -10
  66. package/src/runtime/components/buttons/AntDuplicateButton.vue +54 -0
  67. package/src/runtime/components/buttons/AntEditButton.vue +54 -0
  68. package/src/runtime/components/buttons/AntSaveAndNewButton.vue +21 -8
  69. package/src/runtime/components/buttons/AntSaveButton.vue +21 -10
  70. package/src/runtime/components/crud/AntCrud.vue +13 -10
  71. package/src/runtime/components/crud/AntCrudDetail.vue +1 -1
  72. package/src/runtime/components/crud/AntCrudDetailActions.vue +1 -1
  73. package/src/runtime/components/crud/AntCrudDetailNav.vue +1 -1
  74. package/src/runtime/components/crud/AntCrudTableFilter.vue +1 -1
  75. package/src/runtime/components/crud/AntCrudTableNav.vue +15 -4
  76. package/src/runtime/components/dialogs/AntDialog.vue +7 -7
  77. package/src/runtime/components/form/AntCheckboxWidget/AntCheckbox.vue +1 -2
  78. package/src/runtime/components/form/AntFormGroup.vue +22 -7
  79. package/src/runtime/components/form/AntSelect.vue +57 -53
  80. package/src/runtime/components/form/AntSwitch.vue +13 -10
  81. package/src/runtime/components/form/AntSwitcher.vue +4 -4
  82. package/src/runtime/components/form/AntTextarea.vue +6 -3
  83. package/src/runtime/components/form/Elements/AntBaseInput.vue +45 -41
  84. package/src/runtime/components/form/Elements/AntDropDown.vue +1 -1
  85. package/src/runtime/components/layouts/AntNavLeftLayout.vue +4 -4
  86. package/src/runtime/components/table/AntTable.vue +95 -73
  87. package/src/runtime/components/table/AntTableSortButton.vue +16 -4
  88. 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
- <AntFormGroup>
86
- <AntFormGroupLabel>Icons only</AntFormGroupLabel>
96
+ <AntFormGroup>
97
+ <AntFormGroupLabel>Icons only</AntFormGroupLabel>
87
98
 
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>
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
- <AntFormGroupLabel>Icons with text</AntFormGroupLabel>
105
+ <AntFormGroupLabel>Icons with text</AntFormGroupLabel>
95
106
 
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
- `
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
- <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
- `
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/Size.enum.mjs";
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/Size.enum.mjs";
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;