@vifui/core 0.4.0-alpha.6

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 (166) hide show
  1. package/README.md +204 -0
  2. package/dist/components/accordion/accordion-body.vue.d.ts +29 -0
  3. package/dist/components/accordion/accordion-body.vue.js +27 -0
  4. package/dist/components/accordion/accordion-body.vue2.js +5 -0
  5. package/dist/components/accordion/accordion-content.vue.d.ts +29 -0
  6. package/dist/components/accordion/accordion-content.vue.js +26 -0
  7. package/dist/components/accordion/accordion-content.vue2.js +5 -0
  8. package/dist/components/accordion/accordion-header.vue.d.ts +30 -0
  9. package/dist/components/accordion/accordion-header.vue.js +28 -0
  10. package/dist/components/accordion/accordion-header.vue2.js +5 -0
  11. package/dist/components/accordion/accordion-indicator.vue.d.ts +32 -0
  12. package/dist/components/accordion/accordion-indicator.vue.js +22 -0
  13. package/dist/components/accordion/accordion-indicator.vue2.js +5 -0
  14. package/dist/components/accordion/accordion-item.vue.d.ts +54 -0
  15. package/dist/components/accordion/accordion-item.vue.js +30 -0
  16. package/dist/components/accordion/accordion-item.vue2.js +5 -0
  17. package/dist/components/accordion/accordion-root.vue.d.ts +94 -0
  18. package/dist/components/accordion/accordion-root.vue.js +55 -0
  19. package/dist/components/accordion/accordion-root.vue2.js +5 -0
  20. package/dist/components/accordion/accordion-trigger.vue.d.ts +44 -0
  21. package/dist/components/accordion/accordion-trigger.vue.js +30 -0
  22. package/dist/components/accordion/accordion-trigger.vue2.js +5 -0
  23. package/dist/components/accordion/accordion.styles.d.ts +99 -0
  24. package/dist/components/accordion/accordion.styles.js +42 -0
  25. package/dist/components/accordion/index.d.ts +15 -0
  26. package/dist/components/accordion/index.js +8 -0
  27. package/dist/components/alert/alert-body.vue.d.ts +16 -0
  28. package/dist/components/alert/alert-body.vue.js +54 -0
  29. package/dist/components/alert/alert-body.vue2.js +5 -0
  30. package/dist/components/alert/alert-close.vue.d.ts +12 -0
  31. package/dist/components/alert/alert-close.vue.js +38 -0
  32. package/dist/components/alert/alert-close.vue2.js +5 -0
  33. package/dist/components/alert/alert-content.vue.d.ts +28 -0
  34. package/dist/components/alert/alert-content.vue.js +54 -0
  35. package/dist/components/alert/alert-content.vue2.js +5 -0
  36. package/dist/components/alert/alert-description.vue.d.ts +16 -0
  37. package/dist/components/alert/alert-description.vue.js +41 -0
  38. package/dist/components/alert/alert-description.vue2.js +5 -0
  39. package/dist/components/alert/alert-footer.vue.d.ts +16 -0
  40. package/dist/components/alert/alert-footer.vue.js +54 -0
  41. package/dist/components/alert/alert-footer.vue2.js +5 -0
  42. package/dist/components/alert/alert-header.vue.d.ts +16 -0
  43. package/dist/components/alert/alert-header.vue.js +54 -0
  44. package/dist/components/alert/alert-header.vue2.js +5 -0
  45. package/dist/components/alert/alert-icon.vue.d.ts +8 -0
  46. package/dist/components/alert/alert-icon.vue.js +43 -0
  47. package/dist/components/alert/alert-icon.vue2.js +5 -0
  48. package/dist/components/alert/alert-root.vue.d.ts +48 -0
  49. package/dist/components/alert/alert-root.vue.js +57 -0
  50. package/dist/components/alert/alert-root.vue2.js +5 -0
  51. package/dist/components/alert/alert-title.vue.d.ts +16 -0
  52. package/dist/components/alert/alert-title.vue.js +41 -0
  53. package/dist/components/alert/alert-title.vue2.js +5 -0
  54. package/dist/components/alert/alert.styles.d.ts +96 -0
  55. package/dist/components/alert/alert.styles.js +147 -0
  56. package/dist/components/alert/index.d.ts +19 -0
  57. package/dist/components/alert/index.js +10 -0
  58. package/dist/components/avatar/avatar-fallback.vue.d.ts +14 -0
  59. package/dist/components/avatar/avatar-fallback.vue.js +35 -0
  60. package/dist/components/avatar/avatar-fallback.vue2.js +5 -0
  61. package/dist/components/avatar/avatar-group.vue.d.ts +20 -0
  62. package/dist/components/avatar/avatar-group.vue.js +101 -0
  63. package/dist/components/avatar/avatar-group.vue2.js +5 -0
  64. package/dist/components/avatar/avatar-image.vue.d.ts +14 -0
  65. package/dist/components/avatar/avatar-image.vue.js +37 -0
  66. package/dist/components/avatar/avatar-image.vue2.js +5 -0
  67. package/dist/components/avatar/avatar-root.vue.d.ts +57 -0
  68. package/dist/components/avatar/avatar-root.vue.js +102 -0
  69. package/dist/components/avatar/avatar-root.vue2.js +5 -0
  70. package/dist/components/avatar/avatar.styles.d.ts +209 -0
  71. package/dist/components/avatar/avatar.styles.js +50 -0
  72. package/dist/components/avatar/index.d.ts +9 -0
  73. package/dist/components/avatar/index.js +5 -0
  74. package/dist/components/badge/badge.styles.d.ts +87 -0
  75. package/dist/components/badge/badge.styles.js +41 -0
  76. package/dist/components/badge/badge.vue.d.ts +116 -0
  77. package/dist/components/badge/badge.vue.js +79 -0
  78. package/dist/components/badge/badge.vue2.js +5 -0
  79. package/dist/components/badge/index.d.ts +3 -0
  80. package/dist/components/badge/index.js +2 -0
  81. package/dist/components/breadcrumb/breadcrumb-current-link.vue.d.ts +29 -0
  82. package/dist/components/breadcrumb/breadcrumb-current-link.vue.js +28 -0
  83. package/dist/components/breadcrumb/breadcrumb-current-link.vue2.js +5 -0
  84. package/dist/components/breadcrumb/breadcrumb-item.vue.d.ts +28 -0
  85. package/dist/components/breadcrumb/breadcrumb-item.vue.js +27 -0
  86. package/dist/components/breadcrumb/breadcrumb-item.vue2.js +5 -0
  87. package/dist/components/breadcrumb/breadcrumb-link.vue.d.ts +53 -0
  88. package/dist/components/breadcrumb/breadcrumb-link.vue.js +30 -0
  89. package/dist/components/breadcrumb/breadcrumb-link.vue2.js +5 -0
  90. package/dist/components/breadcrumb/breadcrumb-list.vue.d.ts +28 -0
  91. package/dist/components/breadcrumb/breadcrumb-list.vue.js +27 -0
  92. package/dist/components/breadcrumb/breadcrumb-list.vue2.js +5 -0
  93. package/dist/components/breadcrumb/breadcrumb-root.vue.d.ts +78 -0
  94. package/dist/components/breadcrumb/breadcrumb-root.vue.js +39 -0
  95. package/dist/components/breadcrumb/breadcrumb-root.vue2.js +5 -0
  96. package/dist/components/breadcrumb/breadcrumb-separator.vue.d.ts +41 -0
  97. package/dist/components/breadcrumb/breadcrumb-separator.vue.js +32 -0
  98. package/dist/components/breadcrumb/breadcrumb-separator.vue2.js +5 -0
  99. package/dist/components/breadcrumb/breadcrumb.styles.d.ts +144 -0
  100. package/dist/components/breadcrumb/breadcrumb.styles.js +58 -0
  101. package/dist/components/breadcrumb/index.d.ts +13 -0
  102. package/dist/components/breadcrumb/index.js +7 -0
  103. package/dist/components/button/button.styles.d.ts +90 -0
  104. package/dist/components/button/button.styles.js +41 -0
  105. package/dist/components/button/button.vue.d.ts +144 -0
  106. package/dist/components/button/button.vue.js +131 -0
  107. package/dist/components/button/button.vue2.js +5 -0
  108. package/dist/components/button/index.d.ts +3 -0
  109. package/dist/components/button/index.js +2 -0
  110. package/dist/components/card/card-body.vue.d.ts +29 -0
  111. package/dist/components/card/card-body.vue.js +27 -0
  112. package/dist/components/card/card-body.vue2.js +5 -0
  113. package/dist/components/card/card-footer.vue.d.ts +29 -0
  114. package/dist/components/card/card-footer.vue.js +27 -0
  115. package/dist/components/card/card-footer.vue2.js +5 -0
  116. package/dist/components/card/card-header.vue.d.ts +29 -0
  117. package/dist/components/card/card-header.vue.js +27 -0
  118. package/dist/components/card/card-header.vue2.js +5 -0
  119. package/dist/components/card/card-media.vue.d.ts +44 -0
  120. package/dist/components/card/card-media.vue.js +56 -0
  121. package/dist/components/card/card-media.vue2.js +5 -0
  122. package/dist/components/card/card-root.vue.d.ts +128 -0
  123. package/dist/components/card/card-root.vue.js +58 -0
  124. package/dist/components/card/card-root.vue2.js +5 -0
  125. package/dist/components/card/card.styles.d.ts +216 -0
  126. package/dist/components/card/card.styles.js +86 -0
  127. package/dist/components/card/index.d.ts +11 -0
  128. package/dist/components/card/index.js +6 -0
  129. package/dist/components/checkbox/checkbox-group-item.vue.d.ts +22 -0
  130. package/dist/components/checkbox/checkbox-group-item.vue.js +27 -0
  131. package/dist/components/checkbox/checkbox-group-item.vue2.js +5 -0
  132. package/dist/components/checkbox/checkbox-group.vue.d.ts +35 -0
  133. package/dist/components/checkbox/checkbox-group.vue.js +53 -0
  134. package/dist/components/checkbox/checkbox-group.vue2.js +5 -0
  135. package/dist/components/checkbox/checkbox-indicator.vue.d.ts +40 -0
  136. package/dist/components/checkbox/checkbox-indicator.vue.js +58 -0
  137. package/dist/components/checkbox/checkbox-indicator.vue2.js +5 -0
  138. package/dist/components/checkbox/checkbox-label.vue.d.ts +27 -0
  139. package/dist/components/checkbox/checkbox-label.vue.js +24 -0
  140. package/dist/components/checkbox/checkbox-label.vue2.js +5 -0
  141. package/dist/components/checkbox/checkbox-root.vue.d.ts +42 -0
  142. package/dist/components/checkbox/checkbox-root.vue.js +51 -0
  143. package/dist/components/checkbox/checkbox-root.vue2.js +5 -0
  144. package/dist/components/checkbox/checkbox.styles.d.ts +155 -0
  145. package/dist/components/checkbox/checkbox.styles.js +66 -0
  146. package/dist/components/checkbox/index.d.ts +11 -0
  147. package/dist/components/checkbox/index.js +6 -0
  148. package/dist/components/divider/divider.styles.d.ts +93 -0
  149. package/dist/components/divider/divider.styles.js +43 -0
  150. package/dist/components/divider/divider.vue.d.ts +89 -0
  151. package/dist/components/divider/divider.vue.js +51 -0
  152. package/dist/components/divider/divider.vue2.js +5 -0
  153. package/dist/components/divider/index.d.ts +3 -0
  154. package/dist/components/divider/index.js +2 -0
  155. package/dist/components/index.d.ts +10 -0
  156. package/dist/components/spinner/index.d.ts +3 -0
  157. package/dist/components/spinner/index.js +2 -0
  158. package/dist/components/spinner/spinner.styles.d.ts +112 -0
  159. package/dist/components/spinner/spinner.styles.js +47 -0
  160. package/dist/components/spinner/spinner.vue.d.ts +31 -0
  161. package/dist/components/spinner/spinner.vue.js +102 -0
  162. package/dist/components/spinner/spinner.vue2.js +5 -0
  163. package/dist/components/types/shared-types.d.ts +4 -0
  164. package/dist/index.d.ts +2 -0
  165. package/dist/index.js +54 -0
  166. package/package.json +94 -0
