@antify/ui 2.2.0 → 2.2.3

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 (150) hide show
  1. package/dist/components/AntAccordion.vue +25 -12
  2. package/dist/components/AntAccordionItem.vue +28 -13
  3. package/dist/components/AntAlert.vue +25 -15
  4. package/dist/components/AntCard.vue +26 -14
  5. package/dist/components/AntContent.vue +4 -4
  6. package/dist/components/AntDropdown.vue +41 -23
  7. package/dist/components/AntIcon.vue +18 -6
  8. package/dist/components/AntKeycap.vue +31 -16
  9. package/dist/components/AntListGroup.vue +13 -11
  10. package/dist/components/AntListGroupItem.vue +19 -9
  11. package/dist/components/AntModal.vue +26 -15
  12. package/dist/components/AntPagination.vue +28 -15
  13. package/dist/components/AntPopover.vue +74 -51
  14. package/dist/components/AntSkeleton.vue +8 -4
  15. package/dist/components/AntSpinner.vue +14 -6
  16. package/dist/components/AntTag.vue +25 -13
  17. package/dist/components/AntToast.vue +19 -11
  18. package/dist/components/AntToaster.vue +13 -5
  19. package/dist/components/AntTooltip.vue +78 -54
  20. package/dist/components/__stories/AntAccordion.stories.js +4 -4
  21. package/dist/components/__stories/AntAccordion.stories.mjs +50 -17
  22. package/dist/components/__stories/AntAlert.stories.mjs +18 -5
  23. package/dist/components/__stories/AntCard.stories.mjs +36 -10
  24. package/dist/components/__stories/AntContent.stories.mjs +14 -4
  25. package/dist/components/__stories/AntDropdown.stories.mjs +20 -4
  26. package/dist/components/__stories/AntIcon.stories.mjs +38 -12
  27. package/dist/components/__stories/AntKeycap.stories.mjs +35 -10
  28. package/dist/components/__stories/AntListGroup.stories.d.ts +1 -1
  29. package/dist/components/__stories/AntListGroup.stories.mjs +22 -4
  30. package/dist/components/__stories/AntListGroupItem.stories.mjs +27 -8
  31. package/dist/components/__stories/AntModal.stories.mjs +17 -4
  32. package/dist/components/__stories/AntPagination.stories.mjs +21 -6
  33. package/dist/components/__stories/AntPopover.stories.mjs +20 -4
  34. package/dist/components/__stories/AntSkeleton.stories.mjs +17 -5
  35. package/dist/components/__stories/AntSpinner.stories.mjs +33 -9
  36. package/dist/components/__stories/AntTag.stories.mjs +28 -8
  37. package/dist/components/__stories/AntToast.stories.mjs +19 -5
  38. package/dist/components/__stories/AntToaster.stories.d.ts +1 -1
  39. package/dist/components/__stories/AntToaster.stories.mjs +35 -9
  40. package/dist/components/__stories/AntTooltip.stories.js +1 -1
  41. package/dist/components/__stories/AntTooltip.stories.mjs +44 -13
  42. package/dist/components/buttons/AntActionButton.vue +38 -29
  43. package/dist/components/buttons/AntButton.vue +34 -13
  44. package/dist/components/buttons/AntCreateButton.vue +11 -4
  45. package/dist/components/buttons/AntDeleteButton.vue +11 -4
  46. package/dist/components/buttons/AntDuplicateButton.vue +11 -4
  47. package/dist/components/buttons/AntEditButton.vue +11 -4
  48. package/dist/components/buttons/AntSaveAndNewButton.vue +11 -4
  49. package/dist/components/buttons/AntSaveButton.vue +11 -4
  50. package/dist/components/buttons/__stories/AntActionButton.stories.mjs +35 -10
  51. package/dist/components/buttons/__stories/AntButton.stories.mjs +77 -23
  52. package/dist/components/buttons/__stories/AntCreateButton.stories.mjs +25 -7
  53. package/dist/components/buttons/__stories/AntDeleteButton.stories.mjs +25 -7
  54. package/dist/components/buttons/__stories/AntDuplicateButton.stories.mjs +25 -7
  55. package/dist/components/buttons/__stories/AntEditButton.stories.mjs +25 -7
  56. package/dist/components/buttons/__stories/AntSaveAndNewButton.stories.mjs +25 -7
  57. package/dist/components/buttons/__stories/AntSaveButton.stories.mjs +25 -7
  58. package/dist/components/crud/AntCrud.vue +6 -6
  59. package/dist/components/crud/AntCrudDetail.vue +8 -5
  60. package/dist/components/crud/AntCrudDetailActions.vue +14 -8
  61. package/dist/components/crud/AntCrudDetailNav.vue +21 -13
  62. package/dist/components/crud/AntCrudTableFilter.vue +29 -17
  63. package/dist/components/crud/AntCrudTableNav.vue +36 -22
  64. package/dist/components/crud/__stories/AntCrud.stories.mjs +17 -5
  65. package/dist/components/crud/__stories/AntCrudDetail.stories.mjs +11 -3
  66. package/dist/components/crud/__stories/AntCrudDetailActions.stories.mjs +10 -2
  67. package/dist/components/crud/__stories/AntCrudDetailNav.stories.mjs +11 -3
  68. package/dist/components/crud/__stories/AntCrudTableFilter.stories.mjs +17 -5
  69. package/dist/components/crud/__stories/AntCrudTableNav.stories.mjs +23 -7
  70. package/dist/components/dialogs/AntDeleteDialog.vue +13 -5
  71. package/dist/components/dialogs/AntDialog.vue +23 -13
  72. package/dist/components/dialogs/__stories/AndDeleteDialog.stories.mjs +12 -3
  73. package/dist/components/dialogs/__stories/AntDialog.stories.mjs +28 -7
  74. package/dist/components/forms/AntField.vue +18 -7
  75. package/dist/components/forms/AntFormGroup.vue +9 -5
  76. package/dist/components/forms/AntFormGroupLabel.vue +1 -1
  77. package/dist/components/forms/__stories/AntField.stories.mjs +37 -9
  78. package/dist/components/forms/__stories/AntFormGroup.stories.mjs +20 -5
  79. package/dist/components/forms/__stories/AntFormGroupLabel.stories.mjs +11 -3
  80. package/dist/components/index.d.ts +1 -1
  81. package/dist/components/inputs/AntCheckbox.vue +61 -36
  82. package/dist/components/inputs/AntCheckboxGroup.vue +40 -15
  83. package/dist/components/inputs/AntDateInput.vue +35 -12
  84. package/dist/components/inputs/AntNumberInput.vue +33 -12
  85. package/dist/components/inputs/AntPasswordInput.vue +32 -11
  86. package/dist/components/inputs/AntRadio.vue +57 -34
  87. package/dist/components/inputs/AntRadioGroup.vue +60 -35
  88. package/dist/components/inputs/AntRangeSlider.vue +31 -12
  89. package/dist/components/inputs/AntSearch.vue +19 -7
  90. package/dist/components/inputs/AntSelect.vue +107 -83
  91. package/dist/components/inputs/AntSwitch.vue +36 -18
  92. package/dist/components/inputs/AntSwitcher.vue +30 -15
  93. package/dist/components/inputs/AntTagInput.vue +91 -61
  94. package/dist/components/inputs/AntTextInput.vue +31 -11
  95. package/dist/components/inputs/AntTextarea.vue +53 -25
  96. package/dist/components/inputs/AntUnitInput.vue +33 -12
  97. package/dist/components/inputs/Elements/AntBaseInput.vue +47 -18
  98. package/dist/components/inputs/Elements/AntInputDescription.vue +16 -8
  99. package/dist/components/inputs/Elements/AntInputLabel.vue +13 -5
  100. package/dist/components/inputs/Elements/AntInputLimiter.vue +13 -5
  101. package/dist/components/inputs/Elements/AntSelectMenu.vue +65 -41
  102. package/dist/components/inputs/Elements/__stories/AntBaseInput.stories.mjs +104 -27
  103. package/dist/components/inputs/Elements/__stories/AntInputDescription.stories.mjs +33 -9
  104. package/dist/components/inputs/Elements/__stories/AntInputLabel.stories.mjs +34 -9
  105. package/dist/components/inputs/Elements/__stories/AntInputLimiter.stories.mjs +33 -9
  106. package/dist/components/inputs/Elements/index.d.ts +1 -1
  107. package/dist/components/inputs/__stories/AntCheckbox.stories.mjs +34 -9
  108. package/dist/components/inputs/__stories/AntCheckboxGroup.stories.mjs +45 -21
  109. package/dist/components/inputs/__stories/AntDateInput.stories.mjs +52 -14
  110. package/dist/components/inputs/__stories/AntNumberInput.stories.mjs +66 -17
  111. package/dist/components/inputs/__stories/AntPasswordInput.stories.mjs +51 -13
  112. package/dist/components/inputs/__stories/AntRadioGroup.stories.mjs +45 -12
  113. package/dist/components/inputs/__stories/AntRangeSlider.stories.mjs +16 -5
  114. package/dist/components/inputs/__stories/AntSearch.stories.mjs +41 -10
  115. package/dist/components/inputs/__stories/AntSelect.stories.mjs +59 -15
  116. package/dist/components/inputs/__stories/AntSwitch.stories.js +126 -102
  117. package/dist/components/inputs/__stories/AntSwitch.stories.mjs +162 -112
  118. package/dist/components/inputs/__stories/AntSwitcher.stories.mjs +38 -10
  119. package/dist/components/inputs/__stories/AntTagInput.stories.mjs +46 -12
  120. package/dist/components/inputs/__stories/AntTextInput.stories.mjs +59 -16
  121. package/dist/components/inputs/__stories/AntTextarea.stories.mjs +47 -13
  122. package/dist/components/inputs/__stories/AntUnitInput.stories.mjs +46 -12
  123. package/dist/components/layouts/AntNavLeftLayout.vue +12 -6
  124. package/dist/components/layouts/__stories/AntNavLeftLayout.stories.mjs +10 -2
  125. package/dist/components/navbar/AntNavbar.vue +7 -3
  126. package/dist/components/navbar/AntNavbarItem.vue +12 -6
  127. package/dist/components/navbar/__stories/AntNavbar.stories.mjs +59 -37
  128. package/dist/components/table/AntCollapsibleTableRowContent.vue +7 -5
  129. package/dist/components/table/AntTable.vue +227 -165
  130. package/dist/components/table/AntTableSkeleton.vue +126 -0
  131. package/dist/components/table/AntTableSortButton.vue +22 -13
  132. package/dist/components/table/AntTd.vue +21 -17
  133. package/dist/components/table/AntTh.vue +19 -12
  134. package/dist/components/table/__stories/AntTable.stories.js +132 -14
  135. package/dist/components/table/__stories/AntTable.stories.mjs +253 -31
  136. package/dist/components/table/__types/index.d.ts +0 -1
  137. package/dist/components/table/__types/index.js +0 -11
  138. package/dist/components/table/__types/index.mjs +0 -1
  139. package/dist/components/tabs/AntTabItem.vue +20 -8
  140. package/dist/components/tabs/AntTabs.vue +35 -21
  141. package/dist/components/tabs/__stories/AntTabItem.stories.mjs +23 -7
  142. package/dist/components/tabs/__stories/AntTabs.stories.mjs +45 -13
  143. package/dist/components/transitions/AntTransitionCollapseHeight.vue +1 -1
  144. package/dist/composables/useToaster.mjs +25 -7
  145. package/dist/index.css +1 -0
  146. package/dist/utils.mjs +3 -1
  147. package/package.json +23 -16
  148. package/dist/tailwind.config.d.ts +0 -3
  149. package/dist/tailwind.config.js +0 -198
  150. package/dist/tailwind.config.mjs +0 -189
@@ -1,17 +1,31 @@
1
1
  import AntTooltip from "../AntTooltip.vue";
2
- import { InputState } from "../../enums/index.mjs";
2
+ import {
3
+ InputState
4
+ } from "../../enums/index.mjs";
3
5
  import AntButton from "../buttons/AntButton.vue";
4
- import { onMounted, ref } from "vue";
5
- import { expect, userEvent, waitFor, within } from "@storybook/test";
6
+ import {
7
+ onMounted,
8
+ ref
9
+ } from "vue";
10
+ import {
11
+ expect,
12
+ userEvent,
13
+ waitFor,
14
+ within
15
+ } from "@storybook/test";
6
16
  const meta = {
7
17
  title: "Components/Tooltip",
8
18
  component: AntTooltip,
9
19
  parameters: {
10
- controls: { sort: "requiredFirst" }
20
+ controls: {
21
+ sort: "requiredFirst"
22
+ }
11
23
  },
12
24
  argTypes: {
13
25
  state: {
14
- control: { type: "select" },
26
+ control: {
27
+ type: "select"
28
+ },
15
29
  options: Object.values(InputState)
16
30
  }
17
31
  }
@@ -19,7 +33,10 @@ const meta = {
19
33
  export default meta;
20
34
  export const Docs = {
21
35
  render: (args) => ({
22
- components: { AntTooltip, AntButton },
36
+ components: {
37
+ AntTooltip,
38
+ AntButton
39
+ },
23
40
  setup() {
24
41
  const scrollContainer = ref(void 0);
25
42
  onMounted(() => {
@@ -28,11 +45,14 @@ export const Docs = {
28
45
  scrollContainer.value.scrollTop = (scrollContainer.value.scrollHeight - scrollContainer.value.clientHeight) / 2;
29
46
  }
30
47
  });
31
- return { args, scrollContainer };
48
+ return {
49
+ args,
50
+ scrollContainer
51
+ };
32
52
  },
33
53
  template: `
34
54
  <div ref="scrollContainer" class="dashed h-[50vh] w-[50vw] overflow-scroll">
35
- <div class="flex flex-grow justify-center items-center h-screen w-[1000px]">
55
+ <div class="flex grow justify-center items-center h-screen w-[1000px]">
36
56
  <AntTooltip v-bind="args">
37
57
  <AntButton>Hover me</AntButton>
38
58
 
@@ -46,7 +66,10 @@ export const Docs = {
46
66
  </div>
47
67
  `
48
68
  }),
49
- play: async ({ canvasElement, step }) => {
69
+ play: async ({
70
+ canvasElement,
71
+ step
72
+ }) => {
50
73
  const canvas = within(canvasElement);
51
74
  const target = canvas.getByText("Hover me");
52
75
  function queryTooltip() {
@@ -54,21 +77,29 @@ export const Docs = {
54
77
  }
55
78
  await step("Hover over the target and expect showing the tooltip", async () => {
56
79
  await userEvent.hover(target);
57
- await waitFor(() => expect(queryTooltip()).toBeInTheDocument(), { timeout: 600 });
80
+ await waitFor(() => expect(queryTooltip()).toBeInTheDocument(), {
81
+ timeout: 600
82
+ });
58
83
  });
59
84
  await step("Leave hover state and expect not showing the tooltip anymore", async () => {
60
85
  await userEvent.unhover(target);
61
- await waitFor(() => expect(queryTooltip()).not.toBeInTheDocument(), { timeout: 600 });
86
+ await waitFor(() => expect(queryTooltip()).not.toBeInTheDocument(), {
87
+ timeout: 600
88
+ });
62
89
  });
63
90
  await step("Hover over the target, wait until the tooltip is visible, click the target and expect not showing the tooltip", async () => {
64
91
  await userEvent.hover(target);
65
- await waitFor(() => expect(queryTooltip()).toBeInTheDocument(), { timeout: 600 });
92
+ await waitFor(() => expect(queryTooltip()).toBeInTheDocument(), {
93
+ timeout: 600
94
+ });
66
95
  await userEvent.click(target);
67
96
  await expect(queryTooltip()).not.toBeInTheDocument();
68
97
  });
69
98
  await step("Hover over the target, click it while delay and expect not showing the tooltip", async () => {
70
99
  await userEvent.hover(target);
71
- await waitFor(() => expect(queryTooltip()).not.toBeInTheDocument(), { timeout: 200 });
100
+ await waitFor(() => expect(queryTooltip()).not.toBeInTheDocument(), {
101
+ timeout: 200
102
+ });
72
103
  await userEvent.click(target);
73
104
  await expect(queryTooltip()).not.toBeInTheDocument();
74
105
  });
@@ -3,36 +3,45 @@
3
3
  * This button is used for everything what is the primary
4
4
  * action like save, confirm, create, etc.
5
5
  */
6
- import {Position, State, InputState, Size, Grouped} from '../../enums';
6
+ import {
7
+ Position, State, InputState, Size, Grouped,
8
+ } from '../../enums';
7
9
  import AntButton from './AntButton.vue';
8
- import type {IconDefinition} from '@fortawesome/free-solid-svg-icons';
9
- import {computed, useSlots} from 'vue';
10
- import {hasSlotContent} from '../../utils';
10
+ import type {
11
+ IconDefinition,
12
+ } from '@fortawesome/free-solid-svg-icons';
13
+ import {
14
+ computed, useSlots,
15
+ } from 'vue';
16
+ import {
17
+ hasSlotContent,
18
+ } from '../../utils';
11
19
 
12
- defineEmits(['click', 'blur']);
13
- const props = withDefaults(
14
- defineProps<{
15
- iconLeft?: IconDefinition;
16
- iconRight?: IconDefinition;
17
- size?: Size;
18
- disabled?: boolean;
19
- grouped?: Grouped;
20
- state?: State;
21
- skeleton?: boolean;
22
- expanded?: boolean;
23
- filled?: boolean;
24
- hasPermission?: boolean;
25
- tooltipPosition?: Position;
26
- tooltipState?: InputState;
27
- tooltipDelay?: number;
28
- submit?: boolean;
29
- }>(), {
30
- state: State.primary,
31
- hasPermission: true,
32
- filled: true,
33
- submit: false
34
- }
35
- );
20
+ defineEmits([
21
+ 'click',
22
+ 'blur',
23
+ ]);
24
+ const props = withDefaults(defineProps<{
25
+ iconLeft?: IconDefinition;
26
+ iconRight?: IconDefinition;
27
+ size?: Size;
28
+ disabled?: boolean;
29
+ grouped?: Grouped;
30
+ state?: State;
31
+ skeleton?: boolean;
32
+ expanded?: boolean;
33
+ filled?: boolean;
34
+ hasPermission?: boolean;
35
+ tooltipPosition?: Position;
36
+ tooltipState?: InputState;
37
+ tooltipDelay?: number;
38
+ submit?: boolean;
39
+ }>(), {
40
+ state: State.primary,
41
+ hasPermission: true,
42
+ filled: true,
43
+ submit: false,
44
+ });
36
45
  const slots = useSlots();
37
46
  const hasTooltip = computed(() => !props.skeleton && !props.disabled && props.hasPermission && hasSlotContent(slots['tooltipContent']));
38
47
  const hasPermissionTooltip = computed(() => !props.skeleton && !props.disabled && !props.hasPermission && hasSlotContent(slots['invalidPermissionTooltipContent']));
@@ -57,7 +66,7 @@ const hasPermissionTooltip = computed(() => !props.skeleton && !props.disabled &
57
66
  @click="$emit('click')"
58
67
  @blur="$emit('blur')"
59
68
  >
60
- <slot/>
69
+ <slot />
61
70
 
62
71
  <template #tooltip-content>
63
72
  <slot
@@ -1,19 +1,40 @@
1
1
  <script lang="ts" setup>
2
- import {type IconDefinition} from '@fortawesome/free-solid-svg-icons';
3
- import {computed, onMounted} from 'vue';
4
- import {type RouteLocationRaw} from 'vue-router';
2
+ import {
3
+ type IconDefinition,
4
+ } from '@fortawesome/free-solid-svg-icons';
5
+ import {
6
+ computed, onMounted,
7
+ } from 'vue';
8
+ import {
9
+ type RouteLocationRaw,
10
+ } from 'vue-router';
5
11
  import AntSkeleton from '../AntSkeleton.vue';
6
12
  import AntSpinner from '../AntSpinner.vue';
7
- import {Grouped} from '../../enums/Grouped.enum';
8
- import {Size} from '../../enums/Size.enum';
9
- import {handleEnumValidation} from '../../handler';
10
- import {State, InputState, Position} from '../../enums';
11
- import {ButtonType} from './__types';
13
+ import {
14
+ Grouped,
15
+ } from '../../enums/Grouped.enum';
16
+ import {
17
+ Size,
18
+ } from '../../enums/Size.enum';
19
+ import {
20
+ handleEnumValidation,
21
+ } from '../../handler';
22
+ import {
23
+ State, InputState, Position,
24
+ } from '../../enums';
25
+ import {
26
+ ButtonType,
27
+ } from './__types';
12
28
  import AntIcon from '../AntIcon.vue';
13
29
  import AntTooltip from '../AntTooltip.vue';
14
- import {IconSize} from '../__types/AntIcon.types';
30
+ import {
31
+ IconSize,
32
+ } from '../__types/AntIcon.types';
15
33
 
16
- defineEmits(['click', 'blur']);
34
+ defineEmits([
35
+ 'click',
36
+ 'blur',
37
+ ]);
17
38
 
18
39
  const props = withDefaults(defineProps<{
19
40
  filled?: boolean;
@@ -49,7 +70,7 @@ const props = withDefaults(defineProps<{
49
70
  noFocus: false,
50
71
  tooltipPosition: Position.bottom,
51
72
  tooltipState: InputState.base,
52
- tooltipDelay: 800
73
+ tooltipDelay: 800,
53
74
  });
54
75
 
55
76
  const hasInputState = computed(() => props.skeleton || props.readonly || props.disabled);
@@ -119,7 +140,7 @@ const classes = computed(() => {
119
140
  'focus:ring-2': !props.readonly && props.size === Size.sm || props.size === Size.xs || props.size === Size.xs2,
120
141
  'focus:ring-4': !props.readonly && props.size === Size.md || props.size === Size.lg,
121
142
  'w-full': props.expanded,
122
- 'invisible': props.skeleton,
143
+ invisible: props.skeleton,
123
144
  'outline outline-1 outline-offset-[-1px]': props.outlined,
124
145
  ...groupedClassList.value,
125
146
  [variants[props.state]]: true,
@@ -246,7 +267,7 @@ onMounted(() => {
246
267
  </component>
247
268
 
248
269
  <template #content>
249
- <slot name="tooltip-content"/>
270
+ <slot name="tooltip-content" />
250
271
  </template>
251
272
  </AntTooltip>
252
273
  </div>
@@ -1,9 +1,16 @@
1
1
  <script lang="ts" setup>
2
2
  import AntActionButton from './AntActionButton.vue';
3
- import {Position, Size, Grouped, State} from '../../enums';
4
- import {faPlus} from '@fortawesome/free-solid-svg-icons';
3
+ import {
4
+ Position, Size, Grouped, State,
5
+ } from '../../enums';
6
+ import {
7
+ faPlus,
8
+ } from '@fortawesome/free-solid-svg-icons';
5
9
 
6
- defineEmits(['click', 'blur']);
10
+ defineEmits([
11
+ 'click',
12
+ 'blur',
13
+ ]);
7
14
  withDefaults(defineProps<{
8
15
  iconVariant?: boolean;
9
16
  size?: Size;
@@ -15,7 +22,7 @@ withDefaults(defineProps<{
15
22
  tooltipPosition?: Position;
16
23
  }>(), {
17
24
  iconVariant: false,
18
- canCreate: true
25
+ canCreate: true,
19
26
  });
20
27
  </script>
21
28
 
@@ -1,9 +1,16 @@
1
1
  <script lang="ts" setup>
2
2
  import AntActionButton from './AntActionButton.vue';
3
- import {Position, Size, Grouped, State} from '../../enums';
4
- import {faTrash} from '@fortawesome/free-solid-svg-icons';
3
+ import {
4
+ Position, Size, Grouped, State,
5
+ } from '../../enums';
6
+ import {
7
+ faTrash,
8
+ } from '@fortawesome/free-solid-svg-icons';
5
9
 
6
- defineEmits(['click', 'blur']);
10
+ defineEmits([
11
+ 'click',
12
+ 'blur',
13
+ ]);
7
14
  withDefaults(defineProps<{
8
15
  iconVariant?: boolean;
9
16
  size?: Size;
@@ -15,7 +22,7 @@ withDefaults(defineProps<{
15
22
  tooltipPosition?: Position;
16
23
  }>(), {
17
24
  iconVariant: false,
18
- canDelete: true
25
+ canDelete: true,
19
26
  });
20
27
  </script>
21
28
 
@@ -1,9 +1,16 @@
1
1
  <script lang="ts" setup>
2
2
  import AntActionButton from './AntActionButton.vue';
3
- import {Position, Size, Grouped, State} from '../../enums';
4
- import {faCopy} from '@fortawesome/free-solid-svg-icons';
3
+ import {
4
+ Position, Size, Grouped, State,
5
+ } from '../../enums';
6
+ import {
7
+ faCopy,
8
+ } from '@fortawesome/free-solid-svg-icons';
5
9
 
6
- defineEmits(['click', 'blur']);
10
+ defineEmits([
11
+ 'click',
12
+ 'blur',
13
+ ]);
7
14
  withDefaults(defineProps<{
8
15
  iconVariant?: boolean;
9
16
  size?: Size;
@@ -15,7 +22,7 @@ withDefaults(defineProps<{
15
22
  tooltipPosition?: Position;
16
23
  }>(), {
17
24
  iconVariant: false,
18
- canDuplicate: true
25
+ canDuplicate: true,
19
26
  });
20
27
  </script>
21
28
 
@@ -1,9 +1,16 @@
1
1
  <script lang="ts" setup>
2
2
  import AntActionButton from './AntActionButton.vue';
3
- import {Position, Size, Grouped, State} from '../../enums';
4
- import {faPencil} from '@fortawesome/free-solid-svg-icons';
3
+ import {
4
+ Position, Size, Grouped, State,
5
+ } from '../../enums';
6
+ import {
7
+ faPencil,
8
+ } from '@fortawesome/free-solid-svg-icons';
5
9
 
6
- defineEmits(['click', 'blur']);
10
+ defineEmits([
11
+ 'click',
12
+ 'blur',
13
+ ]);
7
14
  withDefaults(defineProps<{
8
15
  iconVariant?: boolean;
9
16
  size?: Size;
@@ -15,7 +22,7 @@ withDefaults(defineProps<{
15
22
  tooltipPosition?: Position;
16
23
  }>(), {
17
24
  iconVariant: false,
18
- canEdit: true
25
+ canEdit: true,
19
26
  });
20
27
  </script>
21
28
 
@@ -1,9 +1,16 @@
1
1
  <script lang="ts" setup>
2
2
  import AntActionButton from './AntActionButton.vue';
3
- import {Position, Size, Grouped, State} from '../../enums';
4
- import {faFloppyDisk, faPlus} from '@fortawesome/free-solid-svg-icons';
3
+ import {
4
+ Position, Size, Grouped, State,
5
+ } from '../../enums';
6
+ import {
7
+ faFloppyDisk, faPlus,
8
+ } from '@fortawesome/free-solid-svg-icons';
5
9
 
6
- defineEmits(['click', 'blur']);
10
+ defineEmits([
11
+ 'click',
12
+ 'blur',
13
+ ]);
7
14
  withDefaults(defineProps<{
8
15
  iconVariant?: boolean;
9
16
  size?: Size;
@@ -15,7 +22,7 @@ withDefaults(defineProps<{
15
22
  tooltipPosition?: Position;
16
23
  }>(), {
17
24
  iconVariant: false,
18
- canSave: true
25
+ canSave: true,
19
26
  });
20
27
  </script>
21
28
 
@@ -1,9 +1,16 @@
1
1
  <script lang="ts" setup>
2
2
  import AntActionButton from './AntActionButton.vue';
3
- import {Position, Size, Grouped, State} from '../../enums';
4
- import {faFloppyDisk} from '@fortawesome/free-solid-svg-icons';
3
+ import {
4
+ Position, Size, Grouped, State,
5
+ } from '../../enums';
6
+ import {
7
+ faFloppyDisk,
8
+ } from '@fortawesome/free-solid-svg-icons';
5
9
 
6
- defineEmits(['click', 'blur']);
10
+ defineEmits([
11
+ 'click',
12
+ 'blur',
13
+ ]);
7
14
  withDefaults(defineProps<{
8
15
  iconVariant?: boolean;
9
16
  size?: Size;
@@ -15,7 +22,7 @@ withDefaults(defineProps<{
15
22
  tooltipPosition?: Position;
16
23
  }>(), {
17
24
  iconVariant: false,
18
- canSave: true
25
+ canSave: true,
19
26
  });
20
27
  </script>
21
28
 
@@ -1,29 +1,50 @@
1
1
  import AntActionButton from "../AntActionButton.vue";
2
- import { Grouped as _Grouped } from "../../../enums/Grouped.enum.mjs";
3
- import { State, InputState, Position, Size } from "../../../enums/index.mjs";
2
+ import {
3
+ Grouped as _Grouped
4
+ } from "../../../enums/Grouped.enum.mjs";
5
+ import {
6
+ State,
7
+ InputState,
8
+ Position,
9
+ Size
10
+ } from "../../../enums/index.mjs";
4
11
  const meta = {
5
12
  title: "Components/Buttons/Action Button",
6
13
  component: AntActionButton,
7
- parameters: { controls: { sort: "requiredFirst" } },
14
+ parameters: {
15
+ controls: {
16
+ sort: "requiredFirst"
17
+ }
18
+ },
8
19
  argTypes: {
9
20
  state: {
10
- control: { type: "select" },
21
+ control: {
22
+ type: "select"
23
+ },
11
24
  options: Object.values(State)
12
25
  },
13
26
  size: {
14
- control: { type: "select" },
27
+ control: {
28
+ type: "select"
29
+ },
15
30
  options: Object.values(Size)
16
31
  },
17
32
  grouped: {
18
- control: { type: "select" },
33
+ control: {
34
+ type: "select"
35
+ },
19
36
  options: Object.values(_Grouped)
20
37
  },
21
38
  tooltipPosition: {
22
- control: { type: "select" },
39
+ control: {
40
+ type: "select"
41
+ },
23
42
  options: Object.values(Position)
24
43
  },
25
44
  tooltipState: {
26
- control: { type: "select" },
45
+ control: {
46
+ type: "select"
47
+ },
27
48
  options: Object.values(InputState)
28
49
  },
29
50
  submit: {
@@ -34,9 +55,13 @@ const meta = {
34
55
  export default meta;
35
56
  export const Docs = {
36
57
  render: (args) => ({
37
- components: { AntActionButton },
58
+ components: {
59
+ AntActionButton
60
+ },
38
61
  setup() {
39
- return { args };
62
+ return {
63
+ args
64
+ };
40
65
  },
41
66
  template: `
42
67
  <AntActionButton v-bind="args">