@antify/ui 2.5.7 → 3.1.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 (44) hide show
  1. package/dist/components/AntAccordion.vue +5 -6
  2. package/dist/components/AntAccordionItem.vue +5 -7
  3. package/dist/components/AntAlert.vue +53 -54
  4. package/dist/components/AntButton.vue +60 -62
  5. package/dist/components/AntCard.vue +10 -11
  6. package/dist/components/AntIcon.vue +8 -8
  7. package/dist/components/AntKeycap.vue +15 -15
  8. package/dist/components/AntListGroup.vue +10 -10
  9. package/dist/components/AntModal.vue +5 -5
  10. package/dist/components/AntPagination.vue +38 -40
  11. package/dist/components/AntSkeleton.vue +5 -25
  12. package/dist/components/AntToast.vue +6 -6
  13. package/dist/components/AntToaster.vue +42 -15
  14. package/dist/components/__stories/AntListGroup.stories.js +6 -9
  15. package/dist/components/__stories/AntListGroup.stories.mjs +6 -9
  16. package/dist/components/__stories/AntListGroupItem.stories.js +1 -1
  17. package/dist/components/__stories/AntListGroupItem.stories.mjs +1 -1
  18. package/dist/components/__stories/AntToaster.stories.js +2 -2
  19. package/dist/components/__stories/AntToaster.stories.mjs +2 -2
  20. package/dist/components/inputs/AntCheckbox.vue +8 -9
  21. package/dist/components/inputs/AntColorInput/AntColorInput.vue +5 -10
  22. package/dist/components/inputs/AntImageInput.vue +34 -36
  23. package/dist/components/inputs/AntRadio.vue +8 -9
  24. package/dist/components/inputs/AntSelect.vue +64 -63
  25. package/dist/components/inputs/AntSwitch.vue +26 -27
  26. package/dist/components/inputs/AntSwitcher.vue +12 -11
  27. package/dist/components/inputs/AntTagInput.vue +6 -10
  28. package/dist/components/inputs/AntTextarea.vue +5 -9
  29. package/dist/components/inputs/Elements/AntBaseInput.vue +60 -60
  30. package/dist/components/inputs/__stories/AntCheckbox.stories.js +41 -14
  31. package/dist/components/inputs/__stories/AntCheckbox.stories.mjs +41 -14
  32. package/dist/components/table/AntTable.vue +11 -7
  33. package/dist/components/table/AntTableSkeleton.vue +5 -1
  34. package/dist/components/tabs/AntTabItem.vue +5 -7
  35. package/dist/composables/index.d.ts +1 -0
  36. package/dist/composables/index.js +11 -0
  37. package/dist/composables/index.mjs +1 -0
  38. package/dist/composables/useFlickerProtection.d.ts +22 -0
  39. package/dist/composables/useFlickerProtection.js +48 -0
  40. package/dist/composables/useFlickerProtection.mjs +48 -0
  41. package/dist/composables/useToaster.d.ts +1 -0
  42. package/dist/composables/useToaster.js +7 -4
  43. package/dist/composables/useToaster.mjs +7 -4
  44. package/package.json +1 -1