@@ -0,0 +1,144 @@
1
+ import type { Colors, Sizes, Spinners, Variants } from "../types/shared-types";
2
+ /**
3
+ * Props for the VifUI Button component.
4
+ * Provides extensive configuration for variant, size, state, and accessibility.
5
+ */
6
+ export interface ButtonProps {
7
+ /**
8
+ * Defines the visual style of the button.
9
+ *
10
+ * @type {"primary" | "secondary" | "soft" | "ghost" | "outline" | "danger" | "shadow"}
11
+ * @default "primary"
12
+ * @example
13
+ * ```vue
14
+ * <Button variant="secondary">Cancel</Button>
15
+ * ```
16
+ */
17
+ variant?: Variants;
18
+ /**
19
+ * Defines the button color scheme.
20
+ * @type {"neutral" | "brand" | "success" | "warning" | "danger"}
21
+ * @default "brand"
22
+ */
23
+ color?: Colors;
24
+ /**
25
+ * Controls the overall button size.
26
+ *
27
+ * @type {"xs" | "sm" | "md" | "lg" | "xl"}
28
+ * @default "md"
29
+ * @example
30
+ * ```vue
31
+ * <Button size="lg">Large Button</Button>
32
+ * ```
33
+ */
34
+ size?: Sizes;
35
+ /**
36
+ * Renders an icon-only button (square with equal width and height).
37
+ * Automatically centers slot content.
38
+ *
39
+ * @default false
40
+ * @example
41
+ * ```vue
42
+ * <Button isIconOnly><Icon icon="gravity-ui:plus" /></Button>
43
+ * ```
44
+ */
45
+ isIconOnly?: boolean;
46
+ /**
47
+ * Custom class names for extending or overriding styles.
48
+ *
49
+ * @example
50
+ * ```vue
51
+ * <Button class="rounded-full">Rounded Button</Button>
52
+ * ```
53
+ */
54
+ class?: string;
55
+ /**
56
+ * Disables the button, preventing interaction.
57
+ * Also sets `aria-disabled` for accessibility.
58
+ *
59
+ * @default false
60
+ */
61
+ disabled?: boolean;
62
+ /**
63
+ * Shows a loading spinner and disables user interaction.
64
+ *
65
+ * @default false
66
+ * @example
67
+ * ```vue
68
+ * <Button :isPending="loading">Loading...</Button>
69
+ * ```
70
+ */
71
+ isPending?: boolean;
72
+ /**
73
+ * Defines the button type when rendered as a `<button>` element.
74
+ *
75
+ * @default "button"
76
+ */
77
+ type?: "button" | "submit" | "reset";
78
+ /**
79
+ * Accessible label (for icon-only buttons or ARIA usage).
80
+ */
81
+ ariaLabel?: string;
82
+ /**
83
+ * Spinner animation type displayed when `isPending` is true.
84
+ *
85
+ * @default "default"
86
+ */
87
+ spinnerType?: Spinners;
88
+ /**
89
+ * When provided, renders as an anchor tag (`<a>`) instead of `<button>`.
90
+ *
91
+ * @example
92
+ * ```vue
93
+ * <Button href="https://veroui.com" target="_blank">Visit Site</Button>
94
+ * ```
95
+ */
96
+ href?: string;
97
+ /**
98
+ * Target for link navigation when using `href`.
99
+ *
100
+ * @default "_self"
101
+ */
102
+ target?: "_blank" | "_self" | "_parent" | "_top";
103
+ /**
104
+ * Rel attribute for link security and SEO when using `href`.
105
+ *
106
+ * @default "noopener noreferrer" (when target is "_blank")
107
+ */
108
+ rel?: string;
109
+ /**
110
+ * Enables the ripple effect on click.
111
+ *
112
+ * @default true
113
+ */
114
+ ripple?: boolean;
115
+ }
116
+ declare var __VLS_15: {
117
+ isPending: boolean;
118
+ isDisabled: boolean;
119
+ };
120
+ type __VLS_Slots = {} & {
121
+ default?: (props: typeof __VLS_15) => any;
122
+ };
123
+ declare const __VLS_component: import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
124
+ click: (event: MouseEvent) => any;
125
+ }, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{
126
+ onClick?: ((event: MouseEvent) => any) | undefined;
127
+ }>, {
128
+ size: Sizes;
129
+ variant: Variants;
130
+ color: Colors;
131
+ type: "button" | "submit" | "reset";
132
+ disabled: boolean;
133
+ isIconOnly: boolean;
134
+ isPending: boolean;
135
+ spinnerType: Spinners;
136
+ ripple: boolean;
137
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
138
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
139
+ export default _default;
140
+ type __VLS_WithSlots<T, S> = T & {
141
+ new (): {
142
+ $slots: S;
143
+ };
144
+ };
@@ -0,0 +1,131 @@
1
+ import { defineComponent, ref, computed, createBlock, openBlock, resolveDynamicComponent, normalizeClass, withCtx, createElementBlock, createCommentVNode, createElementVNode, createVNode, unref, renderSlot } from 'vue';
2
+ import { buttonVariants } from './button.styles.js';
3
+ import _sfc_main$1 from '../spinner/spinner.vue.js';
4
+
5
+ const _hoisted_1 = {
6
+ key: 0,
7
+ class: "vif-button__loader",
8
+ "aria-hidden": "true"
9
+ };
10
+ var _sfc_main = /* @__PURE__ */ defineComponent({
11
+ __name: "button",
12
+ props: {
13
+ variant: { type: String, required: false, default: "primary" },
14
+ color: { type: String, required: false, default: "brand" },
15
+ size: { type: String, required: false, default: "md" },
16
+ isIconOnly: { type: Boolean, required: false, default: false },
17
+ class: { type: String, required: false },
18
+ disabled: { type: Boolean, required: false, default: false },
19
+ isPending: { type: Boolean, required: false, default: false },
20
+ type: { type: String, required: false, default: "button" },
21
+ ariaLabel: { type: String, required: false },
22
+ spinnerType: { type: String, required: false, default: "default" },
23
+ href: { type: String, required: false },
24
+ target: { type: String, required: false },
25
+ rel: { type: String, required: false },
26
+ ripple: { type: Boolean, required: false, default: true }
27
+ },
28
+ emits: ["click"],
29
+ setup(__props, { emit: __emit }) {
30
+ const props = __props;
31
+ const emit = __emit;
32
+ const buttonRef = ref(null);
33
+ const classes = computed(
34
+ () => buttonVariants({
35
+ variant: props.variant,
36
+ color: props.color,
37
+ size: props.size,
38
+ isIconOnly: props.isIconOnly,
39
+ class: props.class
40
+ })
41
+ );
42
+ const createRipple = (event) => {
43
+ if (!props.ripple || !buttonRef.value) return;
44
+ const button = buttonRef.value;
45
+ const ripple = document.createElement("span");
46
+ ripple.classList.add("vif-button__ripple");
47
+ const rect = button.getBoundingClientRect();
48
+ const x = event.clientX - rect.left;
49
+ const y = event.clientY - rect.top;
50
+ ripple.style.left = `${x}px`;
51
+ ripple.style.top = `${y}px`;
52
+ button.appendChild(ripple);
53
+ ripple.addEventListener("animationend", () => {
54
+ ripple.remove();
55
+ });
56
+ };
57
+ const handleClick = (event) => {
58
+ if (!props.disabled && !props.isPending) {
59
+ createRipple(event);
60
+ emit("click", event);
61
+ }
62
+ };
63
+ const isDisabled = computed(() => props.disabled || props.isPending);
64
+ const componentTag = computed(() => props.href ? "a" : "button");
65
+ const spinnerSize = computed(() => props.size || "sm");
66
+ const spinnerContainerSize = computed(() => {
67
+ const sizeMap = {
68
+ xs: "h-3.5 w-3.5",
69
+ sm: "h-3.5 w-3.5",
70
+ md: "h-4 w-4",
71
+ lg: "h-5 w-5",
72
+ xl: "h-5 w-5"
73
+ };
74
+ return sizeMap[props.size || "md"];
75
+ });
76
+ return (_ctx, _cache) => {
77
+ return openBlock(), createBlock(resolveDynamicComponent(componentTag.value), {
78
+ ref_key: "buttonRef",
79
+ ref: buttonRef,
80
+ class: normalizeClass([classes.value, { "vif-button--loading": __props.isPending }]),
81
+ type: !__props.href ? __props.type : void 0,
82
+ href: __props.href,
83
+ target: __props.href && __props.target,
84
+ rel: __props.href && __props.target === "_blank" ? __props.rel || "noopener noreferrer" : __props.rel,
85
+ disabled: !__props.href ? isDisabled.value : void 0,
86
+ "aria-disabled": isDisabled.value,
87
+ "aria-label": __props.ariaLabel,
88
+ "data-pending": __props.isPending || void 0,
89
+ onClick: handleClick
90
+ }, {
91
+ default: withCtx(() => [
92
+ __props.isPending ? (openBlock(), createElementBlock("span", _hoisted_1, [
93
+ createElementVNode(
94
+ "div",
95
+ {
96
+ class: normalizeClass(spinnerContainerSize.value)
97
+ },
98
+ [
99
+ createVNode(unref(_sfc_main$1), {
100
+ size: spinnerSize.value,
101
+ type: __props.spinnerType,
102
+ color: "current"
103
+ }, null, 8, ["size", "type"])
104
+ ],
105
+ 2
106
+ /* CLASS */
107
+ )
108
+ ])) : createCommentVNode("v-if", true),
109
+ createElementVNode(
110
+ "span",
111
+ {
112
+ class: normalizeClass(__props.isPending ? "opacity-0" : "vif-button__content")
113
+ },
114
+ [
115
+ renderSlot(_ctx.$slots, "default", {
116
+ isPending: __props.isPending,
117
+ isDisabled: isDisabled.value
118
+ })
119
+ ],
120
+ 2
121
+ /* CLASS */
122
+ )
123
+ ]),
124
+ _: 3
125
+ /* FORWARDED */
126
+ }, 8, ["class", "type", "href", "target", "rel", "disabled", "aria-disabled", "aria-label", "data-pending"]);
127
+ };
128
+ }
129
+ });
130
+
131
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './button.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,3 @@
1
+ export { default as Button } from './button.vue';
2
+ export { buttonVariants, type ButtonVariantProps } from './button.styles';
3
+ export type { ButtonProps } from './button.vue';
@@ -0,0 +1,2 @@
1
+ export { default as Button } from './button.vue.js';
2
+ export { buttonVariants } from './button.styles.js';
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Props for the VifUI CardBody component.
3
+ * Wraps the main content area of a card, typically used for
4
+ * text, images, or other media.
5
+ */
6
+ export interface CardBodyProps {
7
+ /**
8
+ * Custom class names for the card body wrapper.
9
+ * Applied directly to the `<div>` element.
10
+ *
11
+ * @example
12
+ * ```vue
13
+ * <CardBody class="p-4 text-gray-700" />
14
+ * ```
15
+ */
16
+ class?: string;
17
+ }
18
+ declare var __VLS_1: {};
19
+ type __VLS_Slots = {} & {
20
+ default?: (props: typeof __VLS_1) => any;
21
+ };
22
+ declare const __VLS_component: import("vue").DefineComponent<CardBodyProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardBodyProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
24
+ export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -0,0 +1,27 @@
1
+ import { defineComponent, inject, createElementBlock, openBlock, normalizeClass, unref, renderSlot } from 'vue';
2
+
3
+ var _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "card-body",
5
+ props: {
6
+ class: { type: String, required: false }
7
+ },
8
+ setup(__props) {
9
+ const props = __props;
10
+ const slots = inject("cardSlots", null);
11
+ return (_ctx, _cache) => {
12
+ return openBlock(), createElementBlock(
13
+ "div",
14
+ {
15
+ class: normalizeClass([unref(slots)?.body?.(), props.class])
16
+ },
17
+ [
18
+ renderSlot(_ctx.$slots, "default")
19
+ ],
20
+ 2
21
+ /* CLASS */
22
+ );
23
+ };
24
+ }
25
+ });
26
+
27
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './card-body.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Props for the VifUI CardFooter component.
3
+ * Wraps the bottom section of a card, typically used for
4
+ * actions, buttons, or supplementary information.
5
+ */
6
+ export interface CardFooterProps {
7
+ /**
8
+ * Custom class names for the card footer wrapper.
9
+ * Applied directly to the `<div>` element.
10
+ *
11
+ * @example
12
+ * ```vue
13
+ * <CardFooter class="flex justify-end p-4 gap-2" />
14
+ * ```
15
+ */
16
+ class?: string;
17
+ }
18
+ declare var __VLS_1: {};
19
+ type __VLS_Slots = {} & {
20
+ default?: (props: typeof __VLS_1) => any;
21
+ };
22
+ declare const __VLS_component: import("vue").DefineComponent<CardFooterProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardFooterProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
24
+ export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -0,0 +1,27 @@
1
+ import { defineComponent, inject, createElementBlock, openBlock, normalizeClass, unref, renderSlot } from 'vue';
2
+
3
+ var _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "card-footer",
5
+ props: {
6
+ class: { type: String, required: false }
7
+ },
8
+ setup(__props) {
9
+ const props = __props;
10
+ const slots = inject("cardSlots", null);
11
+ return (_ctx, _cache) => {
12
+ return openBlock(), createElementBlock(
13
+ "div",
14
+ {
15
+ class: normalizeClass([unref(slots)?.footer?.(), props.class])
16
+ },
17
+ [
18
+ renderSlot(_ctx.$slots, "default")
19
+ ],
20
+ 2
21
+ /* CLASS */
22
+ );
23
+ };
24
+ }
25
+ });
26
+
27
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './card-footer.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Props for the VifUI CardHeader component.
3
+ * Wraps the top section of a card, typically used for titles,
4
+ * badges, or action buttons.
5
+ */
6
+ export interface CardHeaderProps {
7
+ /**
8
+ * Custom class names for the card header wrapper.
9
+ * Applied directly to the `<div>` element.
10
+ *
11
+ * @example
12
+ * ```vue
13
+ * <CardHeader class="flex justify-between items-center p-4" />
14
+ * ```
15
+ */
16
+ class?: string;
17
+ }
18
+ declare var __VLS_1: {};
19
+ type __VLS_Slots = {} & {
20
+ default?: (props: typeof __VLS_1) => any;
21
+ };
22
+ declare const __VLS_component: import("vue").DefineComponent<CardHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardHeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
24
+ export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -0,0 +1,27 @@
1
+ import { defineComponent, inject, createElementBlock, openBlock, normalizeClass, unref, renderSlot } from 'vue';
2
+
3
+ var _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "card-header",
5
+ props: {
6
+ class: { type: String, required: false }
7
+ },
8
+ setup(__props) {
9
+ const props = __props;
10
+ const slots = inject("cardSlots", null);
11
+ return (_ctx, _cache) => {
12
+ return openBlock(), createElementBlock(
13
+ "div",
14
+ {
15
+ class: normalizeClass([unref(slots)?.header?.(), props.class])
16
+ },
17
+ [
18
+ renderSlot(_ctx.$slots, "default")
19
+ ],
20
+ 2
21
+ /* CLASS */
22
+ );
23
+ };
24
+ }
25
+ });
26
+
27
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './card-header.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Props for the VifUI CardMedia component.
3
+ * Displays media content Displays media content (images or videos) within a card.
4
+ * Supports various aspect ratios and object-fit options.
5
+ */
6
+ export interface CardMediaProps {
7
+ src?: string;
8
+ alt?: string;
9
+ /**
10
+ * Aspect ratio of the media container.
11
+ * - `"auto"` — Uses natural image dimensions (no extra space)
12
+ * - `"square"` — 1:1 ratio
13
+ * - `"video"` — 16:9 ratio
14
+ * - `"portrait"` — 3:4 ratio
15
+ */
16
+ ratio?: "auto" | "square" | "video" | "portrait";
17
+ /**
18
+ * Object fit behavior for the media content.
19
+ * - `"cover"` — Fills container, may crop (default)
20
+ * - `"contain"` — Fits inside container, may show letterboxing
21
+ * - `"fill"` — Stretches to fill container
22
+ * - `"none"` — Original size
23
+ * - `"scale-down"` — Smaller of none/contain
24
+ */
25
+ objectFit?: "cover" | "contain" | "fill" | "none" | "scale-down";
26
+ loading?: "lazy" | "eager";
27
+ class?: string;
28
+ }
29
+ declare var __VLS_1: {};
30
+ type __VLS_Slots = {} & {
31
+ default?: (props: typeof __VLS_1) => any;
32
+ };
33
+ declare const __VLS_component: import("vue").DefineComponent<CardMediaProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardMediaProps> & Readonly<{}>, {
34
+ loading: "lazy" | "eager";
35
+ ratio: "auto" | "square" | "video" | "portrait";
36
+ objectFit: "cover" | "contain" | "fill" | "none" | "scale-down";
37
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
38
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
39
+ export default _default;
40
+ type __VLS_WithSlots<T, S> = T & {
41
+ new (): {
42
+ $slots: S;
43
+ };
44
+ };
@@ -0,0 +1,56 @@
1
+ import { defineComponent, inject, computed, createElementBlock, openBlock, normalizeClass, renderSlot, createCommentVNode } from 'vue';
2
+
3
+ const _hoisted_1 = ["src", "alt", "loading"];
4
+ var _sfc_main = /* @__PURE__ */ defineComponent({
5
+ __name: "card-media",
6
+ props: {
7
+ src: { type: String, required: false },
8
+ alt: { type: String, required: false },
9
+ ratio: { type: String, required: false, default: "auto" },
10
+ objectFit: { type: String, required: false, default: "cover" },
11
+ loading: { type: String, required: false, default: "lazy" },
12
+ class: { type: String, required: false }
13
+ },
14
+ setup(__props) {
15
+ const props = __props;
16
+ const slots = inject("cardSlots", null);
17
+ const ratioClass = computed(() => {
18
+ if (props.ratio === "auto") return "";
19
+ return `vif-card__media--${props.ratio}`;
20
+ });
21
+ const mediaClasses = computed(() => [
22
+ slots?.value?.media?.(),
23
+ ratioClass.value,
24
+ props.class
25
+ ]);
26
+ const imageClasses = computed(() => {
27
+ if (props.ratio === "auto") {
28
+ return ["w-full", "h-auto", "block"];
29
+ }
30
+ return [`object-${props.objectFit}`];
31
+ });
32
+ return (_ctx, _cache) => {
33
+ return openBlock(), createElementBlock(
34
+ "div",
35
+ {
36
+ class: normalizeClass(mediaClasses.value)
37
+ },
38
+ [
39
+ renderSlot(_ctx.$slots, "default", {}, () => [
40
+ __props.src ? (openBlock(), createElementBlock("img", {
41
+ key: 0,
42
+ src: __props.src,
43
+ alt: __props.alt,
44
+ class: normalizeClass(imageClasses.value),
45
+ loading: __props.loading
46
+ }, null, 10, _hoisted_1)) : createCommentVNode("v-if", true)
47
+ ])
48
+ ],
49
+ 2
50
+ /* CLASS */
51
+ );
52
+ };
53
+ }
54
+ });
55
+
56
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './card-media.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };