@una-ui/nuxt-edge 0.63.1-29240258.718df6c → 0.63.1-29247284.735a951

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.
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@una-ui/nuxt-edge",
3
3
  "configKey": "una",
4
- "version": "0.63.1-29240258.718df6c",
4
+ "version": "0.63.1-29247284.735a951",
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-edge";
11
- const version = "0.63.1-29240258.718df6c";
11
+ const version = "0.63.1-29247284.735a951";
12
12
 
13
13
  const module = defineNuxtModule({
14
14
  meta: {
@@ -0,0 +1,70 @@
1
+ <script>
2
+
3
+ </script>
4
+
5
+ <script setup>
6
+ import { reactiveOmit } from "@vueuse/core";
7
+ import { ToggleGroupRoot, useForwardPropsEmits } from "reka-ui";
8
+ import { cn } from "../../utils";
9
+ import ToggleGroupItem from "./ToggleGroupItem.vue";
10
+ const props = defineProps({
11
+ items: { type: null, required: false },
12
+ _toggleGroupItem: { type: Object, required: false },
13
+ una: { type: Object, required: false },
14
+ rovingFocus: { type: Boolean, required: false },
15
+ disabled: { type: Boolean, required: false },
16
+ orientation: { type: String, required: false },
17
+ dir: { type: String, required: false },
18
+ loop: { type: Boolean, required: false },
19
+ asChild: { type: Boolean, required: false },
20
+ as: { type: [String, Object, Function], required: false },
21
+ name: { type: String, required: false },
22
+ required: { type: Boolean, required: false },
23
+ type: { type: String, required: false },
24
+ modelValue: { type: null, required: false },
25
+ defaultValue: { type: null, required: false },
26
+ toggleOff: { type: String, required: false },
27
+ toggleOn: { type: String, required: false },
28
+ class: { type: null, required: false },
29
+ size: { type: null, required: false }
30
+ });
31
+ const emits = defineEmits(["update:modelValue"]);
32
+ const rootProps = reactiveOmit(props, [
33
+ "class",
34
+ "size",
35
+ "toggleOff",
36
+ "toggleOn",
37
+ "una"
38
+ ]);
39
+ const forwarded = useForwardPropsEmits(rootProps, emits);
40
+ </script>
41
+
42
+ <template>
43
+ <ToggleGroupRoot
44
+ v-slot="slotProps"
45
+ v-bind="forwarded"
46
+ data-slot="toggle-group"
47
+ :class="cn(
48
+ 'toggle-group',
49
+ props.orientation === 'vertical' ? 'toggle-group-vertical' : 'toggle-group-horizontal',
50
+ props.class,
51
+ props.una?.toggleGroup
52
+ )"
53
+ >
54
+ <slot v-bind="slotProps">
55
+ <template v-if="items && items.length">
56
+ <template v-for="item in items" :key="item.value">
57
+ <slot :name="item.slot ?? 'item'" v-bind="{ item, value: item.value }">
58
+ <ToggleGroupItem
59
+ :una
60
+ :size
61
+ :toggle-on
62
+ :toggle-off
63
+ v-bind="{ ...item, ..._toggleGroupItem }"
64
+ />
65
+ </slot>
66
+ </template>
67
+ </template>
68
+ </slot>
69
+ </ToggleGroupRoot>
70
+ </template>
@@ -0,0 +1,23 @@
1
+ import type { NToggleGroupItemProps, NToggleGroupProps } from '../../types/index.js';
2
+ declare const _default: <T extends NToggleGroupItemProps, U extends Array<T>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
+ readonly "onUpdate:modelValue"?: ((payload: import("reka-ui").AcceptableValue | import("reka-ui").AcceptableValue[]) => any) | undefined;
5
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & NToggleGroupProps<U> & Partial<{}>> & import("vue").PublicProps;
6
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
7
+ attrs: any;
8
+ slots: {
9
+ [x: string]: ((props: {
10
+ item: any;
11
+ value: any;
12
+ }) => any) | undefined;
13
+ } & {
14
+ default?: (props: any) => any;
15
+ };
16
+ emit: (evt: "update:modelValue", payload: import("reka-ui").AcceptableValue | import("reka-ui").AcceptableValue[]) => void;
17
+ }>) => import("vue").VNode & {
18
+ __ctx?: Awaited<typeof __VLS_setup>;
19
+ };
20
+ export default _default;
21
+ type __VLS_PrettifyLocal<T> = {
22
+ [K in keyof T]: T[K];
23
+ } & {};
@@ -0,0 +1,75 @@
1
+ <script>
2
+
3
+ </script>
4
+
5
+ <script setup>
6
+ import { reactiveOmit } from "@vueuse/core";
7
+ import { ToggleGroupItem, useForwardPropsEmits } from "reka-ui";
8
+ import { cn } from "../../utils";
9
+ import Toggle from "../elements/Toggle.vue";
10
+ const props = defineProps({
11
+ slot: { type: String, required: false },
12
+ una: { type: Object, required: false },
13
+ value: { type: null, required: true },
14
+ disabled: { type: Boolean, required: false },
15
+ asChild: { type: Boolean, required: false },
16
+ as: { type: [String, Object, Function], required: false, default: Toggle },
17
+ toggleOn: { type: String, required: false },
18
+ toggleOff: { type: String, required: false },
19
+ defaultValue: { type: Boolean, required: false },
20
+ modelValue: { type: [Boolean, null], required: false },
21
+ name: { type: String, required: false },
22
+ required: { type: Boolean, required: false },
23
+ type: { type: String, required: false },
24
+ loadingPlacement: { type: String, required: false },
25
+ icon: { type: Boolean, required: false, default: true },
26
+ reverse: { type: Boolean, required: false },
27
+ loading: { type: Boolean, required: false },
28
+ block: { type: Boolean, required: false },
29
+ to: { type: null, required: false },
30
+ label: { type: String, required: false },
31
+ btn: { type: String, required: false },
32
+ leading: { type: String, required: false },
33
+ trailing: { type: String, required: false },
34
+ size: { type: String, required: false },
35
+ square: { type: null, required: false, default: true },
36
+ rounded: { type: null, required: false },
37
+ class: { type: null, required: false },
38
+ breadcrumbActive: { type: String, required: false },
39
+ breadcrumbInactive: { type: String, required: false },
40
+ paginationSelected: { type: String, required: false },
41
+ paginationUnselected: { type: String, required: false },
42
+ dropdownMenu: { type: String, required: false },
43
+ tabsActive: { type: String, required: false },
44
+ tabsInactive: { type: String, required: false },
45
+ navigationMenu: { type: String, required: false },
46
+ navigationMenuLink: { type: String, required: false },
47
+ ariaLabel: { type: String, required: false }
48
+ });
49
+ const emits = defineEmits(["update:modelValue"]);
50
+ const delegatedProps = reactiveOmit(props, [
51
+ "class",
52
+ "toggleOff",
53
+ "toggleOn",
54
+ "una"
55
+ ]);
56
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
57
+ </script>
58
+
59
+ <template>
60
+ <ToggleGroupItem
61
+ v-slot="slotProps"
62
+ v-bind="forwarded"
63
+ data-slot="toggle-group-item"
64
+ :toggle-on
65
+ :toggle-off
66
+ :as="props.as"
67
+ :class="cn(
68
+ 'toggle-group-item',
69
+ props.una?.toggleGroupItem,
70
+ props.class
71
+ )"
72
+ >
73
+ <slot v-bind="slotProps" />
74
+ </ToggleGroupItem>
75
+ </template>
@@ -0,0 +1,18 @@
1
+ import type { NToggleGroupItemProps } from '../../types/index.js';
2
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<NToggleGroupItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ "update:modelValue": (value: boolean) => any;
4
+ }, string, import("vue").PublicProps, Readonly<NToggleGroupItemProps> & Readonly<{
5
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
6
+ }>, {
7
+ icon: boolean;
8
+ square: import("vue").HTMLAttributes["class"];
9
+ as: import("reka-ui").AsTag | import("vue").Component;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
11
+ default?: (props: any) => any;
12
+ }>;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -43,6 +43,7 @@ export * from './table.js';
43
43
  export * from './tabs.js';
