@vifui/core 0.4.0-alpha.6 → 0.6.0-alpha.8

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 (164) hide show
  1. package/README.md +13 -19
  2. package/dist/components/accordion/accordion-body.vue.d.ts +2 -1
  3. package/dist/components/accordion/accordion-body.vue.js +1 -1
  4. package/dist/components/accordion/accordion-content.vue.d.ts +2 -1
  5. package/dist/components/accordion/accordion-content.vue.js +1 -1
  6. package/dist/components/accordion/accordion-header.vue.d.ts +2 -1
  7. package/dist/components/accordion/accordion-header.vue.js +1 -1
  8. package/dist/components/accordion/accordion-indicator.vue.d.ts +2 -1
  9. package/dist/components/accordion/accordion-indicator.vue.js +1 -1
  10. package/dist/components/accordion/accordion-item.vue.d.ts +2 -1
  11. package/dist/components/accordion/accordion-item.vue.js +1 -1
  12. package/dist/components/accordion/accordion-root.vue.d.ts +2 -1
  13. package/dist/components/accordion/accordion-root.vue.js +1 -1
  14. package/dist/components/accordion/accordion-trigger.vue.d.ts +2 -1
  15. package/dist/components/accordion/accordion-trigger.vue.js +1 -1
  16. package/dist/components/accordion/index.d.ts +15 -15
  17. package/dist/components/alert/alert-body.vue.d.ts +2 -2
  18. package/dist/components/alert/alert-body.vue.js +1 -1
  19. package/dist/components/alert/alert-close.vue.d.ts +2 -1
  20. package/dist/components/alert/alert-close.vue.js +17 -5
  21. package/dist/components/alert/alert-content.vue.d.ts +5 -5
  22. package/dist/components/alert/alert-content.vue.js +2 -5
  23. package/dist/components/alert/alert-description.vue.d.ts +3 -3
  24. package/dist/components/alert/alert-description.vue.js +2 -5
  25. package/dist/components/alert/alert-footer.vue.d.ts +2 -2
  26. package/dist/components/alert/alert-footer.vue.js +1 -1
  27. package/dist/components/alert/alert-header.vue.d.ts +3 -3
  28. package/dist/components/alert/alert-header.vue.js +2 -5
  29. package/dist/components/alert/alert-icon.vue.d.ts +3 -2
  30. package/dist/components/alert/alert-icon.vue.js +1 -1
  31. package/dist/components/alert/alert-root.vue.d.ts +2 -2
  32. package/dist/components/alert/alert-root.vue.js +6 -2
  33. package/dist/components/alert/alert-title.vue.d.ts +3 -3
  34. package/dist/components/alert/alert-title.vue.js +2 -5
  35. package/dist/components/alert/index.d.ts +19 -19
  36. package/dist/components/avatar/avatar-fallback.vue.d.ts +2 -2
  37. package/dist/components/avatar/avatar-fallback.vue.js +1 -1
  38. package/dist/components/avatar/avatar-group.vue.d.ts +2 -2
  39. package/dist/components/avatar/avatar-group.vue.js +1 -1
  40. package/dist/components/avatar/avatar-image.vue.d.ts +2 -2
  41. package/dist/components/avatar/avatar-image.vue.js +1 -1
  42. package/dist/components/avatar/avatar-root.vue.d.ts +2 -2
  43. package/dist/components/avatar/avatar-root.vue.js +1 -1
  44. package/dist/components/avatar/index.d.ts +9 -9
  45. package/dist/components/badge/badge.vue.d.ts +2 -1
  46. package/dist/components/badge/badge.vue.js +1 -1
  47. package/dist/components/badge/index.d.ts +3 -3
  48. package/dist/components/breadcrumb/breadcrumb-current-link.vue.d.ts +2 -1
  49. package/dist/components/breadcrumb/breadcrumb-current-link.vue.js +1 -1
  50. package/dist/components/breadcrumb/breadcrumb-item.vue.d.ts +2 -1
  51. package/dist/components/breadcrumb/breadcrumb-item.vue.js +1 -1
  52. package/dist/components/breadcrumb/breadcrumb-link.vue.d.ts +2 -1
  53. package/dist/components/breadcrumb/breadcrumb-link.vue.js +1 -1
  54. package/dist/components/breadcrumb/breadcrumb-list.vue.d.ts +2 -1
  55. package/dist/components/breadcrumb/breadcrumb-list.vue.js +1 -1
  56. package/dist/components/breadcrumb/breadcrumb-root.vue.d.ts +2 -1
  57. package/dist/components/breadcrumb/breadcrumb-root.vue.js +1 -1
  58. package/dist/components/breadcrumb/breadcrumb-separator.vue.d.ts +2 -1
  59. package/dist/components/breadcrumb/breadcrumb-separator.vue.js +1 -1
  60. package/dist/components/breadcrumb/index.d.ts +1 -1
  61. package/dist/components/button/button.vue.d.ts +3 -2
  62. package/dist/components/button/button.vue.js +6 -26
  63. package/dist/components/button/index.d.ts +3 -3
  64. package/dist/components/card/card-body.vue.d.ts +2 -1
  65. package/dist/components/card/card-body.vue.js +1 -1
  66. package/dist/components/card/card-footer.vue.d.ts +2 -1
  67. package/dist/components/card/card-footer.vue.js +1 -1
  68. package/dist/components/card/card-header.vue.d.ts +2 -1
  69. package/dist/components/card/card-header.vue.js +1 -1
  70. package/dist/components/card/card-media.vue.d.ts +2 -1
  71. package/dist/components/card/card-media.vue.js +1 -1
  72. package/dist/components/card/card-root.vue.d.ts +2 -1
  73. package/dist/components/card/card-root.vue.js +1 -1
  74. package/dist/components/checkbox/checkbox-group-item.vue.d.ts +2 -1
  75. package/dist/components/checkbox/checkbox-group-item.vue.js +1 -1
  76. package/dist/components/checkbox/checkbox-group.vue.d.ts +2 -1
  77. package/dist/components/checkbox/checkbox-group.vue.js +1 -1
  78. package/dist/components/checkbox/checkbox-indicator.vue.d.ts +2 -1
  79. package/dist/components/checkbox/checkbox-indicator.vue.js +1 -1
  80. package/dist/components/checkbox/checkbox-label.vue.d.ts +2 -1
  81. package/dist/components/checkbox/checkbox-label.vue.js +1 -1
  82. package/dist/components/checkbox/checkbox-root.vue.d.ts +2 -1
  83. package/dist/components/checkbox/checkbox-root.vue.js +1 -1
  84. package/dist/components/divider/divider.vue.d.ts +2 -1
  85. package/dist/components/divider/divider.vue.js +1 -1
  86. package/dist/components/divider/index.d.ts +3 -3
  87. package/dist/components/index.d.ts +3 -0
  88. package/dist/components/list/index.d.ts +19 -0
  89. package/dist/components/list/index.js +10 -0
  90. package/dist/components/list/list-avatar.vue.d.ts +19 -0
  91. package/dist/components/list/list-avatar.vue.js +27 -0
  92. package/dist/components/list/list-avatar.vue2.js +5 -0
  93. package/dist/components/list/list-content.vue.d.ts +19 -0
  94. package/dist/components/list/list-content.vue.js +27 -0
  95. package/dist/components/list/list-content.vue2.js +5 -0
  96. package/dist/components/list/list-header.vue.d.ts +31 -0
  97. package/dist/components/list/list-header.vue.js +32 -0
  98. package/dist/components/list/list-header.vue2.js +5 -0
  99. package/dist/components/list/list-icon.vue.d.ts +19 -0
  100. package/dist/components/list/list-icon.vue.js +27 -0
  101. package/dist/components/list/list-icon.vue2.js +5 -0
  102. package/dist/components/list/list-item.vue.d.ts +46 -0
  103. package/dist/components/list/list-item.vue.js +60 -0
  104. package/dist/components/list/list-item.vue2.js +5 -0
  105. package/dist/components/list/list-root.vue.d.ts +52 -0
  106. package/dist/components/list/list-root.vue.js +38 -0
  107. package/dist/components/list/list-root.vue2.js +5 -0
  108. package/dist/components/list/list-slot.vue.d.ts +19 -0
  109. package/dist/components/list/list-slot.vue.js +27 -0
  110. package/dist/components/list/list-slot.vue2.js +5 -0
  111. package/dist/components/list/list-subtitle.vue.d.ts +19 -0
  112. package/dist/components/list/list-subtitle.vue.js +27 -0
  113. package/dist/components/list/list-subtitle.vue2.js +5 -0
  114. package/dist/components/list/list-title.vue.d.ts +19 -0
  115. package/dist/components/list/list-title.vue.js +27 -0
  116. package/dist/components/list/list-title.vue2.js +5 -0
  117. package/dist/components/list/list.styles.d.ts +129 -0
  118. package/dist/components/list/list.styles.js +53 -0
  119. package/dist/components/spinner/index.d.ts +3 -3
  120. package/dist/components/spinner/spinner.vue.d.ts +2 -1
  121. package/dist/components/spinner/spinner.vue.js +1 -1
  122. package/dist/components/tabs/index.d.ts +11 -0
  123. package/dist/components/tabs/index.js +6 -0
  124. package/dist/components/tabs/tabs-content.vue.d.ts +25 -0
  125. package/dist/components/tabs/tabs-content.vue.js +37 -0
  126. package/dist/components/tabs/tabs-content.vue2.js +5 -0
  127. package/dist/components/tabs/tabs-indicator.vue.d.ts +25 -0
  128. package/dist/components/tabs/tabs-indicator.vue.js +35 -0
  129. package/dist/components/tabs/tabs-indicator.vue2.js +5 -0
  130. package/dist/components/tabs/tabs-list.vue.d.ts +26 -0
  131. package/dist/components/tabs/tabs-list.vue.js +36 -0
  132. package/dist/components/tabs/tabs-list.vue2.js +5 -0
  133. package/dist/components/tabs/tabs-root.vue.d.ts +39 -0
  134. package/dist/components/tabs/tabs-root.vue.js +44 -0
  135. package/dist/components/tabs/tabs-root.vue2.js +5 -0
  136. package/dist/components/tabs/tabs-trigger.vue.d.ts +39 -0
  137. package/dist/components/tabs/tabs-trigger.vue.js +42 -0
  138. package/dist/components/tabs/tabs-trigger.vue2.js +5 -0
  139. package/dist/components/tabs/tabs.styles.d.ts +56 -0
  140. package/dist/components/tabs/tabs.styles.js +13 -0
  141. package/dist/components/tooltip/index.d.ts +13 -0
  142. package/dist/components/tooltip/index.js +7 -0
  143. package/dist/components/tooltip/tooltip-arrow.vue.d.ts +24 -0
  144. package/dist/components/tooltip/tooltip-arrow.vue.js +37 -0
  145. package/dist/components/tooltip/tooltip-arrow.vue2.js +5 -0
  146. package/dist/components/tooltip/tooltip-content.vue.d.ts +34 -0
  147. package/dist/components/tooltip/tooltip-content.vue.js +51 -0
  148. package/dist/components/tooltip/tooltip-content.vue2.js +5 -0
  149. package/dist/components/tooltip/tooltip-portal.vue.d.ts +18 -0
  150. package/dist/components/tooltip/tooltip-portal.vue.js +33 -0
  151. package/dist/components/tooltip/tooltip-portal.vue2.js +5 -0
  152. package/dist/components/tooltip/tooltip-provider.vue.d.ts +23 -0
  153. package/dist/components/tooltip/tooltip-provider.vue.js +35 -0
  154. package/dist/components/tooltip/tooltip-provider.vue2.js +5 -0
  155. package/dist/components/tooltip/tooltip-root.vue.d.ts +30 -0
  156. package/dist/components/tooltip/tooltip-root.vue.js +38 -0
  157. package/dist/components/tooltip/tooltip-root.vue2.js +5 -0
  158. package/dist/components/tooltip/tooltip-trigger.vue.d.ts +24 -0
  159. package/dist/components/tooltip/tooltip-trigger.vue.js +32 -0
  160. package/dist/components/tooltip/tooltip-trigger.vue2.js +5 -0
  161. package/dist/components/tooltip/tooltip.styles.d.ts +62 -0
  162. package/dist/components/tooltip/tooltip.styles.js +14 -0
  163. package/dist/index.js +23 -0
  164. package/package.json +3 -3