@@ -193,7 +193,10 @@ defineExpose({
193
193
  :messages="messages"
194
194
  :expanded-height="!resize"
195
195
  >
196
- <div
196
+ <AntSkeleton
197
+ :visible="skeleton"
198
+ :grouped="grouped"
199
+ rounded
197
200
  class="block relative w-full h-full"
198
201
  :class="{...{'-mr-px': grouped !== Grouped.none}, ..._wrapperClass}"
199
202
  >
@@ -219,13 +222,6 @@ defineExpose({
219
222
  :color="iconColor"
220
223
  />
221
224
  </div>
222
-
223
- <AntSkeleton
224
- v-if="skeleton"
225
- absolute
226
- :grouped="grouped"
227
- rounded
228
- />
229
- </div>
225
+ </AntSkeleton>
230
226
  </AntField>
231
227
  </template>
@@ -231,72 +231,72 @@ function onClickClearIcon() {
231
231
  class="block relative w-full h-fit"
232
232
  :class="_wrapperClass"
233
233
  >
234
- <div
235
- v-if="iconLeft"
236
- class="absolute h-full flex items-center justify-center z-20"
237
- :class="{
238
- 'w-6': size === Size.xs2,
239
- 'w-7': size === Size.sm,
240
- 'w-8': size === Size.xs,
241
- 'w-9': size === Size.md,
242
- 'w-10': size === Size.lg,
243
- 'opacity-50': disabled,
244
- }"
245
- >
246
- <AntIcon
247
- :icon="iconLeft"
248
- :size="inputIconSize"
249
- color="text-for-white-bg-font"
250
- />
251
- </div>
252
-
253
- <input
254
- ref="_inputRef"
255
- v-model="_modelValue"
256
- :class="inputClasses"
257
- :type="type"
258
- :placeholder="placeholder"
259
- :disabled="disabled || skeleton"
260
- :readonly="readonly"
261
- :tabindex="hasInputState ? -1 : 0"
262
- :min="min"
263
- :max="max"
264
- title=""
265
- v-bind="$attrs"
266
- @blur="onBlur"
267
- >
268
-
269
- <div
270
- v-if="(nullable && _modelValue !== null && _modelValue !== '') || (showIcon && icon) || hasSlotContent(slot['icon-right'])"
271
- class="absolute h-full flex items-center justify-center right-0 top-0 transition-all z-20"
272
- :class="{'w-6': size === Size.xs2, 'w-7': size === Size.xs, 'w-8': size === Size.sm, 'w-9': size === Size.md, 'w-10': size === Size.lg}"
234
+ <AntSkeleton
235
+ :visible="skeleton"
236
+ :grouped="grouped"
237
+ rounded
238
+ class="w-full"
273
239
  >
274
- <slot name="icon-right">
240
+ <div
241
+ v-if="iconLeft"
242
+ class="absolute h-full flex items-center justify-center z-20"
243
+ :class="{
244
+ 'w-6': size === Size.xs2,
245
+ 'w-7': size === Size.sm,
246
+ 'w-8': size === Size.xs,
247
+ 'w-9': size === Size.md,
248
+ 'w-10': size === Size.lg,
249
+ 'opacity-50': disabled,
250
+ }"
251
+ >
275
252
  <AntIcon
276
- v-if="nullable && _modelValue !== null && _modelValue !== ''"
277
- :icon="faXmark"
278
- :class="{'cursor-pointer': !disabled, ...iconClasses}"
279
- :color="iconColorClass"
253
+ :icon="iconLeft"
280
254
  :size="inputIconSize"
281
- @click="() => onClickClearIcon()"
255
+ color="text-for-white-bg-font"
282
256
  />
257
+ </div>
283
258
 
284
- <AntIcon
285
- v-else-if="showIcon && icon"
286
- :icon="icon"
287
- :color="iconColorClass"
288
- :class="iconClasses"
289
- :size="inputIconSize"
290
- />
291
- </slot>
292
- </div>
259
+ <input
260
+ ref="_inputRef"
261
+ v-model="_modelValue"
262
+ :class="inputClasses"
263
+ :type="type"
264
+ :placeholder="placeholder"
265
+ :disabled="disabled || skeleton"
266
+ :readonly="readonly"
267
+ :tabindex="hasInputState ? -1 : 0"
268
+ :min="min"
269
+ :max="max"
270
+ title=""
271
+ v-bind="$attrs"
272
+ @blur="onBlur"
273
+ >
293
274
 
294
- <AntSkeleton
295
- v-if="skeleton"
296
- absolute
297
- :grouped="grouped"
298
- rounded
299
- />
275
+ <div
276
+ v-if="(nullable && _modelValue !== null && _modelValue !== '') || (showIcon && icon) || hasSlotContent(slot['icon-right'])"
277
+ class="absolute h-full flex items-center justify-center right-0 top-0 transition-all z-20"
278
+ :class="{'w-6': size === Size.xs2, 'w-7': size === Size.xs, 'w-8': size === Size.sm, 'w-9': size === Size.md, 'w-10': size === Size.lg}"
279
+ >
280
+ <slot name="icon-right">
281
+ <AntIcon
282
+ v-if="nullable && _modelValue !== null && _modelValue !== ''"
283
+ :icon="faXmark"
284
+ :class="{'cursor-pointer': !disabled, ...iconClasses}"
285
+ :color="iconColorClass"
286
+ :size="inputIconSize"
287
+ @click="() => onClickClearIcon()"
288
+ />
289
+
290
+ <AntIcon
291
+ v-else-if="showIcon && icon"
292
+ :icon="icon"
293
+ :color="iconColorClass"
294
+ :class="iconClasses"
295
+ :size="inputIconSize"
296
+ />
297
+ </slot>
298
+ </div>
299
+ </AntSkeleton>
300
300
  </div>
301
301
  </template>
302
302
 
@@ -90,6 +90,7 @@ const Summary = exports.Summary = {
90
90
  <AntFormGroup direction="row">
91
91
  <AntCheckbox
92
92
  v-model="offValue"
93
+ v-bind="args"
93
94
  class="w-28"
94
95
  :state="InputState.base"
95
96
  label="Label"
@@ -98,6 +99,7 @@ const Summary = exports.Summary = {
98
99
  />
99
100
  <AntCheckbox
100
101
  v-model="offValue"
102
+ v-bind="args"
101
103
  class="w-28"
102
104
  :state="InputState.info"
103
105
  label="Label"
@@ -106,6 +108,7 @@ const Summary = exports.Summary = {
106
108
  />
107
109
  <AntCheckbox
108
110
  v-model="offValue"
111
+ v-bind="args"
109
112
  class="w-28"
110
113
  :state="InputState.success"
111
114
  label="Label"
@@ -114,6 +117,7 @@ const Summary = exports.Summary = {
114
117
  />
115
118
  <AntCheckbox
116
119
  v-model="offValue"
120
+ v-bind="args"
117
121
  class="w-28"
118
122
  :state="InputState.warning"
119
123
  label="Label"
@@ -122,6 +126,7 @@ const Summary = exports.Summary = {
122
126
  />
123
127
  <AntCheckbox
124
128
  v-model="offValue"
129
+ v-bind="args"
125
130
  class="w-28"
126
131
  :state="InputState.danger"
127
132
  label="Label"
@@ -134,6 +139,7 @@ const Summary = exports.Summary = {
134
139
  <AntFormGroup direction="row">
135
140
  <AntCheckbox
136
141
  v-model="onValue"
142
+ v-bind="args"
137
143
  class="w-28"
138
144
  :state="InputState.base"
139
145
  label="Label"
@@ -142,6 +148,7 @@ const Summary = exports.Summary = {
142
148
  />
143
149
  <AntCheckbox
144
150
  v-model="onValue"
151
+ v-bind="args"
145
152
  class="w-28"
146
153
  :state="InputState.info"
147
154
  label="Label"
@@ -150,6 +157,7 @@ const Summary = exports.Summary = {
150
157
  />
151
158
  <AntCheckbox
152
159
  v-model="onValue"
160
+ v-bind="args"
153
161
  class="w-28"
154
162
  :state="InputState.success"
155
163
  label="Label"
@@ -158,6 +166,7 @@ const Summary = exports.Summary = {
158
166
  />
159
167
  <AntCheckbox
160
168
  v-model="onValue"
169
+ v-bind="args"
161
170
  class="w-28"
162
171
  :state="InputState.warning"
163
172
  label="Label"
@@ -166,6 +175,7 @@ const Summary = exports.Summary = {
166
175
  />
167
176
  <AntCheckbox
168
177
  v-model="onValue"
178
+ v-bind="args"
169
179
  class="w-28"
170
180
  :state="InputState.danger"
171
181
  label="Label"
@@ -178,6 +188,7 @@ const Summary = exports.Summary = {
178
188
  <AntFormGroup direction="row">
179
189
  <AntCheckbox
180
190
  v-model="offValue"
191
+ v-bind="args"
181
192
  class="w-28"
182
193
  :size="Size.lg"
183
194
  label="Label"
@@ -185,6 +196,7 @@ const Summary = exports.Summary = {
185
196
  />
186
197
  <AntCheckbox
187
198
  v-model="onValue"
199
+ v-bind="args"
188
200
  class="w-28"
189
201
  :size="Size.lg"
190
202
  label="Label"
@@ -192,6 +204,7 @@ const Summary = exports.Summary = {
192
204
  />
193
205
  <AntCheckbox
194
206
  v-model="offValue"
207
+ v-bind="args"
195
208
  class="w-28"
196
209
  :size="Size.md"
197
210
  label="Label"
@@ -199,6 +212,7 @@ const Summary = exports.Summary = {
199
212
  />
200
213
  <AntCheckbox
201
214
  v-model="onValue"
215
+ v-bind="args"
202
216
  class="w-28"
203
217
  :size="Size.md"
204
218
  label="Label"
@@ -206,6 +220,7 @@ const Summary = exports.Summary = {
206
220
  />
207
221
  <AntCheckbox
208
222
  v-model="offValue"
223
+ v-bind="args"
209
224
  class="w-28"
210
225
  :size="Size.sm"
211
226
  label="Label"
@@ -213,6 +228,7 @@ const Summary = exports.Summary = {
213
228
  />
214
229
  <AntCheckbox
215
230
  v-model="onValue"
231
+ v-bind="args"
216
232
  class="w-28"
217
233
  :size="Size.sm"
218
234
  label="Label"
@@ -220,6 +236,7 @@ const Summary = exports.Summary = {
220
236
  />
221
237
  <AntCheckbox
222
238
  v-model="offValue"
239
+ v-bind="args"
223
240
  class="w-28"
224
241
  :size="Size.xs"
225
242
  label="Label"
@@ -227,6 +244,7 @@ const Summary = exports.Summary = {
227
244
  />
228
245
  <AntCheckbox
229
246
  v-model="onValue"
247
+ v-bind="args"
230
248
  class="w-28"
231
249
  :size="Size.xs"
232
250
  label="Label"
@@ -234,6 +252,7 @@ const Summary = exports.Summary = {
234
252
  />
235
253
  <AntCheckbox
236
254
  v-model="offValue"
255
+ v-bind="args"
237
256
  class="w-28"
238
257
  :size="Size.xs2"
239
258
  label="Label"
@@ -241,6 +260,7 @@ const Summary = exports.Summary = {
241
260
  />
242
261
  <AntCheckbox
243
262
  v-model="onValue"
263
+ v-bind="args"
244
264
  class="w-28"
245
265
  :size="Size.xs"
246
266
  label="Label"
@@ -253,6 +273,7 @@ const Summary = exports.Summary = {
253
273
  <AntFormGroup direction="row">
254
274
  <AntCheckbox
255
275
  v-model="offValue"
276
+ v-bind="args"
256
277
  class="w-28"
257
278
  label="Label"
258
279
  description="Lorem ipsum dolor sit amet."
@@ -262,6 +283,7 @@ const Summary = exports.Summary = {
262
283
  </AntCheckbox>
263
284
  <AntCheckbox
264
285
  v-model="onValue"
286
+ v-bind="args"
265
287
  class="w-28"
266
288
  label="Label"
267
289
  description="Lorem ipsum dolor sit amet."
@@ -276,6 +298,7 @@ const Summary = exports.Summary = {
276
298
  <AntFormGroup direction="row">
277
299
  <AntCheckbox
278
300
  v-model="offValue"
301
+ v-bind="args"
279
302
  :readonly="true"
280
303
  class="w-28"
281
304
  label="Label"
@@ -285,6 +308,7 @@ const Summary = exports.Summary = {
285
308
  </AntCheckbox>
286
309
  <AntCheckbox
287
310
  v-model="onValue"
311
+ v-bind="args"
288
312
  :readonly="true"
289
313
  class="w-28"
290
314
  label="Label"
@@ -298,6 +322,7 @@ const Summary = exports.Summary = {
298
322
  <AntFormGroupLabel>Skeleton</AntFormGroupLabel>
299
323
  <AntCheckbox
300
324
  v-model="offValue"
325
+ v-bind="args"
301
326
  class="w-28"
302
327
  label="Label"
303
328
  description="Lorem ipsum dolor sit amet."
@@ -309,49 +334,50 @@ const Summary = exports.Summary = {
309
334
  </AntFormGroup>
310
335
  <AntFormGroupLabel>Plain</AntFormGroupLabel>
311
336
  <AntFormGroup direction="row">
312
- <AntCheckbox v-model="offValue"/>
313
- <AntCheckbox v-model="onValue"/>
337
+ <AntCheckbox v-model="offValue" v-bind="args" />
338
+ <AntCheckbox v-model="onValue" v-bind="args" />
314
339
  </AntFormGroup>
315
340
  <AntFormGroupLabel>Label & label + value</AntFormGroupLabel>
316
341
  <AntFormGroup direction="row">
317
- <AntCheckbox v-model="offValue" label="Label"/>
318
- <AntCheckbox v-model="onValue" label="Label"/>
319
- <AntCheckbox v-model="offValue" label="Label">
342
+ <AntCheckbox v-model="offValue" v-bind="args" label="Label"/>
343
+ <AntCheckbox v-model="onValue" v-bind="args" label="Label"/>
344
+ <AntCheckbox v-model="offValue" v-bind="args" label="Label">
320
345
  Value
321
346
  </AntCheckbox>
322
- <AntCheckbox v-model="onValue" label="Label">
347
+ <AntCheckbox v-model="onValue" v-bind="args" label="Label">
323
348
  Value
324
349
  </AntCheckbox>
325
350
  </AntFormGroup>
326
351
  <AntFormGroupLabel>Description & description + value</AntFormGroupLabel>
327
352
  <AntFormGroup direction="row">
328
- <AntCheckbox v-model="offValue" class="w-28" description="Lorem ipsum dolor sit amet"/>
329
- <AntCheckbox v-model="onValue" class="w-28" description="Lorem ipsum dolor sit amet"/>
330
- <AntCheckbox v-model="offValue" class="w-28" description="Lorem ipsum dolor sit amet">
353
+ <AntCheckbox v-model="offValue" v-bind="args" class="w-28" description="Lorem ipsum dolor sit amet"/>
354
+ <AntCheckbox v-model="onValue" v-bind="args" class="w-28" description="Lorem ipsum dolor sit amet"/>
355
+ <AntCheckbox v-model="offValue" v-bind="args" class="w-28" description="Lorem ipsum dolor sit amet">
331
356
  Value
332
357
  </AntCheckbox>
333
- <AntCheckbox v-model="onValue" class="w-28" description="Lorem ipsum dolor sit amet">
358
+ <AntCheckbox v-model="onValue" v-bind="args" class="w-28" description="Lorem ipsum dolor sit amet">
334
359
  Value
335
360
  </AntCheckbox>
336
361
  </AntFormGroup>
337
362
  <AntFormGroupLabel>Content</AntFormGroupLabel>
338
363
  <AntFormGroup direction="row">
339
- <AntCheckbox v-model="offValue" class="w-28">
364
+ <AntCheckbox v-model="offValue" v-bind="args" class="w-28">
340
365
  Value
341
366
  </AntCheckbox>
342
- <AntCheckbox v-model="onValue" class="w-28">
367
+ <AntCheckbox v-model="onValue" v-bind="args" class="w-28">
343
368
  Value
344
369
  </AntCheckbox>
345
370
  </AntFormGroup>
346
371
  <AntFormGroupLabel>Label & Description</AntFormGroupLabel>
347
372
  <AntFormGroup direction="row">
348
- <AntCheckbox v-model="offValue" class="w-28" description="Lorem ipsum dolor sit amet" label="Label"/>
349
- <AntCheckbox v-model="onValue" class="w-28" description="Lorem ipsum dolor sit amet" label="Label"/>
373
+ <AntCheckbox v-model="offValue" v-bind="args" class="w-28" description="Lorem ipsum dolor sit amet" label="Label"/>
374
+ <AntCheckbox v-model="onValue" v-bind="args" class="w-28" description="Lorem ipsum dolor sit amet" label="Label"/>
350
375
  </AntFormGroup>
351
376
  <AntFormGroupLabel>Label & Description & Content</AntFormGroupLabel>
352
377
  <AntFormGroup direction="row">
353
378
  <AntCheckbox
354
379
  v-model="offValue"
380
+ v-bind="args"
355
381
  class="w-28"
356
382
  description="Lorem ipsum dolor sit amet"
357
383
  label="Label"
@@ -360,6 +386,7 @@ const Summary = exports.Summary = {
360
386
  </AntCheckbox>
361
387
  <AntCheckbox
362
388
  v-model="onValue"
389
+ v-bind="args"
363
390
  class="w-28"
364
391
  description="Lorem ipsum dolor sit amet"
365
392
  label="Label"