@una-ui/nuxt 0.55.4 → 0.56.1

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 (42) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +1 -1
  3. package/dist/runtime/components/alert-dialog/AlertDialogAction.vue +2 -0
  4. package/dist/runtime/components/alert-dialog/AlertDialogCancel.vue +2 -0
  5. package/dist/runtime/components/combobox/ComboboxTrigger.vue +2 -0
  6. package/dist/runtime/components/drawer/DrawerClose.vue +2 -0
  7. package/dist/runtime/components/elements/Accordion.vue +2 -0
  8. package/dist/runtime/components/elements/Button.vue +4 -0
  9. package/dist/runtime/components/elements/Toggle.vue +2 -0
  10. package/dist/runtime/components/elements/dialog/DialogClose.vue +2 -0
  11. package/dist/runtime/components/elements/dropdown-menu/DropdownMenu.vue +2 -0
  12. package/dist/runtime/components/elements/dropdown-menu/DropdownMenuItem.vue +2 -0
  13. package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSubTrigger.vue +2 -0
  14. package/dist/runtime/components/elements/dropdown-menu/DropdownMenuTrigger.vue +2 -0
  15. package/dist/runtime/components/elements/pagination/PaginationFirst.vue +2 -0
  16. package/dist/runtime/components/elements/pagination/PaginationLast.vue +2 -0
  17. package/dist/runtime/components/elements/pagination/PaginationListItem.vue +2 -0
  18. package/dist/runtime/components/elements/pagination/PaginationNext.vue +2 -0
  19. package/dist/runtime/components/elements/pagination/PaginationPrev.vue +2 -0
  20. package/dist/runtime/components/elements/tabs/Tabs.vue +55 -37
  21. package/dist/runtime/components/elements/tabs/Tabs.vue.d.ts +12 -8
  22. package/dist/runtime/components/elements/tabs/TabsContent.vue +3 -5
  23. package/dist/runtime/components/elements/tabs/TabsList.vue +7 -8
  24. package/dist/runtime/components/elements/tabs/TabsList.vue.d.ts +3 -1
  25. package/dist/runtime/components/elements/tabs/TabsTrigger.vue +13 -14
  26. package/dist/runtime/components/elements/tabs/TabsTrigger.vue.d.ts +6 -3
  27. package/dist/runtime/components/elements/tooltip/TooltipTrigger.vue +2 -0
  28. package/dist/runtime/components/forms/form/FormField.vue +35 -41
  29. package/dist/runtime/components/forms/select/SelectTrigger.vue +2 -0
  30. package/dist/runtime/components/navigation/breadcrumb/BreadcrumbLink.vue +2 -0
  31. package/dist/runtime/components/navigation-menu/NavigationMenuContentItem.vue +2 -0
  32. package/dist/runtime/components/navigation-menu/NavigationMenuItem.vue +2 -0
  33. package/dist/runtime/components/navigation-menu/NavigationMenuLink.vue +2 -0
  34. package/dist/runtime/components/navigation-menu/NavigationMenuTrigger.vue +2 -0
  35. package/dist/runtime/components/overlays/toast/ToastAction.vue +2 -0
  36. package/dist/runtime/components/sheet/SheetClose.vue +2 -0
  37. package/dist/runtime/components/sidebar/SidebarTrigger.vue +2 -0
  38. package/dist/runtime/types/button.d.ts +2 -0
  39. package/dist/runtime/types/tabs.d.ts +13 -37
  40. package/package.json +3 -3
  41. package/dist/runtime/components/elements/tabs/TabsRoot.vue +0 -32
  42. package/dist/runtime/components/elements/tabs/TabsRoot.vue.d.ts +0 -17
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@una-ui/nuxt",
3
3
  "configKey": "una",
4
- "version": "0.55.4",
4
+ "version": "0.56.1",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.0.0"
7
7
  },
package/dist/module.mjs CHANGED
@@ -8,7 +8,7 @@ import 'unocss';
8
8
  import 'unocss-preset-animations';
9
9
 
10
10
  const name = "@una-ui/nuxt";
11
- const version = "0.55.4";
11
+ const version = "0.56.1";
12
12
 