@@ -7,7 +7,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  props: {
8
8
  color: { type: String, required: false, default: "brand" },
9
9
  size: { type: String, required: false, default: "md" },
10
- class: { type: String, required: false },
10
+ class: { type: null, required: false },
11
11
  defaultValue: { type: [Boolean, String], required: false },
12
12
  modelValue: { type: [Boolean, String, null], required: false },
13
13
  disabled: { type: Boolean, required: false },
@@ -1,3 +1,4 @@
1
+ import { type HTMLAttributes } from "vue";
1
2
  import type { Colors, Sizes } from "../types/shared-types";
2
3
  /**
3
4
  * Props for the VifUI Divider component.
@@ -67,7 +68,7 @@ export interface DividerProps {
67
68
  * <Divider class="my-8" />
68
69
  * ```
69
70
  */
70
- class?: string;
71
+ class?: HTMLAttributes["class"];
71
72
  }
72
73
  declare var __VLS_1: {};
73
74
  type __VLS_Slots = {} & {
@@ -14,7 +14,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
14
14
  size: { type: String, required: false, default: "sm" },
15
15
  color: { type: String, required: false, default: "neutral" },
16
16
  labelPosition: { type: String, required: false, default: "center" },
17
- class: { type: String, required: false }
17
+ class: { type: null, required: false }
18
18
  },