44
44
  export * from './toast.js';
45
45
  export * from './toggle.js';
46
+ export * from './toggle-group.js';
46
47
  export * from './tooltip.js';
47
48
  export interface Colors {
48
49
  [key: string]: string;
@@ -43,4 +43,5 @@ export * from "./table.js";
43
43
  export * from "./tabs.js";
44
44
  export * from "./toast.js";
45
45
  export * from "./toggle.js";
46
+ export * from "./toggle-group.js";
46
47
  export * from "./tooltip.js";
@@ -0,0 +1,39 @@
1
+ import type { ToggleGroupItemProps, ToggleGroupRootProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ import type { NButtonProps } from './button.js';
4
+ import type { NToggleProps } from './toggle.js';
5
+ interface BaseExtensions {
6
+ /** CSS class for the component */
7
+ class?: HTMLAttributes['class'];
8
+ /** Size of the component */
9
+ size?: HTMLAttributes['class'];
10
+ }
11
+ export interface NToggleGroupProps<T> extends ToggleGroupRootProps, Pick<NToggleProps, 'toggleOff' | 'toggleOn'>, BaseExtensions {
12
+ /**
13
+ * The array of items that is passed to the toggle group.
14
+ *
15
+ * @default []
16
+ */
17
+ items?: T;
18
+ /** Props for the toggle group item */
19
+ _toggleGroupItem?: Partial<NToggleGroupItemProps>;
20
+ /**
21
+ * `UnaUI` preset configuration
22
+ *
23
+ * @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/toggle-group.ts
24
+ */
25
+ una?: NToggleGroupUnaProps;
26
+ }
27
+ export interface NToggleGroupItemProps extends ToggleGroupItemProps, Omit<NToggleProps, 'una'>, Pick<BaseExtensions, 'class'> {
28
+ /** Slot of the toggle group item */
29
+ slot?: string;
30
+ /** Additional properties for the una component */
31
+ una?: Pick<NToggleGroupUnaProps, 'toggleGroupItem'> & NButtonProps['una'];
32
+ }
33
+ interface NToggleGroupUnaProps {
34
+ /** CSS class for the navigation menu */
35
+ toggleGroup?: HTMLAttributes['class'];
36
+ /** CSS class for the navigation menu content */
37
+ toggleGroupItem?: HTMLAttributes['class'];
38
+ }
39
+ export {};
File without changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@una-ui/nuxt-edge",
3
3
  "type": "module",
4
- "version": "0.63.1-29240258.718df6c",
4
+ "version": "0.63.1-29247284.735a951",
5
5
  "description": "Nuxt module for @una-ui",
6
6
  "author": "Phojie Rengel <phojrengel@gmail.com>",
7
7
  "license": "MIT",
@@ -41,8 +41,8 @@
41
41
  "@nuxt/kit": "^3.18.1",
42
42
  "@nuxtjs/color-mode": "^3.5.2",
43
43
  "@tanstack/vue-table": "^8.21.3",
44
- "@una-ui/extractor-vue-script": "npm:@una-ui/extractor-vue-script-edge@0.63.1-29240258.718df6c",
45
- "@una-ui/preset": "npm:@una-ui/preset-edge@0.63.1-29240258.718df6c",
44
+ "@una-ui/extractor-vue-script": "npm:@una-ui/extractor-vue-script-edge@0.63.1-29247284.735a951",
45
+ "@una-ui/preset": "npm:@una-ui/preset-edge@0.63.1-29247284.735a951",
46
46
  "@unocss/core": "^66.3.3",
47
47
  "@unocss/nuxt": "^66.3.3",
48
48
  "@unocss/preset-attributify": "^66.3.3",