13
13
  const module = defineNuxtModule({
14
14
  meta: {
@@ -29,6 +29,8 @@ const props = defineProps({
29
29
  dropdownMenu: { type: String, required: false },
30
30
  toggleOn: { type: String, required: false },
31
31
  toggleOff: { type: String, required: false },
32
+ tabsActive: { type: String, required: false },
33
+ tabsInactive: { type: String, required: false },
32
34
  navigationMenu: { type: String, required: false },
33
35
  navigationMenuLink: { type: String, required: false },
34
36
  ariaLabel: { type: String, required: false }
@@ -30,6 +30,8 @@ const props = defineProps({
30
30
  dropdownMenu: { type: String, required: false },
31
31
  toggleOn: { type: String, required: false },
32
32
  toggleOff: { type: String, required: false },
33
+ tabsActive: { type: String, required: false },
34
+ tabsInactive: { type: String, required: false },
33
35
  navigationMenu: { type: String, required: false },
34
36
  navigationMenuLink: { type: String, required: false },
35
37
  ariaLabel: { type: String, required: false }
@@ -34,6 +34,8 @@ const props = defineProps({
34
34
  dropdownMenu: { type: String, required: false },
35
35
  toggleOn: { type: String, required: false },
36
36
  toggleOff: { type: String, required: false },
37
+ tabsActive: { type: String, required: false },
38
+ tabsInactive: { type: String, required: false },
37
39
  navigationMenu: { type: String, required: false },
38
40
  navigationMenuLink: { type: String, required: false },
39
41
  ariaLabel: { type: String, required: false }
@@ -27,6 +27,8 @@ const props = defineProps({
27
27
  dropdownMenu: { type: String, required: false },
28
28
  toggleOn: { type: String, required: false },
29
29
  toggleOff: { type: String, required: false },
30
+ tabsActive: { type: String, required: false },
31
+ tabsInactive: { type: String, required: false },
30
32
  navigationMenu: { type: String, required: false },
31
33
  navigationMenuLink: { type: String, required: false },
32
34
  ariaLabel: { type: String, required: false }
@@ -42,6 +42,8 @@ const props = defineProps({
42
42
  dropdownMenu: { type: String, required: false },
43
43
  toggleOn: { type: String, required: false },
44
44
  toggleOff: { type: String, required: false },
45
+ tabsActive: { type: String, required: false },
46
+ tabsInactive: { type: String, required: false },
45
47
  navigationMenu: { type: String, required: false },
46
48
  navigationMenuLink: { type: String, required: false },
47
49
  ariaLabel: { type: String, required: false }
@@ -31,6 +31,8 @@ const props = defineProps({
31
31
  dropdownMenu: { type: String, required: false },
32
32
  toggleOn: { type: String, required: false },
33
33
  toggleOff: { type: String, required: false },
34
+ tabsActive: { type: String, required: false },
35
+ tabsInactive: { type: String, required: false },
34
36
  navigationMenu: { type: String, required: false },
35
37
  navigationMenuLink: { type: String, required: false },
36
38
  ariaLabel: { type: String, required: false }
@@ -45,6 +47,8 @@ const mergeVariants = computed(() => {
45
47
  "dropdown-menu": props.dropdownMenu,
46
48
  "toggle-on": props.toggleOn,
47
49
  "toggle-off": props.toggleOff,
50
+ "tabs-active": props.tabsActive,
51
+ "tabs-inactive": props.tabsInactive,
48
52
  "navigation-menu": props.navigationMenu,
49
53
  "navigation-menu-link": props.navigationMenuLink
50
54
  };
@@ -34,6 +34,8 @@ const props = defineProps({
34
34
  paginationSelected: { type: String, required: false },
35
35
  paginationUnselected: { type: String, required: false },
36
36
  dropdownMenu: { type: String, required: false },
37
+ tabsActive: { type: String, required: false },
38
+ tabsInactive: { type: String, required: false },
37
39
  navigationMenu: { type: String, required: false },
38
40
  navigationMenuLink: { type: String, required: false },
39
41
  ariaLabel: { type: String, required: false }
@@ -28,6 +28,8 @@ const props = defineProps({
28
28
  dropdownMenu: { type: String, required: false },
29
29
  toggleOn: { type: String, required: false },
30
30
  toggleOff: { type: String, required: false },
31
+ tabsActive: { type: String, required: false },
32
+ tabsInactive: { type: String, required: false },
31
33
  navigationMenu: { type: String, required: false },
32
34
  navigationMenuLink: { type: String, required: false },
33
35
  ariaLabel: { type: String, required: false }
@@ -54,6 +54,8 @@ const props = defineProps({
54
54
  dropdownMenu: { type: String, required: false },
55
55
  toggleOn: { type: String, required: false },
56
56
  toggleOff: { type: String, required: false },
57
+ tabsActive: { type: String, required: false },
58
+ tabsInactive: { type: String, required: false },
57
59
  navigationMenu: { type: String, required: false },
58
60
  navigationMenuLink: { type: String, required: false },
59
61
  ariaLabel: { type: String, required: false },
@@ -40,6 +40,8 @@ const props = defineProps({
40
40
  dropdownMenu: { type: String, required: false },
41
41
  toggleOn: { type: String, required: false },
42
42
  toggleOff: { type: String, required: false },
43
+ tabsActive: { type: String, required: false },
44
+ tabsInactive: { type: String, required: false },
43
45
  navigationMenu: { type: String, required: false },
44
46
  navigationMenuLink: { type: String, required: false },
45
47
  ariaLabel: { type: String, required: false }
@@ -33,6 +33,8 @@ const props = defineProps({
33
33
  dropdownMenu: { type: String, required: false },
34
34
  toggleOn: { type: String, required: false },
35
35
  toggleOff: { type: String, required: false },
36
+ tabsActive: { type: String, required: false },
37
+ tabsInactive: { type: String, required: false },
36
38
  navigationMenu: { type: String, required: false },
37
39
  navigationMenuLink: { type: String, required: false },
38
40
  ariaLabel: { type: String, required: false },
@@ -27,6 +27,8 @@ const props = defineProps({
27
27
  dropdownMenu: { type: String, required: false },
28
28
  toggleOn: { type: String, required: false },
29
29
  toggleOff: { type: String, required: false },
30
+ tabsActive: { type: String, required: false },
31
+ tabsInactive: { type: String, required: false },
30
32
  navigationMenu: { type: String, required: false },
31
33
  navigationMenuLink: { type: String, required: false },
32
34
  ariaLabel: { type: String, required: false },
@@ -30,6 +30,8 @@ const props = defineProps({
30
30
  dropdownMenu: { type: String, required: false },
31
31
  toggleOn: { type: String, required: false },
32
32
  toggleOff: { type: String, required: false },
33
+ tabsActive: { type: String, required: false },
34
+ tabsInactive: { type: String, required: false },
33
35
  navigationMenu: { type: String, required: false },
34
36
  navigationMenuLink: { type: String, required: false },
35
37
  ariaLabel: { type: String, required: false }
@@ -30,6 +30,8 @@ const props = defineProps({
30
30
  dropdownMenu: { type: String, required: false },
31
31
  toggleOn: { type: String, required: false },
32
32
  toggleOff: { type: String, required: false },
33
+ tabsActive: { type: String, required: false },
34
+ tabsInactive: { type: String, required: false },
33
35
  navigationMenu: { type: String, required: false },
34
36
  navigationMenuLink: { type: String, required: false },
35
37
  ariaLabel: { type: String, required: false }
@@ -33,6 +33,8 @@ const props = defineProps({
33
33
  dropdownMenu: { type: String, required: false },
34
34
  toggleOn: { type: String, required: false },
35
35
  toggleOff: { type: String, required: false },
36
+ tabsActive: { type: String, required: false },
37
+ tabsInactive: { type: String, required: false },
36
38
  navigationMenu: { type: String, required: false },
37
39
  navigationMenuLink: { type: String, required: false },
38
40
  ariaLabel: { type: String, required: false }
@@ -30,6 +30,8 @@ const props = defineProps({
30
30
  dropdownMenu: { type: String, required: false },
31
31
  toggleOn: { type: String, required: false },
32
32
  toggleOff: { type: String, required: false },
33
+ tabsActive: { type: String, required: false },
34
+ tabsInactive: { type: String, required: false },
33
35
  navigationMenu: { type: String, required: false },
34
36
  navigationMenuLink: { type: String, required: false },
35
37
  ariaLabel: { type: String, required: false }
@@ -30,6 +30,8 @@ const props = defineProps({
30
30
  dropdownMenu: { type: String, required: false },
31
31
  toggleOn: { type: String, required: false },
32
32
  toggleOff: { type: String, required: false },
33
+ tabsActive: { type: String, required: false },
34
+ tabsInactive: { type: String, required: false },
33
35
  navigationMenu: { type: String, required: false },
34
36
  navigationMenuLink: { type: String, required: false },
35
37
  ariaLabel: { type: String, required: false }
@@ -1,15 +1,16 @@
1
1
  <script setup>
2
2
  import { reactiveOmit } from "@vueuse/core";
3
- import { useForwardPropsEmits } from "reka-ui";
3
+ import { TabsRoot, useForwardPropsEmits } from "reka-ui";
4
+ import { cn } from "../../../utils";
4
5
  import TabsContent from "./TabsContent.vue";
5
6
  import TabsList from "./TabsList.vue";
6
- import TabsRoot from "./TabsRoot.vue";
7
7
  import TabsTrigger from "./TabsTrigger.vue";
8
8
  const props = defineProps({
9
- items: { type: Array, required: true },
9
+ items: { type: Array, required: false },
10
10
  _tabsContent: { type: Object, required: false },
11
11
  _tabsTrigger: { type: Object, required: false },
12
12
  _tabsList: { type: Object, required: false },
13
+ una: { type: Object, required: false },
13
14
  defaultValue: { type: null, required: false },
14
15
  orientation: { type: String, required: false },
15
16
  dir: { type: String, required: false },
@@ -19,51 +20,68 @@ const props = defineProps({
19
20
  asChild: { type: Boolean, required: false },
20
21
  as: { type: null, required: false },
21
22
  class: { type: null, required: false },
22
- size: { type: null, required: false },
23
- tabs: { type: String, required: false },
23
+ size: { type: null, required: false, default: "sm" },
24
+ tabsActive: { type: String, required: false },
25
+ tabsInactive: { type: String, required: false },
24
26
  disabled: { type: Boolean, required: false }
25
27
  });
26
28
  const emits = defineEmits(["update:modelValue"]);
27
- const delegatedProps = reactiveOmit(props, ["class", "items", "tabs", "disabled", "size"]);
29
+ const delegatedProps = reactiveOmit(props, ["class", "items", "tabsActive", "tabsInactive", "disabled", "size", "una"]);
28
30
  const forwarded = useForwardPropsEmits(delegatedProps, emits);
29
31
  </script>
30
32
 
31
33
  <template>
32
34
  <TabsRoot
33
35
  v-bind="forwarded"
34
- :default-value="defaultValue"
36
+ :class="cn(
37
+ 'tabs',
38
+ props.una?.tabs,
39
+ props.class
40
+ )"
35
41
  >
36
- <TabsList v-bind="forwarded._tabsList">
37
- <slot name="list" :items="items">
38
- <template
39
- v-for="item in items"
40
- :key="item.value"
41
- >
42
- <TabsTrigger
43
- :tabs="item?._tabsTrigger?.tabs || item.tabs || props.tabs"
44
- :disabled="item?._tabsTrigger?.disabled || item.disabled || props.disabled"
45
- :value="item.value"
46
- :size="item?._tabsTrigger?.size ?? props.size"
47
- v-bind="{ ...forwarded._tabsTrigger, ...item?._tabsTrigger }"
42
+ <slot>
43
+ <TabsList
44
+ v-bind="forwarded._tabsList"
45
+ :una
46
+ :size
47
+ >
48
+ <slot name="list" :items="items">
49
+ <template
50
+ v-for="item in items"
51
+ :key="item.value"
48
52
  >
49
- <slot name="trigger" :item="item" :disabled="item?._tabsTrigger?.disabled || item.disabled || props.disabled">
50
- {{ item.name }}
51
- </slot>
52
- </TabsTrigger>
53
- </template>
54
- </slot>
55
- </TabsList>
56
- <template
57
- v-for="item in items"
58
- :key="item.value"
59
- >
60
- <TabsContent v-bind="forwarded._tabsContent" :value="item.value">
61
- <slot name="content" :item="item">
62
- <component :is="typeof item.content === 'string' ? 'span' : item.content">
63
- {{ typeof item.content === "string" ? item.content : "" }}
64
- </component>
53
+ <TabsTrigger
54
+ :tabs-active="item?._tabsTrigger?.tabsActive || item.tabsActive || props.tabsActive"
55
+ :tabs-inactive="item?._tabsTrigger?.tabsInactive || item.tabsInactive || props.tabsInactive"
56
+ :disabled="item?._tabsTrigger?.disabled || item.disabled || props.disabled"
57
+ :value="item.value"
58
+ :size
59
+ v-bind="{ ...forwarded._tabsTrigger, ...item?._tabsTrigger }"
60
+ :una
61
+ >
62
+ <slot name="trigger" :item="item" :disabled="item?._tabsTrigger?.disabled || item.disabled || props.disabled">
63
+ {{ item.name }}
64
+ </slot>
65
+ </TabsTrigger>
66
+ </template>
65
67
  </slot>
66
- </TabsContent>
67
- </template>
68
+ </TabsList>
69
+ <template
70
+ v-for="item in items"
71
+ :key="item.value"
72
+ >
73
+ <TabsContent
74
+ v-bind="forwarded._tabsContent"
75
+ :value="item.value"
76
+ :una
77
+ >
78
+ <slot name="content" :item="item">
79
+ <component :is="typeof item.content === 'string' ? 'span' : item.content">
80
+ {{ typeof item.content === "string" ? item.content : "" }}
81
+ </component>
82
+ </slot>
83
+ </TabsContent>
84
+ </template>
85
+ </slot>
68
86
  </TabsRoot>
69
87
  </template>
@@ -1,24 +1,28 @@
1
1
  import type { NTabsProps } from '../../../types/tabs.js';
2
- declare var __VLS_8: {
3
- items: any[];
4
- }, __VLS_13: {
2
+ declare var __VLS_6: {}, __VLS_11: {
3
+ items: any[] | undefined;
4
+ }, __VLS_16: {
5
5
  item: any;
6
6
  disabled: any;
7
- }, __VLS_18: {
7
+ }, __VLS_21: {
8
8
  item: any;
9
9
  };
10
10
  type __VLS_Slots = {} & {
11
- list?: (props: typeof __VLS_8) => any;
11
+ default?: (props: typeof __VLS_6) => any;
12
12
  } & {
13
- trigger?: (props: typeof __VLS_13) => any;
13
+ list?: (props: typeof __VLS_11) => any;
14
14
  } & {
15
- content?: (props: typeof __VLS_18) => any;
15
+ trigger?: (props: typeof __VLS_16) => any;
16
+ } & {
17
+ content?: (props: typeof __VLS_21) => any;
16
18
  };
17
19
  declare const __VLS_component: import("vue").DefineComponent<NTabsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
20
  "update:modelValue": (payload: string | number) => any;
19
21
  }, string, import("vue").PublicProps, Readonly<NTabsProps> & Readonly<{
20
22
  "onUpdate:modelValue"?: ((payload: string | number) => any) | undefined;
21
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ }>, {
24
+ size: import("vue").HTMLAttributes["class"];
25
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
26
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
23
27
  export default _default;
24
28
  type __VLS_WithSlots<T, S> = T & {
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
2
3
  import { TabsContent } from "reka-ui";
3
- import { computed } from "vue";
4
4
  import { cn } from "../../../utils";
5
5
  defineOptions({
6
6
  inheritAttrs: false
@@ -14,14 +14,12 @@ const props = defineProps({
14
14
  class: { type: null, required: false },
15
15
  size: { type: null, required: false }
16
16
  });
17
- const delegatedProps = computed(() => {
18
- const { class: _, ...delegated } = props;
19
- return delegated;
20
- });
17
+ const delegatedProps = reactiveOmit(props, ["class"]);
21
18
  </script>
22
19
 
23
20
  <template>
24
21
  <TabsContent
22
+ data-slot="tabs-content"
25
23
  v-bind="{ ...delegatedProps, ...$attrs }"
26
24
  :class="cn(
27
25
  'tabs-content',
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
2
3
  import { TabsList } from "reka-ui";
3
- import { computed } from "vue";
4
4
  import { cn } from "../../../utils";
5
5
  const props = defineProps({
6
6
  una: { type: Object, required: false },
@@ -8,21 +8,20 @@ const props = defineProps({
8
8
  asChild: { type: Boolean, required: false },
9
9
  as: { type: null, required: false },
10
10
  class: { type: null, required: false },
11
- size: { type: null, required: false }
12
- });
13
- const delegatedProps = computed(() => {
14
- const { class: _, ...delegated } = props;
15
- return delegated;
11
+ size: { type: null, required: false, default: "sm" }
16
12
  });
13
+ const delegatedProps = reactiveOmit(props, ["class", "size"]);
17
14
  </script>
18
15
 
19
16
  <template>
20
17
  <TabsList
18
+ data-slot="tabs-list"
19
+ :size
21
20
  v-bind="delegatedProps"
22
21
  :class="cn(
23
22
  'tabs-list',
24
- props.class,
25
- props.una?.tabsList
23
+ props.una?.tabsList,
24
+ props.class
26
25
  )"
27
26
  >
28
27
  <slot />
@@ -3,7 +3,9 @@ declare var __VLS_6: {};
3
3
  type __VLS_Slots = {} & {
4
4
  default?: (props: typeof __VLS_6) => any;
5
5
  };
6
- declare const __VLS_component: import("vue").DefineComponent<NTabsListProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NTabsListProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const __VLS_component: import("vue").DefineComponent<NTabsListProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NTabsListProps> & Readonly<{}>, {
7
+ size: import("vue").HTMLAttributes["class"];
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
9
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
8
10
  export default _default;
9
11
  type __VLS_WithSlots<T, S> = T & {
@@ -1,10 +1,9 @@
1
1
  <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
2
3
  import { TabsTrigger } from "reka-ui";
3
- import { computed } from "vue";
4
4
  import { cn } from "../../../utils";
5
5
  import Button from "../Button.vue";
6
6
  const props = defineProps({
7
- tabs: { type: String, required: false },
8
7
  una: { type: Object, required: false },
9
8
  value: { type: [String, Number], required: true },
10
9
  disabled: { type: Boolean, required: false },
@@ -21,6 +20,7 @@ const props = defineProps({
21
20
  btn: { type: String, required: false },
22
21
  leading: { type: String, required: false },
23
22
  trailing: { type: String, required: false },
23
+ size: { type: String, required: false, default: "sm" },
24
24
  square: { type: null, required: false },
25
25
  rounded: { type: null, required: false },
26
26
  class: { type: null, required: false },
@@ -31,30 +31,29 @@ const props = defineProps({
31
31
  dropdownMenu: { type: String, required: false },
32
32
  toggleOn: { type: String, required: false },
33
33
  toggleOff: { type: String, required: false },
34
+ tabsActive: { type: String, required: false, default: "soft-black" },
35
+ tabsInactive: { type: String, required: false },
34
36
  navigationMenu: { type: String, required: false },
35
37
  navigationMenuLink: { type: String, required: false },
36
- ariaLabel: { type: String, required: false },
37
- size: { type: null, required: false }
38
- });
39
- const delegatedProps = computed(() => {
40
- const { class: _, ...delegated } = props;
41
- return delegated;
38
+ ariaLabel: { type: String, required: false }
42
39
  });
40
+ const delegatedProps = reactiveOmit(props, ["class", "size"]);
43
41
  </script>
44
42
 
45
43
  <template>
46
44
  <TabsTrigger
47
45
  v-bind="delegatedProps"
46
+ :size
47
+ data-slot="tabs-trigger"
48
48
  :class="cn(
49
- 'tabs-trigger',
49
+ 'tabs-trigger h-[calc(100%-1px)]',
50
+ props.una?.tabsTrigger,
50
51
  props.class
51
52
  )"
52
- :una="{
53
- ...props.una,
54
- btnDefaultVariant: props.tabs ? `tabs-${props.tabs}` : 'tabs-default-variant'
55
- }"
56
53
  :as="Button"
57
54
  >
58
- <slot />
55
+ <template v-for="(_, name) in $slots" #[name]="slotData">
56
+ <slot :name="name" v-bind="slotData" />
57
+ </template>
59
58
  </TabsTrigger>
60
59
  </template>
@@ -1,9 +1,12 @@
1
1
  import type { NTabsTriggerProps } from '../../../types/tabs.js';
2
- declare var __VLS_6: {};
2
+ declare var __VLS_7: string | number, __VLS_8: any;
3
3
  type __VLS_Slots = {} & {
4
- default?: (props: typeof __VLS_6) => any;
4
+ [K in NonNullable<typeof __VLS_7>]?: (props: typeof __VLS_8) => any;
5
5
  };
6
- declare const __VLS_component: import("vue").DefineComponent<NTabsTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NTabsTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const __VLS_component: import("vue").DefineComponent<NTabsTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NTabsTriggerProps> & Readonly<{}>, {
7
+ size: string;
8
+ tabsActive: string;
9
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
10
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
8
11
  export default _default;
9
12
  type __VLS_WithSlots<T, S> = T & {
@@ -25,6 +25,8 @@ const props = defineProps({
25
25
  dropdownMenu: { type: String, required: false },
26
26
  toggleOn: { type: String, required: false },
27
27
  toggleOff: { type: String, required: false },
28
+ tabsActive: { type: String, required: false },
29
+ tabsInactive: { type: String, required: false },
28
30
  navigationMenu: { type: String, required: false },
29
31
  navigationMenuLink: { type: String, required: false },
30
32
  ariaLabel: { type: String, required: false },
@@ -51,72 +51,65 @@ const statusClassVariants = computed(() => {
51
51
  >
52
52
  <slot name="top">
53
53
  <div
54
+ v-if="label || hint || description || $slots.label || $slots.hint || $slots.description"
54
55
  :class="cn(
55
56
  'form-field-top-wrapper',
56
57
  una?.formFieldTopWrapper
57
58
  )"
58
59
  >
59
60
  <div
60
- v-if="label || hint || description"
61
+ v-if="label || hint"
61
62
  :class="cn(
62
- 'form-field-top-wrapper',
63
- una?.formFieldTopWrapper
63
+ 'form-field-top-wrapper-inner',
64
+ una?.formFieldTopWrapperInner
64
65
  )"
65
66
  >
66
67
  <div
67
- v-if="label || hint"
68
68
  :class="cn(
69
- 'form-field-top-wrapper-inner',
70
- una?.formFieldTopWrapperInner
71
- )"
72
- >
73
- <div
74
- :class="cn(
75
69
  'form-field-label-wrapper',
76
70
  una?.formFieldLabelWrapper
77
71
  )"
78
- >
79
- <slot name="label">
80
- <FormLabel
81
- :una
82
- >
83
- <span>
84
- {{ label }}
85
- </span>
72
+ >
73
+ <slot name="label">
74
+ <FormLabel
75
+ :una
76
+ >
77
+ <span>
78
+ {{ label }}
79
+ </span>
86
80
 
87
- <span
88
- v-if="required"
89
- :class="cn(
81
+ <span
82
+ v-if="required"
83
+ :class="cn(
90
84
  'form-field-label-required',
91
85
  una?.formFieldLabelRequired
92
86
  )"
93
- />
94
- </FormLabel>
95
- </slot>
96
- </div>
87
+ />
88
+ </FormLabel>
89
+ </slot>
90
+ </div>
97
91
 
98
- <slot name="hint">
99
- <span
100
- v-if="hint"
101
- :class="cn(
92
+ <slot name="hint">
93
+ <span
94
+ v-if="hint"
95
+ :class="cn(
102
96
  'form-field-hint',
103
97
  una?.formFieldHint
104
98
  )"
105
- >
106
- {{ hint }}
107
- </span>
108
- </slot>
109
- </div>
110
-
111
- <slot name="description">
112
- <FormDescription
113
- v-if="description"
114
- :una
115
99
  >
116
- {{ description }}
117
- </FormDescription>
100
+ {{ hint }}
101
+ </span>
118
102
  </slot>
119
103
  </div>
104
+
105
+ <slot name="description">
106
+ <FormDescription
107
+ v-if="description"
108
+ :una
109
+ >
110
+ {{ description }}
111
+ </FormDescription>
112
+ </slot>
120
113
  </div>
121
114
  </slot>
122
115
 
@@ -131,6 +124,7 @@ const statusClassVariants = computed(() => {
131
124
 
132
125
  <slot name="bottom">
133
126
  <div
127
+ v-if="$slots.message || message || errorMessage"
134
128
  :class="cn(
135
129
  'form-field-bottom-wrapper',
136
130
  una?.formFieldBottomWrapper
@@ -36,6 +36,8 @@ const props = defineProps({
36
36
  dropdownMenu: { type: String, required: false },
37
37
  toggleOn: { type: String, required: false },
38
38
  toggleOff: { type: String, required: false },
39
+ tabsActive: { type: String, required: false },
40
+ tabsInactive: { type: String, required: false },
39
41
  navigationMenu: { type: String, required: false },
40
42
  navigationMenuLink: { type: String, required: false },
41
43
  ariaLabel: { type: String, required: false }
@@ -28,6 +28,8 @@ const props = defineProps({
28
28
  dropdownMenu: { type: String, required: false },
29
29
  toggleOn: { type: String, required: false },
30
30
  toggleOff: { type: String, required: false },
31
+ tabsActive: { type: String, required: false },
32
+ tabsInactive: { type: String, required: false },
31
33
  navigationMenu: { type: String, required: false },
32
34
  navigationMenuLink: { type: String, required: false },
33
35
  ariaLabel: { type: String, required: false }
@@ -32,6 +32,8 @@ const props = defineProps({
32
32
  dropdownMenu: { type: String, required: false },
33
33
  toggleOn: { type: String, required: false },
34
34
  toggleOff: { type: String, required: false },
35
+ tabsActive: { type: String, required: false },
36
+ tabsInactive: { type: String, required: false },
35
37
  navigationMenu: { type: String, required: false },
36
38
  ariaLabel: { type: String, required: false },
37
39
  size: { type: null, required: false }
@@ -31,6 +31,8 @@ const props = defineProps({
31
31
  dropdownMenu: { type: String, required: false },
32
32
  toggleOn: { type: String, required: false },
33
33
  toggleOff: { type: String, required: false },
34
+ tabsActive: { type: String, required: false },
35
+ tabsInactive: { type: String, required: false },
34
36
  navigationMenuLink: { type: String, required: false },
35
37
  ariaLabel: { type: String, required: false },
36
38
  active: { type: Boolean, required: false },
@@ -34,6 +34,8 @@ const props = defineProps({
34
34
  dropdownMenu: { type: String, required: false },
35
35
  toggleOn: { type: String, required: false },
36
36
  toggleOff: { type: String, required: false },
37
+ tabsActive: { type: String, required: false },
38
+ tabsInactive: { type: String, required: false },
37
39
  navigationMenu: { type: String, required: false },
38
40
  ariaLabel: { type: String, required: false },
39
41
  size: { type: null, required: false }
@@ -37,6 +37,8 @@ const props = defineProps({
37
37
  dropdownMenu: { type: String, required: false },
38
38
  toggleOn: { type: String, required: false },
39
39
  toggleOff: { type: String, required: false },
40
+ tabsActive: { type: String, required: false },
41
+ tabsInactive: { type: String, required: false },
40
42
  navigationMenuLink: { type: String, required: false },
41
43
  ariaLabel: { type: String, required: false }
42
44
  });
@@ -31,6 +31,8 @@ const props = defineProps({
31
31
  dropdownMenu: { type: String, required: false },
32
32
  toggleOn: { type: String, required: false },
33
33
  toggleOff: { type: String, required: false },
34
+ tabsActive: { type: String, required: false },
35
+ tabsInactive: { type: String, required: false },
34
36
  navigationMenu: { type: String, required: false },
35
37
  navigationMenuLink: { type: String, required: false },
36
38
  ariaLabel: { type: String, required: false },
@@ -28,6 +28,8 @@ const props = defineProps({
28
28
  dropdownMenu: { type: String, required: false },
29
29
  toggleOn: { type: String, required: false },
30
30
  toggleOff: { type: String, required: false },
31
+ tabsActive: { type: String, required: false },
32
+ tabsInactive: { type: String, required: false },
31
33
  navigationMenu: { type: String, required: false },
32
34
  navigationMenuLink: { type: String, required: false },
33
35
  ariaLabel: { type: String, required: false, default: "Close" }
@@ -27,6 +27,8 @@ const props = defineProps({
27
27
  dropdownMenu: { type: String, required: false },
28
28
  toggleOn: { type: String, required: false },
29
29
  toggleOff: { type: String, required: false },
30
+ tabsActive: { type: String, required: false },
31
+ tabsInactive: { type: String, required: false },
30
32
  navigationMenu: { type: String, required: false },
31
33
  navigationMenuLink: { type: String, required: false },
32
34
  ariaLabel: { type: String, required: false }
@@ -11,6 +11,8 @@ interface BaseExtensionProps {
11
11
  dropdownMenu?: string;
12
12
  toggleOn?: string;
13
13
  toggleOff?: string;
14
+ tabsActive?: string;
15
+ tabsInactive?: string;
14
16
  navigationMenu?: string;
15
17
  navigationMenuLink?: string;
16
18
  ariaLabel?: string;
@@ -5,26 +5,17 @@ interface BaseExtensions {
5
5
  class?: HTMLAttributes['class'];
6
6
  size?: HTMLAttributes['class'];
7
7
  }
8
- export interface NTabsProps extends TabsRootProps, BaseExtensions, Pick<NTabsTriggerProps, 'tabs' | 'disabled'> {
8
+ export interface NTabsProps extends TabsRootProps, BaseExtensions, Pick<NTabsTriggerProps, 'tabsActive' | 'tabsInactive' | 'disabled'> {
9
9
  /**
10
10
  * The array of items that is passed to tabs.
11
11
  *
12
12
  * @default []
13
13
  */
14
- items: any[];
14
+ items?: any[];
15
15
  _tabsContent?: Partial<NTabsContentProps>;
16
16
  _tabsTrigger?: Partial<NTabsTriggerProps>;
17
17
  _tabsList?: Partial<NTabsListProps>;
18
- }
19
- export interface NTabsRootProps extends TabsRootProps, BaseExtensions {
20
- /**
21
- * `UnaUI` preset configuration
22
- *
23
- * @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/tabs.ts
24
- */
25
- una?: {
26
- tabsRoot?: HTMLAttributes['class'];
27
- };
18
+ una?: NTabsUnaProps;
28
19
  }
29
20
  export interface NTabsListProps extends TabsListProps, BaseExtensions {
30
21
  /**
@@ -32,29 +23,10 @@ export interface NTabsListProps extends TabsListProps, BaseExtensions {
32
23
  *
33
24
  * @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/tabs.ts
34
25
  */
35
- una?: {
36
- tabsList?: HTMLAttributes['class'];
37
- };
26
+ una?: Pick<NTabsUnaProps, 'tabsList'>;
38
27
  }
39
- export interface NTabsTriggerProps extends TabsTriggerProps, Omit<NButtonProps, 'una' | 'size'>, BaseExtensions {
40
- /**
41
- * Allows you to add `UnaUI` button preset properties,
42
- * Think of it as a shortcut for adding options or variants to the preset if available.
43
- *
44
- * @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/tabs.ts
45
- * @example
46
- * tabs="solid-green"
47
- */
48
- tabs?: string;
49
- /**
50
- * `UnaUI` preset configuration
51
- *
52
- * @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/tabs.ts
53
- */
54
- una?: {
55
- tabsTrigger?: HTMLAttributes['class'];
56
- tabsDefaultVariant?: HTMLAttributes['class'];
57
- } & NButtonProps['una'];
28
+ export interface NTabsTriggerProps extends TabsTriggerProps, Omit<NButtonProps, 'una'> {
29
+ una?: Pick<NTabsUnaProps, 'tabsTrigger'> & Pick<NButtonProps, 'una'>;
58
30
  }
59
31
  export interface NTabsContentProps extends TabsContentProps, BaseExtensions {
60
32
  /**
@@ -62,8 +34,12 @@ export interface NTabsContentProps extends TabsContentProps, BaseExtensions {
62
34
  *
63
35
  * @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/tabs.ts
64
36
  */
65
- una?: {
66
- tabsContent?: HTMLAttributes['class'];
67
- };
37
+ una?: Pick<NTabsUnaProps, 'tabsContent'>;
38
+ }
39
+ export interface NTabsUnaProps {
40
+ tabs?: HTMLAttributes['class'];
41
+ tabsList?: HTMLAttributes['class'];
42
+ tabsTrigger?: HTMLAttributes['class'];
43
+ tabsContent?: HTMLAttributes['class'];
68
44
  }
69
45
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@una-ui/nuxt",
3
3
  "type": "module",
4
- "version": "0.55.4",
4
+ "version": "0.56.1",
5
5
  "description": "Nuxt module for @una-ui",
6
6
  "author": "Phojie Rengel <phojrengel@gmail.com>",
7
7
  "license": "MIT",
@@ -58,8 +58,8 @@
58
58
  "unocss": "^66.0.0",
59
59
  "unocss-preset-animations": "^1.2.1",
60
60
  "vaul-vue": "^0.4.1",
61
- "@una-ui/extractor-vue-script": "^0.55.4",
62
- "@una-ui/preset": "^0.55.4"
61
+ "@una-ui/extractor-vue-script": "^0.56.1",
62
+ "@una-ui/preset": "^0.56.1"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@iconify-json/lucide": "^1.2.44",
@@ -1,32 +0,0 @@
1
- <script setup>
2
- import { TabsRoot, useForwardPropsEmits } from "reka-ui";
3
- import { cn } from "../../../utils";
4
- const props = defineProps({
5
- una: { type: Object, required: false },
6
- defaultValue: { type: null, required: false },
7
- orientation: { type: String, required: false },
8
- dir: { type: String, required: false },
9
- activationMode: { type: String, required: false },
10
- modelValue: { type: null, required: false },
11
- unmountOnHide: { type: Boolean, required: false },
12
- asChild: { type: Boolean, required: false },
13
- as: { type: null, required: false },
14
- class: { type: null, required: false },
15
- size: { type: null, required: false }
16
- });
17
- const emits = defineEmits(["update:modelValue"]);
18
- const forwarded = useForwardPropsEmits(props, emits);
19
- </script>
20
-
21
- <template>
22
- <TabsRoot
23
- v-bind="forwarded"
24
- :class="cn(
25
- 'tabs-root',
26
- props.class,
27
- props.una?.tabsRoot
28
- )"
29
- >
30
- <slot />
31
- </TabsRoot>
32
- </template>
@@ -1,17 +0,0 @@
1
- import type { NTabsRootProps } from '../../../types/tabs.js';
2
- declare var __VLS_6: {};
3
- type __VLS_Slots = {} & {
4
- default?: (props: typeof __VLS_6) => any;
5
- };
6
- declare const __VLS_component: import("vue").DefineComponent<NTabsRootProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
- "update:modelValue": (payload: string | number) => any;
8
- }, string, import("vue").PublicProps, Readonly<NTabsRootProps> & Readonly<{
9
- "onUpdate:modelValue"?: ((payload: string | number) => any) | undefined;
10
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
12
- export default _default;
13
- type __VLS_WithSlots<T, S> = T & {
14
- new (): {
15
- $slots: S;
16
- };
17
- };