@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,20 +1,27 @@
1
1
  <script lang="ts" setup>
2
- import {ref, useSlots, watch} from 'vue';
3
- import {faXmark} from '@fortawesome/free-solid-svg-icons';
2
+ import {
3
+ ref, useSlots, watch,
4
+ } from 'vue';
5
+ import {
6
+ faXmark,
7
+ } from '@fortawesome/free-solid-svg-icons';
4
8
  import AntButton from './buttons/AntButton.vue';
5
- import AntSkeleton from "./AntSkeleton.vue";
9
+ import AntSkeleton from './AntSkeleton.vue';
6
10
 
7
- const emit = defineEmits(['update:open', 'close']);
11
+ const emit = defineEmits([
12
+ 'update:open',
13
+ 'close',
14
+ ]);
8
15
  const props = withDefaults(defineProps<{
9
- title: string,
10
- open: boolean,
11
- fullscreen?: boolean,
12
- padding?: boolean
13
- skeleton?: boolean
16
+ title: string;
17
+ open: boolean;
18
+ fullscreen?: boolean;
19
+ padding?: boolean;
20
+ skeleton?: boolean;
14
21
  }>(), {
15
22
  fullscreen: false,
16
23
  padding: false,
17
- skeleton: false
24
+ skeleton: false,
18
25
  });
19
26
  const openModal = ref(props.open);
20
27
  const openBackground = ref(props.open);
