@vuecs/elements 1.2.3 → 1.2.5

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 (43) hide show
  1. package/README.md +46 -11
  2. package/dist/components/alert/Alert.vue.d.ts +22 -22
  3. package/dist/components/alert/Alert.vue.d.ts.map +1 -1
  4. package/dist/components/alert/AlertClose.vue.d.ts +7 -7
  5. package/dist/components/alert/AlertClose.vue.d.ts.map +1 -1
  6. package/dist/components/alert/AlertDescription.vue.d.ts +7 -7
  7. package/dist/components/alert/AlertDescription.vue.d.ts.map +1 -1
  8. package/dist/components/alert/AlertTitle.vue.d.ts +7 -7
  9. package/dist/components/alert/AlertTitle.vue.d.ts.map +1 -1
  10. package/dist/components/aspect-ratio/AspectRatio.vue.d.ts +6 -6
  11. package/dist/components/avatar/Avatar.vue.d.ts +17 -17
  12. package/dist/components/avatar/Avatar.vue.d.ts.map +1 -1
  13. package/dist/components/badge/Badge.vue.d.ts +60 -26
  14. package/dist/components/badge/Badge.vue.d.ts.map +1 -1
  15. package/dist/components/card/Card.vue.d.ts +16 -16
  16. package/dist/components/card/Card.vue.d.ts.map +1 -1
  17. package/dist/components/card/CardBody.vue.d.ts +7 -7
  18. package/dist/components/card/CardBody.vue.d.ts.map +1 -1
  19. package/dist/components/card/CardDescription.vue.d.ts +7 -7
  20. package/dist/components/card/CardDescription.vue.d.ts.map +1 -1
  21. package/dist/components/card/CardFooter.vue.d.ts +7 -7
  22. package/dist/components/card/CardFooter.vue.d.ts.map +1 -1
  23. package/dist/components/card/CardHeader.vue.d.ts +7 -7
  24. package/dist/components/card/CardHeader.vue.d.ts.map +1 -1
  25. package/dist/components/card/CardPlaceholder.d.ts +6 -6
  26. package/dist/components/card/CardTitle.vue.d.ts +7 -7
  27. package/dist/components/card/CardTitle.vue.d.ts.map +1 -1
  28. package/dist/components/collapse/Collapse.vue.d.ts +12 -12
  29. package/dist/components/collapse/Collapse.vue.d.ts.map +1 -1
  30. package/dist/components/collapse/CollapseContent.vue.d.ts +7 -7
  31. package/dist/components/collapse/CollapseContent.vue.d.ts.map +1 -1
  32. package/dist/components/collapse/CollapseTrigger.vue.d.ts +10 -10
  33. package/dist/components/collapse/CollapseTrigger.vue.d.ts.map +1 -1
  34. package/dist/components/separator/Separator.vue.d.ts +6 -6
  35. package/dist/components/tag/Tag.vue.d.ts +20 -20
  36. package/dist/components/tag/Tags.vue.d.ts +13 -13
  37. package/dist/components/visually-hidden/VisuallyHidden.vue.d.ts +1 -1
  38. package/dist/components/visually-hidden/VisuallyHidden.vue.d.ts.map +1 -1
  39. package/dist/index.mjs +93 -18
  40. package/dist/index.mjs.map +1 -1
  41. package/dist/vue.d.ts +1 -1
  42. package/dist/vue.d.ts.map +1 -1
  43. package/package.json +7 -7
package/dist/index.mjs CHANGED
@@ -52,7 +52,11 @@ const alertProps = {
52
52
  },
53
53
  /** HTML tag to render. */
54
54
  as: {
55
- type: [String, Object],
55
+ type: [
56
+ String,
57
+ Object,
58
+ Function
59
+ ],
56
60
  default: "div"
57
61
  },
58
62
  ...themableProps()
