@antify/ui-module 1.3.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.
Files changed (83) 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 +69 -63
  9. package/dist/runtime/components/__stories/AntTooltip.stories.d.ts +5 -0
  10. package/dist/runtime/components/__stories/AntTooltip.stories.mjs +33 -11
  11. package/dist/runtime/components/buttons/AntActionButton.vue +40 -13
  12. package/dist/runtime/components/buttons/AntButton.vue +126 -126
  13. package/dist/runtime/components/buttons/AntCreateButton.vue +21 -8
  14. package/dist/runtime/components/buttons/AntDeleteButton.vue +30 -8
  15. package/dist/runtime/components/buttons/AntDuplicateButton.vue +42 -0
  16. package/dist/runtime/components/buttons/AntSaveAndNewButton.vue +21 -8
  17. package/dist/runtime/components/buttons/AntSaveButton.vue +20 -8
  18. package/dist/runtime/components/buttons/__stories/AntActionButton.stories.d.ts +1 -0
  19. package/dist/runtime/components/buttons/__stories/AntActionButton.stories.mjs +25 -1
  20. package/dist/runtime/components/buttons/__stories/AntButton.stories.mjs +130 -130
  21. package/dist/runtime/components/buttons/__stories/AntCreateButton.stories.d.ts +1 -0
  22. package/dist/runtime/components/buttons/__stories/AntCreateButton.stories.mjs +11 -1
  23. package/dist/runtime/components/buttons/__stories/AntDeleteButton.stories.d.ts +2 -0
  24. package/dist/runtime/components/buttons/__stories/AntDeleteButton.stories.mjs +18 -1
  25. package/dist/runtime/components/buttons/__stories/AntDuplicateButton.stories.d.ts +11 -0
  26. package/dist/runtime/components/buttons/__stories/AntDuplicateButton.stories.mjs +67 -0
  27. package/dist/runtime/components/buttons/__stories/AntSaveAndNewButton.stories.d.ts +1 -0
  28. package/dist/runtime/components/buttons/__stories/AntSaveAndNewButton.stories.mjs +11 -1
  29. package/dist/runtime/components/buttons/__stories/AntSaveButton.stories.d.ts +1 -0
  30. package/dist/runtime/components/buttons/__stories/AntSaveButton.stories.mjs +11 -1
  31. package/dist/runtime/components/crud/AntCrud.vue +13 -10
  32. package/dist/runtime/components/crud/AntCrudDetail.vue +1 -1
  33. package/dist/runtime/components/crud/AntCrudDetailActions.vue +10 -3
  34. package/dist/runtime/components/crud/AntCrudDetailNav.vue +21 -15
  35. package/dist/runtime/components/crud/AntCrudTableFilter.vue +36 -34
  36. package/dist/runtime/components/crud/AntCrudTableNav.vue +15 -4
  37. package/dist/runtime/components/dialogs/AntDialog.vue +7 -7
  38. package/dist/runtime/components/form/AntCheckboxWidget/AntCheckbox.vue +1 -2
  39. package/dist/runtime/components/form/AntSelect.vue +57 -53
  40. package/dist/runtime/components/form/AntSwitch.vue +13 -10
  41. package/dist/runtime/components/form/AntSwitcher.vue +4 -4
  42. package/dist/runtime/components/form/AntTextarea.vue +6 -3
  43. package/dist/runtime/components/form/Elements/AntBaseInput.vue +45 -41
  44. package/dist/runtime/components/form/Elements/AntDropDown.vue +1 -1
  45. package/dist/runtime/components/layouts/AntNavLeftLayout.vue +4 -4
  46. package/dist/runtime/components/table/AntTable.vue +95 -73
  47. package/dist/runtime/components/table/AntTableSortButton.vue +16 -4
  48. package/dist/runtime/components/tabs/AntTabItem.vue +7 -4
  49. package/dist/runtime/tailwind.config.mjs +1 -1
  50. package/dist/runtime/utils.d.ts +6 -0
  51. package/dist/runtime/utils.mjs +21 -0
  52. package/package.json +1 -1
  53. package/src/runtime/components/AntAccordionItem.vue +17 -14
  54. package/src/runtime/components/AntDropdown.vue +6 -6
  55. package/src/runtime/components/AntListGroupItem.vue +16 -10
  56. package/src/runtime/components/AntModal.vue +10 -9
  57. package/src/runtime/components/AntPopover.vue +10 -8
  58. package/src/runtime/components/AntTooltip.vue +69 -63
  59. package/src/runtime/components/buttons/AntActionButton.vue +40 -13
  60. package/src/runtime/components/buttons/AntButton.vue +126 -126
  61. package/src/runtime/components/buttons/AntCreateButton.vue +21 -8
  62. package/src/runtime/components/buttons/AntDeleteButton.vue +30 -8
  63. package/src/runtime/components/buttons/AntDuplicateButton.vue +42 -0
  64. package/src/runtime/components/buttons/AntSaveAndNewButton.vue +21 -8
  65. package/src/runtime/components/buttons/AntSaveButton.vue +20 -8
  66. package/src/runtime/components/crud/AntCrud.vue +13 -10
  67. package/src/runtime/components/crud/AntCrudDetail.vue +1 -1
  68. package/src/runtime/components/crud/AntCrudDetailActions.vue +10 -3
  69. package/src/runtime/components/crud/AntCrudDetailNav.vue +21 -15
  70. package/src/runtime/components/crud/AntCrudTableFilter.vue +36 -34
  71. package/src/runtime/components/crud/AntCrudTableNav.vue +15 -4
  72. package/src/runtime/components/dialogs/AntDialog.vue +7 -7
  73. package/src/runtime/components/form/AntCheckboxWidget/AntCheckbox.vue +1 -2
  74. package/src/runtime/components/form/AntSelect.vue +57 -53
  75. package/src/runtime/components/form/AntSwitch.vue +13 -10
  76. package/src/runtime/components/form/AntSwitcher.vue +4 -4
  77. package/src/runtime/components/form/AntTextarea.vue +6 -3
  78. package/src/runtime/components/form/Elements/AntBaseInput.vue +45 -41
  79. package/src/runtime/components/form/Elements/AntDropDown.vue +1 -1
  80. package/src/runtime/components/layouts/AntNavLeftLayout.vue +4 -4
  81. package/src/runtime/components/table/AntTable.vue +95 -73
  82. package/src/runtime/components/table/AntTableSortButton.vue +16 -4
  83. package/src/runtime/components/tabs/AntTabItem.vue +7 -4
@@ -82,24 +82,24 @@ export const Icons = {
82
82
  };
83
83
  },
84
84
  template: `
85
- <AntFormGroup>
86
- <AntFormGroupLabel>Icons only</AntFormGroupLabel>
85
+ <AntFormGroup>
86
+ <AntFormGroupLabel>Icons only</AntFormGroupLabel>
87
87
 
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>
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
- <AntFormGroupLabel>Icons with text</AntFormGroupLabel>
94
+ <AntFormGroupLabel>Icons with text</AntFormGroupLabel>
95
95
 
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
- `
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
- <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
- `
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,
@@ -8,3 +8,4 @@ export declare const Disabled: Story;
8
8
  export declare const Grouped: Story;
9
9
  export declare const Skeleton: Story;
10
10
  export declare const Expanded: Story;
11
+ export declare const InvalidPermission: Story;
@@ -1,6 +1,7 @@
1
1
  import AntCreateButton from "../AntCreateButton.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/index.mjs";
4
5
  const meta = {
5
6
  title: "Components/Buttons/Create Button",
6
7
  component: AntCreateButton,
@@ -25,7 +26,9 @@ export const Docs = {
25
26
  },
26
27
  template: '<AntCreateButton v-bind="args"/>'
27
28
  }),
28
- args: {}
29
+ args: {
30
+ invalidPermissionTooltipPosition: Position.right
31
+ }
29
32
  };
30
33
  export const Disabled = {
31
34
  render: Docs.render,
@@ -55,3 +58,10 @@ export const Expanded = {
55
58
  expanded: true
56
59
  }
57
60
  };
61
+ export const InvalidPermission = {
62
+ render: Docs.render,
63
+ args: {
64
+ ...Docs.args,
65
+ canCreate: false
66
+ }
67
+ };
@@ -8,3 +8,5 @@ export declare const Disabled: Story;
8
8
  export declare const Grouped: Story;
9
9
  export declare const Skeleton: Story;
10
10
  export declare const Expanded: Story;
11
+ export declare const IconVariant: Story;
12
+ export declare const InvalidPermission: Story;
@@ -1,6 +1,7 @@
1
1
  import AntDeleteButton from "../AntDeleteButton.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/index.mjs";
4
5
  const meta = {
5
6
  title: "Components/Buttons/Delete Button",
6
7
  component: AntDeleteButton,
@@ -25,7 +26,9 @@ export const Docs = {
25
26
  },
26
27
  template: '<AntDeleteButton v-bind="args"/>'
27
28
  }),
28
- args: {}
29
+ args: {
30
+ invalidPermissionTooltipPosition: Position.right
31
+ }
29
32
  };
30
33
  export const Disabled = {
31
34
  render: Docs.render,
@@ -55,3 +58,17 @@ export const Expanded = {
55
58
  expanded: true
56
59
  }
57
60
  };
61
+ export const IconVariant = {
62
+ render: Docs.render,
63
+ args: {
64
+ ...Docs.args,
65
+ iconVariant: true
66
+ }
67
+ };
68
+ export const InvalidPermission = {
69
+ render: Docs.render,
70
+ args: {
71
+ ...Docs.args,
72
+ canDelete: false
73
+ }
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
+ };
@@ -8,3 +8,4 @@ export declare const Disabled: Story;
8
8
  export declare const Grouped: Story;
9
9
  export declare const Skeleton: Story;
10
10
  export declare const Expanded: Story;
11
+ export declare const InvalidPermission: Story;
@@ -1,6 +1,7 @@
1
1
  import AntSaveAndNewButton from "../AntSaveAndNewButton.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/index.mjs";
4
5
  const meta = {
5
6
  title: "Components/Buttons/Save And New Button",
6
7
  component: AntSaveAndNewButton,
@@ -25,7 +26,9 @@ export const Docs = {
25
26
  },
26
27
  template: '<AntSaveAndNewButton v-bind="args"/>'
27
28
  }),
28
- args: {}
29
+ args: {
30
+ invalidPermissionTooltipPosition: Position.right
31
+ }
29
32
  };
30
33
  export const Disabled = {
31
34
  render: Docs.render,
@@ -55,3 +58,10 @@ export const Expanded = {
55
58
  expanded: true
56
59
  }
57
60
  };
61
+ export const InvalidPermission = {
62
+ render: Docs.render,
63
+ args: {
64
+ ...Docs.args,
65
+ canSave: false
66
+ }
67
+ };
@@ -8,3 +8,4 @@ export declare const Disabled: Story;
8
8
  export declare const Grouped: Story;
9
9
  export declare const Skeleton: Story;
10
10
  export declare const Expanded: Story;
11
+ export declare const InvalidPermission: Story;
@@ -1,6 +1,7 @@
1
1
  import AntSaveButton from "../AntSaveButton.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/index.mjs";
4
5
  const meta = {
5
6
  title: "Components/Buttons/Save Button",
6
7
  component: AntSaveButton,
@@ -25,7 +26,9 @@ export const Docs = {
25
26
  },
26
27
  template: '<AntSaveButton v-bind="args"/>'
27
28
  }),
28
- args: {}
29
+ args: {
30
+ invalidPermissionTooltipPosition: Position.right
31
+ }
29
32
  };
30
33
  export const Disabled = {
31
34
  render: Docs.render,
@@ -55,3 +58,10 @@ export const Expanded = {
55
58
  expanded: true
56
59
  }
57
60
  };
61
+ export const InvalidPermission = {
62
+ render: Docs.render,
63
+ args: {
64
+ ...Docs.args,
65
+ canSave: false
66
+ }
67
+ };
@@ -7,33 +7,36 @@ withDefaults(defineProps<{
7
7
  </script>
8
8
 
9
9
  <template>
10
- <div class="flex w-full h-full" data-e2e="crud">
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-neutral-50">
16
- <slot name="search-section"/>
18
+ <div class="bg-white">
19
+ <slot name="search-section" />
17
20
  </div>
18
21
 
19
- <div class="bg-neutral-50 flex-grow h-full overflow-hidden">
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-neutral-50">
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
- <transition name="right-content">
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
- </transition>
39
+ </Transition>
37
40
  </div>
38
41
  </template>
39
42
 
@@ -2,7 +2,7 @@
2
2
  <div class="flex flex-col bg-neutral-300 gap-px h-full" data-e2e="crud-detail">
3
3
  <slot name="header"/>
4
4
 
5
- <div class="flex-grow bg-neutral-50 h-full overflow-y-auto">
5
+ <div class="flex-grow bg-white h-full overflow-y-auto">
6
6
  <slot/>
7
7
  </div>
8
8
 
@@ -8,14 +8,19 @@ defineEmits(['back', 'save', 'save-and-new']);
8
8
  withDefaults(defineProps<{
9
9
  disabled?: boolean
10
10
  skeleton?: boolean
11
+ canSave?: boolean
11
12
  }>(), {
12
13
  disabled: false,
13
14
  skeleton: false,
15
+ canSave: true
14
16
  });
15
17
  </script>
16
18
 
17
19
  <template>
18
- <div class="flex justify-between p-2.5 gap-2.5 bg-neutral-50" data-e2e="crud-detail-actions">
20
+ <div
21
+ class="flex justify-between p-2.5 gap-2.5 bg-white"
22
+ data-e2e="crud-detail-actions"
23
+ >
19
24
  <div class="flex gap-2.5">
20
25
  <slot name="buttons-left">
21
26
  <AntButton
@@ -31,21 +36,23 @@ withDefaults(defineProps<{
31
36
  </div>
32
37
 
33
38
  <div class="flex gap-2.5">
34
- <slot name="before-buttons-right"/>
39
+ <slot name="before-buttons-right" />
35
40
  <slot name="buttons-right">
36
41
  <AntSaveAndNewButton
37
42
  :skeleton="skeleton"
38
43
  :disabled="disabled"
44
+ :can-save="canSave"
39
45
  @click="$emit('save-and-new')"
40
46
  />
41
47
 
42
48
  <AntSaveButton
43
49
  :skeleton="skeleton"
44
50
  :disabled="disabled"
51
+ :can-save="canSave"
45
52
  @click="$emit('save')"
46
53
  />
47
54
  </slot>
48
- <slot name="after-buttons-right"/>
55
+ <slot name="after-buttons-right" />
49
56
  </div>
50
57
  </div>
51
58
  </template>