@@ -22,7 +29,7 @@ const openBackground = ref(props.open);
22
29
  watch(() => props.open, (val) => {
23
30
  function onKeydown(e: KeyboardEvent) {
24
31
  if (e.key === 'Escape') {
25
- emit('update:open', false);
32
+ closeModal();
26
33
  }
27
34
  }
28
35
 
@@ -48,7 +55,7 @@ function closeModal() {
48
55
  <div
49
56
  v-if="openBackground"
50
57
  class="absolute inset-0 flex items-center justify-center z-[80] cursor-pointer overflow-hidden"
51
- :class="{'bg-black/50 backdrop-blur-sm': !fullscreen}"
58
+ :class="{'bg-black/50 backdrop-blur-xs': !fullscreen}"
52
59
  @click.self="closeModal"
53
60
  >
54
61
  <Transition :name="!fullscreen ? 'bounce' : 'bounce-slow'">
@@ -63,7 +70,11 @@ function closeModal() {
63
70
  <slot name="title">
64
71
  <div class="relative text-for-white-bg-font text-lg font-medium">
65
72
  {{ title }}
66
- <AntSkeleton v-if="skeleton" absolute rounded/>
73
+ <AntSkeleton
74
+ v-if="skeleton"
75
+ absolute
76
+ rounded
77
+ />
67
78
  </div>
68
79
  </slot>
69
80
 
@@ -78,14 +89,14 @@ function closeModal() {
78
89
  class="bg-white text-for-white-bg-font grow overflow-y-auto"
79
90
  :class="{'p-2': padding}"
80
91
  >
81
- <slot/>
92
+ <slot />
82
93
  </div>
83
94
 
84
95
  <div
85
96
  v-if="useSlots()['footer'] || false"
86
97
  class="bg-white p-2 text-for-white-bg-font"
87
98
  >
88
- <slot name="footer"/>
99
+ <slot name="footer" />
89
100
  </div>
90
101
  </div>
91
102
  </Transition>
@@ -4,31 +4,42 @@
4
4
  * TODO:: test me in storybook through vue router
5
5
  * TODO:: Fix ts errors
6
6
  */
7
- import {useRouter, useRoute} from 'vue-router';
8
- import {computed} from 'vue';
7
+ import {
8
+ useRouter, useRoute,
9
+ } from 'vue-router';
10
+ import {
11
+ computed,
12
+ } from 'vue';
9
13
  import AntButton from './buttons/AntButton.vue';
10
- import {faChevronRight, faChevronLeft} from '@fortawesome/free-solid-svg-icons';
14
+ import {
15
+ faChevronRight, faChevronLeft,
16
+ } from '@fortawesome/free-solid-svg-icons';
11
17
  import AntSkeleton from './AntSkeleton.vue';
12
- import {State, Grouped} from '../enums';
13
-
14
- const emit = defineEmits(['update:skeleton', 'input']);
18
+ import {
19
+ State, Grouped,
20
+ } from '../enums';
21
+
22
+ const emit = defineEmits([
23
+ 'update:skeleton',
24
+ 'input',
25
+ ]);
15
26
  const props = withDefaults(
16
27
  defineProps<{
17
- pages: number,
18
- pageQuery?: string,
19
- skeleton?: boolean,
28
+ pages: number;
29
+ pageQuery?: string;
30
+ skeleton?: boolean;
20
31
 
21
32
  /**
22
33
  * Light version does not show the very previous and next page button.
23
34
  * This makes the pagination smaller in space.
24
35
  */
25
- lightVersion?: boolean
36
+ lightVersion?: boolean;
26
37
  }>(),
27
38
  {
28
39
  pageQuery: 'p',
29
40
  skeleton: false,
30
- lightVersion: false
31
- }
41
+ lightVersion: false,
42
+ },
32
43
  );
33
44
  const router = useRouter();
34
45
  const route = useRoute();
@@ -43,18 +54,20 @@ const page = computed({
43
54
  return _page;
44
55
  },
45
56
  set(val) {
46
- const query = {...route.query};
57
+ const query = {
58
+ ...route.query,
59
+ };
47
60
  query[props.pageQuery] = val;
48
61
 
49
62
  (async () => {
50
63
  await router.push({
51
64
  ...route,
52
- query
65
+ query,
53
66
  });
54
67
 
55
68
  emit('input', val);
56
69
  })();
57
- }
70
+ },
58
71
  });
59
72
 
60
73
  /**
@@ -1,30 +1,46 @@
1
1
  <script lang="ts" setup>
2
- import {computed, ref} from 'vue';
3
- import {Position} from '../enums/Position.enum';
4
- import {classesToObjectSyntax} from '../utils';
5
- import {arrow, autoUpdate, flip, offset, useFloating, shift, limitShift} from "@floating-ui/vue";
6
- import {vOnClickOutside} from '@vueuse/components';
7
- import {onKeyStroke} from "@vueuse/core";
2
+ import {
3
+ computed, ref,
4
+ } from 'vue';
5
+ import {
6
+ Position,
7
+ } from '../enums/Position.enum';
8
+ import {
9
+ classesToObjectSyntax,
10
+ } from '../utils';
11
+ import {
12
+ arrow, autoUpdate, flip, offset, useFloating, shift, limitShift,
13
+ } from '@floating-ui/vue';
14
+ import {
15
+ vOnClickOutside,
16
+ } from '@vueuse/components';
17
+ import {
18
+ onKeyStroke,
19
+ } from '@vueuse/core';
8
20
 
9
21
  const props = withDefaults(defineProps<{
10
- showPopover: boolean,
11
- title?: string,
12
- isClickable?: boolean,
13
- popoverClasses?: string | Record<string, boolean>
22
+ showPopover: boolean;
23
+ title?: string;
24
+ isClickable?: boolean;
25
+ popoverClasses?: string | Record<string, boolean>;
14
26
  }>(), {
15
27
  isClickable: true,
16
28
  showPopover: false,
17
29
  preferredPosition: Position.top,
18
- popoverClasses: ''
30
+ popoverClasses: '',
19
31
  });
20
32
 
21
- const emit = defineEmits(['update:showPopover']);
33
+ const emit = defineEmits([
34
+ 'update:showPopover',
35
+ ]);
22
36
 
23
- const reference = ref<HTMLElement | null>(null)
24
- const floating = ref<HTMLElement | null>(null)
37
+ const reference = ref<HTMLElement | null>(null);
38
+ const floating = ref<HTMLElement | null>(null);
25
39
  const floatingArrow = ref<HTMLElement | null>(null);
26
40
 
27
- const {floatingStyles, middlewareData, placement} = useFloating(reference, floating, {
41
+ const {
42
+ floatingStyles, middlewareData, placement,
43
+ } = useFloating(reference, floating, {
28
44
  transform: false,
29
45
  placement: 'right',
30
46
  whileElementsMounted: autoUpdate,
@@ -34,40 +50,46 @@ const {floatingStyles, middlewareData, placement} = useFloating(reference, float
34
50
  limiter: limitShift({
35
51
  offset: {
36
52
  mainAxis: 62,
37
- }
53
+ },
38
54
  }),
39
55
  }),
40
56
  flip({
41
- fallbackPlacements: ['top', 'bottom', 'left'],
57
+ fallbackPlacements: [
58
+ 'top',
59
+ 'bottom',
60
+ 'left',
61
+ ],
42
62
  }),
43
- arrow({element: floatingArrow})
44
- ]
63
+ arrow({
64
+ element: floatingArrow,
65
+ }),
66
+ ],
45
67
  });
46
68
 
47
69
  const side = computed(() => placement.value.split('-')[0]);
48
70
  const staticSide = computed(() => {
49
71
  return {
50
- top: "bottom",
51
- right: "left",
52
- bottom: "top",
53
- left: "right"
54
- }[side.value] as string
55
- })
72
+ top: 'bottom',
73
+ right: 'left',
74
+ bottom: 'top',
75
+ left: 'right',
76
+ }[side.value] as string;
77
+ });
56
78
  const arrowTransform = computed(() => {
57
79
  if (placement.value === 'bottom') {
58
- return 'rotate(0deg)'
80
+ return 'rotate(0deg)';
59
81
  } else if (placement.value === 'top') {
60
- return 'rotate(180deg)'
82
+ return 'rotate(180deg)';
61
83
  } else if (placement.value === 'left') {
62
- return 'rotate(90deg)'
84
+ return 'rotate(90deg)';
63
85
  } else {
64
- return 'rotate(270deg)'
86
+ return 'rotate(270deg)';
65
87
  }
66
88
  });
67
89
 
68
90
  const _popoverClasses = computed(() => ({
69
91
  'z-[90] min-w-[10rem]': true,
70
- ...classesToObjectSyntax(props.popoverClasses)
92
+ ...classesToObjectSyntax(props.popoverClasses),
71
93
  }));
72
94
  const itemContainerClasses = computed(() => ({
73
95
  'relative flex items-center justify-center': true,
@@ -85,30 +107,31 @@ const onClickOutside = [
85
107
  emit('update:showPopover', false);
86
108
  },
87
109
  {
88
- ignore: [floating]
89
- }
90
- ]
110
+ ignore: [
111
+ floating,
112
+ ],
113
+ },
114
+ ];
91
115
  </script>
92
116
 
93
117
  <template>
94
118
  <div class="relative inline-flex justify-center items-end">
95
119
  <div
96
- v-on-click-outside="onClickOutside"
97
120
  ref="reference"
121
+ v-on-click-outside="onClickOutside"
98
122
  >
99
- <slot/>
123
+ <slot />
100
124
  </div>
101
125
 
102
126
  <Transition name="bounce">
103
127
  <template v-if="showPopover">
104
128
  <teleport to="body">
105
129
  <div
106
- :class="_popoverClasses"
107
130
  ref="floating"
131
+ :class="_popoverClasses"
108
132
  :style="floatingStyles"
109
133
  >
110
134
  <div class="shadow-lg border-base-300 rounded-md text-sm relative inline-flex flex-col">
111
-
112
135
  <div
113
136
  class="border-base-300 border-b p-2 bg-base-100 rounded-t-md border-t border-l border-r text-base-100-font font-semibold"
114
137
  >
@@ -120,26 +143,26 @@ const onClickOutside = [
120
143
  <div
121
144
  class="p-2 rounded-b-md text-for-white-bg-font border-base-300 border-l border-b border-r bg-white"
122
145
  >
123
- <slot name="content"/>
146
+ <slot name="content" />
124
147
  </div>
125
148
  </div>
126
149
 
127
150
  <div
128
- class="flex items-center justify-center"
129
151
  ref="floatingArrow"
152
+ class="flex items-center justify-center"
130
153
  :style="{
131
- position: 'absolute',
132
- left:
133
- middlewareData.arrow?.x != null
134
- ? `${middlewareData.arrow.x}px`
135
- : '',
136
- top:
137
- middlewareData.arrow?.y != null
138
- ? `${middlewareData.arrow.y}px`
139
- : '',
140
- [staticSide]: '-2.5px',
141
- transform: arrowTransform
142
- }"
154
+ position: 'absolute',
155
+ left:
156
+ middlewareData.arrow?.x != null
157
+ ? `${middlewareData.arrow.x}px`
158
+ : '',
159
+ top:
160
+ middlewareData.arrow?.y != null
161
+ ? `${middlewareData.arrow.y}px`
162
+ : '',
163
+ [staticSide]: '-2.5px',
164
+ transform: arrowTransform
165
+ }"
143
166
  >
144
167
  <div
145
168
  :class="itemContainerClasses"
@@ -1,6 +1,10 @@
1
1
  <script lang="ts" setup>
2
- import {Grouped} from '../enums/Grouped.enum';
3
- import {computed} from 'vue';
2
+ import {
3
+ Grouped,
4
+ } from '../enums/Grouped.enum';
5
+ import {
6
+ computed,
7
+ } from 'vue';
4
8
 
5
9
  const props = withDefaults(defineProps<{
6
10
  grouped?: Grouped;
@@ -13,7 +17,7 @@ const props = withDefaults(defineProps<{
13
17
  rounded: false,
14
18
  roundedFull: false,
15
19
  absolute: false,
16
- minShowTime: 5000
20
+ minShowTime: 5000,
17
21
  });
18
22
 
19
23
  const groupedClassList = computed(() => ({
@@ -26,7 +30,7 @@ const classList = computed(() => ({
26
30
  'absolute inset-0 w-full h-full z-40': props.absolute,
27
31
  'rounded-md': props.rounded && props.grouped === Grouped.none,
28
32
  'rounded-full': props.roundedFull && props.grouped === Grouped.none,
29
- ...groupedClassList.value
33
+ ...groupedClassList.value,
30
34
  }));
31
35
  </script>
32
36
 
@@ -1,17 +1,25 @@
1
1
  <script lang="ts" setup>
2
- import {computed, onMounted} from 'vue';
3
- import {AntSpinnerSize} from './__types/AntSpinner.types';
4
- import {handleEnumValidation} from '../handler';
5
- import {State} from '../enums/State.enum';
2
+ import {
3
+ computed, onMounted,
4
+ } from 'vue';
5
+ import {
6
+ AntSpinnerSize,
7
+ } from './__types/AntSpinner.types';
8
+ import {
9
+ handleEnumValidation,
10
+ } from '../handler';
11
+ import {
12
+ State,
13
+ } from '../enums/State.enum';
6
14
 
7
15
  const props = withDefaults(defineProps<{
8
- state?: State,
16
+ state?: State;
9
17
  size?: AntSpinnerSize;
10
18
  inverted?: boolean;
11
19
  }>(), {
12
20
  size: AntSpinnerSize.md,
13
21
  state: State.base,
14
- inverted: false
22
+ inverted: false,
15
23
  });
16
24
 
17
25
  const classes = computed(() => ({
@@ -1,21 +1,33 @@
1
1
  <script lang="ts" setup>
2
- import {computed, onMounted} from 'vue';
3
- import {handleEnumValidation} from '../handler';
4
- import {faCircleXmark, type IconDefinition} from '@fortawesome/free-solid-svg-icons';
5
- import {AntTagSize, TagState} from './__types/AntTag.types';
2
+ import {
3
+ computed, onMounted,
4
+ } from 'vue';
5
+ import {
6
+ handleEnumValidation,
7
+ } from '../handler';
8
+ import {
9
+ faCircleXmark, type IconDefinition,
10
+ } from '@fortawesome/free-solid-svg-icons';
11
+ import {
12
+ AntTagSize, TagState,
13
+ } from './__types/AntTag.types';
6
14
  import AntIcon from './AntIcon.vue';
7
- import {IconSize} from './__types/AntIcon.types';
15
+ import {
16
+ IconSize,
17
+ } from './__types/AntIcon.types';
8
18
 
9
- defineEmits(['close']);
19
+ defineEmits([
20
+ 'close',
21
+ ]);
10
22
  const props = withDefaults(defineProps<{
11
- state?: TagState,
23
+ state?: TagState;
12
24
  size?: AntTagSize;
13
25
  iconLeft?: IconDefinition;
14
- dismiss?: boolean
26
+ dismiss?: boolean;
15
27
  }>(), {
16
28
  size: AntTagSize.md,
17
29
  state: TagState.base,
18
- dismiss: false
30
+ dismiss: false,
19
31
  });
20
32
 
21
33
  const classes = computed(() => {
@@ -28,6 +40,7 @@ const classes = computed(() => {
28
40
  [TagState.success]: 'bg-success-500 text-success-500-font',
29
41
  [TagState.warning]: 'bg-warning-500 text-warning-500-font',
30
42
  };
43
+
31
44
  return {
32
45
  'rounded-md inline-flex items-center': true,
33
46
  'px-1 py-0.5 text-xs gap-0.5': props.size === AntTagSize.xs3,
@@ -67,7 +80,7 @@ const iconState = computed(() => {
67
80
  const iconWrapperClass = computed(() => {
68
81
  return {
69
82
  'w-4 h-4': props.size === AntTagSize.xs2 || props.size === AntTagSize.xs,
70
- 'w-5 h-5': props.size === AntTagSize.sm || props.size === AntTagSize.md || props.size === AntTagSize.lg
83
+ 'w-5 h-5': props.size === AntTagSize.sm || props.size === AntTagSize.md || props.size === AntTagSize.lg,
71
84
  };
72
85
  });
73
86
 
@@ -91,11 +104,10 @@ onMounted(() => {
91
104
  :icon="iconLeft"
92
105
  :size="getIconSize"
93
106
  :color="iconState"
94
- >
95
- </anticon>
107
+ />
96
108
  </span>
97
109
 
98
- <slot/>
110
+ <slot />
99
111
 
100
112
  <span
101
113
  v-if="dismiss"
@@ -1,27 +1,35 @@
1
1
  <script lang="ts" setup>
2
- import {computed, onMounted, useSlots} from 'vue';
3
- import {handleEnumValidation} from '../handler';
2
+ import {
3
+ computed, onMounted, useSlots,
4
+ } from 'vue';
5
+ import {
6
+ handleEnumValidation,
7
+ } from '../handler';
4
8
  import {
5
9
  faCheckCircle,
6
10
  faExclamationCircle,
7
11
  faExclamationTriangle,
8
12
  faInfoCircle,
9
- faXmark
13
+ faXmark,
10
14
  } from '@fortawesome/free-solid-svg-icons';
11
15
  import AntIcon from './AntIcon.vue';
12
16
  import AntButton from './buttons/AntButton.vue';
13
- import {State, InputState, Size} from '../enums';
14
- import {IconSize} from './__types/AntIcon.types';
17
+ import {
18
+ State, InputState, Size,
19
+ } from '../enums';
20
+ import {
21
+ IconSize,
22
+ } from './__types/AntIcon.types';
15
23
 
16
24
  const props = withDefaults(defineProps<{
17
- title?: string,
18
- state?: InputState,
19
- showUndo?: boolean,
20
- icon?: boolean
25
+ title?: string;
26
+ state?: InputState;
27
+ showUndo?: boolean;
28
+ icon?: boolean;
21
29
  }>(), {
22
30
  state: InputState.base,
23
31
  showUndo: false,
24
- icon: true
32
+ icon: true,
25
33
  });
26
34
 
27
35
  const icons = {
@@ -99,7 +107,7 @@ onMounted(() => {
99
107
  </div>
100
108
 
101
109
  <div v-if="hasDefaultSlot">
102
- <slot/>
110
+ <slot />
103
111
  </div>
104
112
 
105
113
  <div
@@ -1,16 +1,24 @@
1
1
  <script lang="ts" setup>
2
- import {computed} from 'vue';
2
+ import {
3
+ computed,
4
+ } from 'vue';
3
5
  import AntToast from './AntToast.vue';
4
- import {CornerPosition} from '../enums/Position.enum';
5
- import type {Toast} from "../components/__types";
6
+ import {
7
+ CornerPosition,
8
+ } from '../enums/Position.enum';
9
+ import type {
10
+ Toast,
11
+ } from '../components/__types';
6
12
 
7
- defineEmits(['close']);
13
+ defineEmits([
14
+ 'close',
15
+ ]);
8
16
 
9
17
  const props = withDefaults(defineProps<{
10
18
  position?: CornerPosition;
11
19
  toasts: Toast[];
12
20
  }>(), {
13
- position: CornerPosition.bottomLeft
21
+ position: CornerPosition.bottomLeft,
14
22
  });
15
23
 
16
24
  const classes = computed(() => ({