@@ -118,7 +122,11 @@ var AlertTitle_default = defineComponent({
118
122
  * heading). Override via `:as` for nested-heading hierarchies.
119
123
  */
120
124
  as: {
121
- type: [String, Object],
125
+ type: [
126
+ String,
127
+ Object,
128
+ Function
129
+ ],
122
130
  default: "h4"
123
131
  },
124
132
  ...themableProps()
@@ -136,7 +144,11 @@ var AlertDescription_default = defineComponent({
136
144
  props: {
137
145
  /** HTML tag to render. */
138
146
  as: {
139
- type: [String, Object],
147
+ type: [
148
+ String,
149
+ Object,
150
+ Function
151
+ ],
140
152
  default: "div"
141
153
  },
142
154
  ...themableProps()
@@ -154,7 +166,11 @@ var AlertClose_default = defineComponent({
154
166
  props: {
155
167
  /** HTML tag to render. */
156
168
  as: {
157
- type: [String, Object],
169
+ type: [
170
+ String,
171
+ Object,
172
+ Function
173
+ ],
158
174
  default: "button"
159
175
  },
160
176
  /**
@@ -343,16 +359,35 @@ var Badge_default = defineComponent({
343
359
  type: String,
344
360
  default: void 0
345
361
  },
346
- /** HTML tag to render. */
347
- tag: {
348
- type: String,
362
+ /**
363
+ * Element or component to render as. Pass a string tag (`'span'`,
364
+ * `'div'`) or a component (`RouterLink` / `NuxtLink`).
365
+ */
366
+ as: {
367
+ type: [
368
+ String,
369
+ Object,
370
+ Function
371
+ ],
349
372
  default: "span"
350
373
  },
374
+ /**
375
+ * @deprecated Use `as` instead. Non-breaking alias — takes precedence
376
+ * over `as` when set.
377
+ */
378
+ tag: {
379
+ type: [
380
+ String,
381
+ Object,
382
+ Function
383
+ ],
384
+ default: void 0
385
+ },
351
386
  ...themableProps()
352
387
  },
353
388
  setup(props, { attrs, slots }) {
354
389
  const theme = useComponentTheme("badge", useThemeProps(props, "color", "variant", "size"), badgeThemeDefaults);
355
- return () => h(props.tag, mergeProps(attrs, { class: theme.value.root || void 0 }), slots.default?.());
390
+ return () => h(props.tag ?? props.as, mergeProps(attrs, { class: theme.value.root || void 0 }), slots.default?.());
356
391
  }
357
392
  });
358
393
  //#endregion
@@ -402,7 +437,11 @@ var Card_default = defineComponent({
402
437
  },
403
438
  /** HTML tag to render. Use `:as-child` to compose onto an existing component. */
404
439
  as: {
405
- type: [String, Object],
440
+ type: [
441
+ String,
442
+ Object,
443
+ Function
444
+ ],
406
445
  default: "div"
407
446
  },
408
447
  /** Render the consumer's slot child as the card root (Reka `asChild` pattern). */
@@ -431,7 +470,11 @@ var CardHeader_default = defineComponent({
431
470
  props: {
432
471
  /** HTML tag to render. Use `:as-child` to compose onto an existing component. */
433
472
  as: {
434
- type: [String, Object],
473
+ type: [
474
+ String,
475
+ Object,
476
+ Function
477
+ ],
435
478
  default: "header"
436
479
  },
437
480
  /** Render the consumer's slot child as the root (Reka `asChild` pattern). */
@@ -478,7 +521,11 @@ var CardTitle_default = defineComponent({
478
521
  props: {
479
522
  /** HTML tag to render. Use `:as-child` to compose onto an existing component. */
480
523
  as: {
481
- type: [String, Object],
524
+ type: [
525
+ String,
526
+ Object,
527
+ Function
528
+ ],
482
529
  default: "h3"
483
530
  },
484
531
  /** Render the consumer's slot child as the root (Reka `asChild` pattern). */
@@ -525,7 +572,11 @@ var CardDescription_default = defineComponent({
525
572
  props: {
526
573
  /** HTML tag to render. Use `:as-child` to compose onto an existing component. */
527
574
  as: {
528
- type: [String, Object],
575
+ type: [
576
+ String,
577
+ Object,
578
+ Function
579
+ ],
529
580
  default: "p"
530
581
  },
531
582
  /** Render the consumer's slot child as the root (Reka `asChild` pattern). */
@@ -572,7 +623,11 @@ var CardBody_default = defineComponent({
572
623
  props: {
573
624
  /** HTML tag to render. Use `:as-child` to compose onto an existing component. */
574
625
  as: {
575
- type: [String, Object],
626
+ type: [
627
+ String,
628
+ Object,
629
+ Function
630
+ ],
576
631
  default: "div"
577
632
  },
578
633
  /** Render the consumer's slot child as the root (Reka `asChild` pattern). */
@@ -619,7 +674,11 @@ var CardFooter_default = defineComponent({
619
674
  props: {
620
675
  /** HTML tag to render. Use `:as-child` to compose onto an existing component. */
621
676
  as: {
622
- type: [String, Object],
677
+ type: [
678
+ String,
679
+ Object,
680
+ Function
681
+ ],
623
682
  default: "footer"
624
683
  },
625
684
  /** Render the consumer's slot child as the root (Reka `asChild` pattern). */
@@ -794,7 +853,11 @@ var Collapse_default = defineComponent({
794
853
  },
795
854
  /** HTML tag to render. */
796
855
  as: {
797
- type: [String, Object],
856
+ type: [
857
+ String,
858
+ Object,
859
+ Function
860
+ ],
798
861
  default: "div"
799
862
  },
800
863
  /** Render the consumer's slot child as the root (Reka `asChild` pattern). */
@@ -835,7 +898,11 @@ const collapseTriggerProps = {
835
898
  },
836
899
  /** HTML tag (or component) to render as. Reka default: `'button'`. */
837
900
  as: {
838
- type: [String, Object],
901
+ type: [
902
+ String,
903
+ Object,
904
+ Function
905
+ ],
839
906
  default: "button"
840
907
  },
841
908
  /** Render the consumer's slot child as the trigger (Reka `asChild` pattern). */
@@ -889,7 +956,11 @@ var CollapseContent_default = defineComponent({
889
956
  },
890
957
  /** HTML tag to render. */
891
958
  as: {
892
- type: [String, Object],
959
+ type: [
960
+ String,
961
+ Object,
962
+ Function
963
+ ],
893
964
  default: "div"
894
965
  },
895
966
  /** Render the consumer's slot child as the pane root (Reka `asChild` pattern). */
@@ -1139,7 +1210,11 @@ var VisuallyHidden_default = defineComponent({
1139
1210
  props: {
1140
1211
  /** HTML tag to render. */
1141
1212
  as: {
1142
- type: [String, Object],
1213
+ type: [
1214
+ String,
1215
+ Object,
1216
+ Function
1217
+ ],
1143
1218
  default: "span"
1144
1219
  } },
1145
1220
  setup(props, { attrs, slots }) {