19
19
  setup(__props) {
20
20
  const props = __props;
@@ -1,3 +1,3 @@
1
- export { default as Divider } from './divider.vue';
2
- export { dividerVariants, type DividerVariantProps } from './divider.styles';
3
- export type { DividerProps } from './divider.vue';
1
+ export { default as Divider } from "./divider.vue";
2
+ export { dividerVariants, type DividerVariantProps } from "./divider.styles";
3
+ export type { DividerProps } from "./divider.vue";
@@ -6,5 +6,8 @@ export * from "./button";
6
6
  export * from "./card";
7
7
  export * from "./checkbox";
8
8
  export * from "./divider";
9
+ export * from "./list";
9
10
  export * from "./spinner";
10
11
  export * from "./alert";
12
+ export * from "./tooltip";
13
+ export * from "./tabs";
@@ -0,0 +1,19 @@
1
+ export { default as ListRoot } from "./list-root.vue";
2
+ export { default as ListHeader } from "./list-header.vue";
3
+ export { default as ListItem } from "./list-item.vue";
4
+ export { default as ListIcon } from "./list-icon.vue";
5
+ export { default as ListAvatar } from "./list-avatar.vue";
6
+ export { default as ListContent } from "./list-content.vue";
7
+ export { default as ListTitle } from "./list-title.vue";
8
+ export { default as ListSubtitle } from "./list-subtitle.vue";
9
+ export { default as ListSlot } from "./list-slot.vue";
10
+ export { listVariants, type ListVariantProps } from "./list.styles";
11
+ export type { ListRootProps } from "./list-root.vue";
12
+ export type { ListHeaderProps } from "./list-header.vue";
13
+ export type { ListItemProps } from "./list-item.vue";
14
+ export type { ListIconProps } from "./list-icon.vue";
15
+ export type { ListAvatarProps } from "./list-avatar.vue";
16
+ export type { ListContentProps } from "./list-content.vue";
17
+ export type { ListTitleProps } from "./list-title.vue";
18
+ export type { ListSubtitleProps } from "./list-subtitle.vue";
19
+ export type { ListSlotProps } from "./list-slot.vue";
@@ -0,0 +1,10 @@
1
+ export { default as ListRoot } from './list-root.vue.js';
2
+ export { default as ListHeader } from './list-header.vue.js';
3
+ export { default as ListItem } from './list-item.vue.js';
4
+ export { default as ListIcon } from './list-icon.vue.js';
5
+ export { default as ListAvatar } from './list-avatar.vue.js';
6
+ export { default as ListContent } from './list-content.vue.js';
7
+ export { default as ListTitle } from './list-title.vue.js';
8
+ export { default as ListSubtitle } from './list-subtitle.vue.js';
9
+ export { default as ListSlot } from './list-slot.vue.js';
10
+ export { listVariants } from './list.styles.js';
@@ -0,0 +1,19 @@
1
+ import { type HTMLAttributes } from "vue";
2
+ export interface ListAvatarProps {
3
+ /**
4
+ * Custom class names.
5
+ */
6
+ class?: HTMLAttributes["class"];
7
+ }
8
+ declare var __VLS_1: {};
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_1) => any;
11
+ };
12
+ declare const __VLS_component: import("vue").DefineComponent<ListAvatarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ListAvatarProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,27 @@
1
+ import { defineComponent, inject, createElementBlock, openBlock, normalizeClass, unref, renderSlot } from 'vue';
2
+
3
+ var _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "list-avatar",
5
+ props: {
6
+ class: { type: null, required: false }
7
+ },
8
+ setup(__props) {
9
+ const props = __props;
10
+ const slots = inject("listSlots", null);
11
+ return (_ctx, _cache) => {
12
+ return openBlock(), createElementBlock(
13
+ "div",
14
+ {
15
+ class: normalizeClass([unref(slots)?.avatar?.(), 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 './list-avatar.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,19 @@
1
+ import { type HTMLAttributes } from "vue";
2
+ export interface ListContentProps {
3
+ /**
4
+ * Custom class names.
5
+ */
6
+ class?: HTMLAttributes["class"];
7
+ }
8
+ declare var __VLS_1: {};
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_1) => any;
11
+ };
12
+ declare const __VLS_component: import("vue").DefineComponent<ListContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ListContentProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,27 @@
1
+ import { defineComponent, inject, createElementBlock, openBlock, normalizeClass, unref, renderSlot } from 'vue';
2
+
3
+ var _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "list-content",
5
+ props: {
6
+ class: { type: null, required: false }
7
+ },
8
+ setup(__props) {
9
+ const props = __props;
10
+ const slots = inject("listSlots", null);
11
+ return (_ctx, _cache) => {
12
+ return openBlock(), createElementBlock(
13
+ "div",
14
+ {
15
+ class: normalizeClass([unref(slots)?.content?.(), 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 './list-content.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,31 @@
1
+ import { type HTMLAttributes } from "vue";
2
+ import type { Colors } from "../types/shared-types";
3
+ export interface ListHeaderProps {
4
+ /**
5
+ * Color of the header text.
6
+ */
7
+ color?: Colors;
8
+ /**
9
+ * HTML heading level for semantic structure.
10
+ * @default "div"
11
+ */
12
+ as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
13
+ /**
14
+ * Custom class names.
15
+ */
16
+ class?: HTMLAttributes["class"];
17
+ }
18
+ declare var __VLS_6: {};
19
+ type __VLS_Slots = {} & {
20
+ default?: (props: typeof __VLS_6) => any;
21
+ };
22
+ declare const __VLS_component: import("vue").DefineComponent<ListHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ListHeaderProps> & Readonly<{}>, {
23
+ as: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
24
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
26
+ export default _default;
27
+ type __VLS_WithSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -0,0 +1,32 @@
1
+ import { defineComponent, inject, computed, createBlock, openBlock, resolveDynamicComponent, normalizeClass, withCtx, renderSlot } from 'vue';
2
+
3
+ var _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "list-header",
5
+ props: {
6
+ color: { type: String, required: false },
7
+ as: { type: String, required: false, default: "div" },
8
+ class: { type: null, required: false }
9
+ },
10
+ setup(__props) {
11
+ const props = __props;
12
+ const slots = inject("listSlots", null);
13
+ const headerClasses = computed(() => {
14
+ const baseClass = slots?.value?.header?.();
15
+ const colorClass = props.color ? `vif-list__header--${props.color}` : "";
16
+ return [baseClass, colorClass, props.class];
17
+ });
18
+ return (_ctx, _cache) => {
19
+ return openBlock(), createBlock(resolveDynamicComponent(__props.as), {
20
+ class: normalizeClass(headerClasses.value)
21
+ }, {
22
+ default: withCtx(() => [
23
+ renderSlot(_ctx.$slots, "default")
24
+ ]),
25
+ _: 3
26
+ /* FORWARDED */
27
+ }, 8, ["class"]);
28
+ };
29
+ }
30
+ });
31
+
32
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './list-header.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,19 @@
1
+ import { type HTMLAttributes } from "vue";
2
+ export interface ListIconProps {
3
+ /**
4
+ * Custom class names.
5
+ */
6
+ class?: HTMLAttributes["class"];
7
+ }
8
+ declare var __VLS_1: {};
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_1) => any;
11
+ };
12
+ declare const __VLS_component: import("vue").DefineComponent<ListIconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ListIconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,27 @@
1
+ import { defineComponent, inject, createElementBlock, openBlock, normalizeClass, unref, renderSlot } from 'vue';
2
+
3
+ var _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "list-icon",
5
+ props: {
6
+ class: { type: null, required: false }
7
+ },
8
+ setup(__props) {
9
+ const props = __props;
10
+ const slots = inject("listSlots", null);
11
+ return (_ctx, _cache) => {
12
+ return openBlock(), createElementBlock(
13
+ "div",
14
+ {
15
+ class: normalizeClass([unref(slots)?.icon?.(), 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 './list-icon.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,46 @@
1
+ import { type HTMLAttributes } from "vue";
2
+ export interface ListItemProps {
3
+ /**
4
+ * Makes this specific item active/selected.
5
+ * @default false
6
+ */
7
+ active?: boolean;
8
+ /**
9
+ * Disables the list item.
10
+ * @default false
11
+ */
12
+ disabled?: boolean;
13
+ /**
14
+ * Makes item behave as a button (clickable).
15
+ * @default false
16
+ */
17
+ button?: boolean;
18
+ /**
19
+ * Accessible label for the item.
20
+ */
21
+ "aria-label"?: string;
22
+ /**
23
+ * Custom class names.
24
+ */
25
+ class?: HTMLAttributes["class"];
26
+ }
27
+ declare var __VLS_11: {};
28
+ type __VLS_Slots = {} & {
29
+ default?: (props: typeof __VLS_11) => any;
30
+ };
31
+ declare const __VLS_component: import("vue").DefineComponent<ListItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
32
+ click: (event: MouseEvent) => any;
33
+ }, string, import("vue").PublicProps, Readonly<ListItemProps> & Readonly<{
34
+ onClick?: ((event: MouseEvent) => any) | undefined;
35
+ }>, {
36
+ button: boolean;
37
+ disabled: boolean;
38
+ active: boolean;
39
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
40
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
41
+ export default _default;
42
+ type __VLS_WithSlots<T, S> = T & {
43
+ new (): {
44
+ $slots: S;
45
+ };
46
+ };
@@ -0,0 +1,60 @@
1
+ import { defineComponent, inject, computed, createBlock, openBlock, resolveDynamicComponent, normalizeClass, withCtx, renderSlot } from 'vue';
2
+
3
+ var _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "list-item",
5
+ props: {
6
+ active: { type: Boolean, required: false, default: false },
7
+ disabled: { type: Boolean, required: false, default: false },
8
+ button: { type: Boolean, required: false, default: false },
9
+ "aria-label": { type: String, required: false },
10
+ class: { type: null, required: false }
11
+ },
12
+ emits: ["click"],
13
+ setup(__props, { emit: __emit }) {
14
+ const props = __props;
15
+ const emit = __emit;
16
+ const slots = inject("listSlots", null);
17
+ const itemClasses = computed(() => {
18
+ const baseClass = slots?.value?.item?.();
19
+ const activeClass = props.active ? "vif-list__item--active" : "";
20
+ return [baseClass, activeClass, props.class];
21
+ });
22
+ const handleClick = (event) => {
23
+ if (!props.disabled) {
24
+ emit("click", event);
25
+ }
26
+ };
27
+ const handleKeyDown = (event) => {
28
+ if (props.button && !props.disabled && (event.key === "Enter" || event.key === " ")) {
29
+ event.preventDefault();
30
+ emit("click", event);
31
+ }
32
+ };
33
+ const elementTag = computed(() => props.button ? "button" : "div");
34
+ const tabIndex = computed(() => {
35
+ if (props.disabled) return -1;
36
+ return props.button ? 0 : void 0;
37
+ });
38
+ return (_ctx, _cache) => {
39
+ return openBlock(), createBlock(resolveDynamicComponent(elementTag.value), {
40
+ role: "listitem",
41
+ class: normalizeClass(itemClasses.value),
42
+ tabindex: tabIndex.value,
43
+ "aria-disabled": __props.disabled || void 0,
44
+ "aria-selected": __props.button && __props.active ? true : void 0,
45
+ "aria-label": props["aria-label"],
46
+ disabled: __props.button && __props.disabled ? true : void 0,
47
+ onClick: handleClick,
48
+ onKeydown: handleKeyDown
49
+ }, {
50
+ default: withCtx(() => [
51
+ renderSlot(_ctx.$slots, "default")
52
+ ]),
53
+ _: 3
54
+ /* FORWARDED */
55
+ }, 40, ["class", "tabindex", "aria-disabled", "aria-selected", "aria-label", "disabled"]);
56
+ };
57
+ }
58
+ });
59
+
60
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './list-item.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,52 @@
1
+ import { type HTMLAttributes } from "vue";
2
+ import type { Sizes } from "../types/shared-types";
3
+ /**
4
+ * Props for the VifUI ListRoot component.
5
+ */
6
+ export interface ListRootProps {
7
+ /**
8
+ * Defines the visual style of the list.
9
+ * @default "default"
10
+ */
11
+ variant?: "default" | "outline" | "shadow" | "flat" | "divided";
12
+ /**
13
+ * Controls the overall list size.
14
+ * @default "md"
15
+ */
16
+ size?: Extract<Sizes, "sm" | "md" | "lg">;
17
+ /**
18
+ * Makes list items hoverable.
19
+ * @default false
20
+ */
21
+ hoverable?: boolean;
22
+ /**
23
+ * Accessible label for the list.
24
+ * Required for screen readers.
25
+ */
26
+ "aria-label"?: string;
27
+ /**
28
+ * ID of element that labels this list.
29
+ * Alternative to aria-label.
30
+ */
31
+ "aria-labelledby"?: string;
32
+ /**
33
+ * Custom class names for extending or overriding styles.
34
+ */
35
+ class?: HTMLAttributes["class"];
36
+ }
37
+ declare var __VLS_1: {};
38
+ type __VLS_Slots = {} & {
39
+ default?: (props: typeof __VLS_1) => any;
40
+ };
41
+ declare const __VLS_component: import("vue").DefineComponent<ListRootProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ListRootProps> & Readonly<{}>, {
42
+ size: Extract<Sizes, "sm" | "md" | "lg">;
43
+ variant: "default" | "outline" | "shadow" | "flat" | "divided";
44
+ hoverable: boolean;
45
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
46
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
47
+ export default _default;
48
+ type __VLS_WithSlots<T, S> = T & {
49
+ new (): {
50
+ $slots: S;
51
+ };
52
+ };
@@ -0,0 +1,38 @@
1
+ import { defineComponent, computed, provide, createElementBlock, openBlock, normalizeClass, renderSlot } from 'vue';
2
+ import { listVariants } from './list.styles.js';
3
+
4
+ const _hoisted_1 = ["aria-label", "aria-labelledby"];
5
+ var _sfc_main = /* @__PURE__ */ defineComponent({
6
+ __name: "list-root",
7
+ props: {
8
+ variant: { type: String, required: false, default: "default" },
9
+ size: { type: String, required: false, default: "md" },
10
+ hoverable: { type: Boolean, required: false, default: false },
11
+ "aria-label": { type: String, required: false },
12
+ "aria-labelledby": { type: String, required: false },
13
+ class: { type: null, required: false }
14
+ },
15
+ setup(__props) {
16
+ const props = __props;
17
+ const slots = computed(
18
+ () => listVariants({
19
+ variant: props.variant,
20
+ size: props.size,
21
+ hoverable: props.hoverable
22
+ })
23
+ );
24
+ provide("listSlots", slots);
25
+ return (_ctx, _cache) => {
26
+ return openBlock(), createElementBlock("div", {
27
+ role: "list",
28
+ class: normalizeClass([slots.value.root(), props.class]),
29
+ "aria-label": props["aria-label"],
30
+ "aria-labelledby": props["aria-labelledby"]
31
+ }, [
32
+ renderSlot(_ctx.$slots, "default")
33
+ ], 10, _hoisted_1);
34
+ };
35
+ }
36
+ });
37
+
38
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './list-root.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,19 @@
1
+ import { type HTMLAttributes } from "vue";
2
+ export interface ListSlotProps {
3
+ /**
4
+ * Custom class names.
5
+ */
6
+ class?: HTMLAttributes["class"];
7
+ }
8
+ declare var __VLS_1: {};
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_1) => any;
11
+ };
12
+ declare const __VLS_component: import("vue").DefineComponent<ListSlotProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ListSlotProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,27 @@
1
+ import { defineComponent, inject, createElementBlock, openBlock, normalizeClass, unref, renderSlot } from 'vue';
2
+
3
+ var _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "list-slot",
5
+ props: {
6
+ class: { type: null, required: false }
7
+ },
8
+ setup(__props) {
9
+ const props = __props;
10
+ const slots = inject("listSlots", null);
11
+ return (_ctx, _cache) => {
12
+ return openBlock(), createElementBlock(
13
+ "div",
14
+ {
15
+ class: normalizeClass([unref(slots)?.slot?.(), 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 './list-slot.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,19 @@
1
+ import { type HTMLAttributes } from "vue";
2
+ export interface ListSubtitleProps {
3
+ /**
4
+ * Custom class names.
5
+ */
6
+ class?: HTMLAttributes["class"];
7
+ }
8
+ declare var __VLS_1: {};
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_1) => any;
11
+ };
12
+ declare const __VLS_component: import("vue").DefineComponent<ListSubtitleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ListSubtitleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,27 @@
1
+ import { defineComponent, inject, createElementBlock, openBlock, normalizeClass, unref, renderSlot } from 'vue';
2
+
3
+ var _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "list-subtitle",
5
+ props: {
6
+ class: { type: null, required: false }
7
+ },
8
+ setup(__props) {
9
+ const props = __props;
10
+ const slots = inject("listSlots", null);
11
+ return (_ctx, _cache) => {
12
+ return openBlock(), createElementBlock(
13
+ "div",
14
+ {
15
+ class: normalizeClass([unref(slots)?.subtitle?.(), 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 './list-subtitle.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };