@una-ui/nuxt-edge 1.0.0-alpha.0-29175660.d51c006 → 1.0.0-alpha.0-29176511.c6828ac

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": "1.0.0-alpha.0-29175660.d51c006",
4
+ "version": "1.0.0-alpha.0-29176511.c6828ac",
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 = "1.0.0-alpha.0-29175660.d51c006";
11
+ const version = "1.0.0-alpha.0-29176511.c6828ac";
12
12
 
13
13
  const module = defineNuxtModule({
14
14
  meta: {
@@ -26,7 +26,7 @@ const props = defineProps({
26
26
  una: { type: Object, required: false },
27
27
  open: { type: Boolean, required: false },
28
28
  defaultOpen: { type: Boolean, required: false },
29
- preventClose: { type: Boolean, required: false },
29
+ dismissible: { type: Boolean, required: false, default: true },
30
30
  overlay: { type: Boolean, required: false, default: true },
31
31
  _alertDialogCancel: { type: Object, required: false },
32
32
  _alertDialogAction: { type: Object, required: false },
@@ -61,7 +61,7 @@ const forwarded = useForwardPropsEmits(rootProps, emits);
61
61
  <AlertDialogContent
62
62
  v-bind="_alertDialogContent"
63
63
  :_alert-dialog-overlay
64
- :prevent-close
64
+ :dismissible
65
65
  :una
66
66
  >
67
67
  <VisuallyHidden v-if="title === DEFAULT_TITLE || !!$slots.title || (description === DEFAULT_DESCRIPTION || !!$slots.description)">
@@ -34,6 +34,7 @@ declare const __VLS_component: import("vue").DefineComponent<NAlertDialogProps,
34
34
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
35
35
  onAction?: ((args_0: Event) => any) | undefined;
36
36
  }>, {
37
+ dismissible: boolean;
37
38
  overlay: boolean;
38
39
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
39
40
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
@@ -12,7 +12,7 @@ defineOptions({
12
12
  inheritAttrs: false
13
13
  });
14
14
  const props = defineProps({
15
- preventClose: { type: Boolean, required: false },
15
+ dismissible: { type: Boolean, required: false, default: true },
16
16
  overlay: { type: Boolean, required: false, default: true },
17
17
  _alertDialogCancel: { type: Object, required: false },
18
18
  _alertDialogAction: { type: Object, required: false },
@@ -29,7 +29,7 @@ const emits = defineEmits(["escapeKeyDown", "pointerDownOutside", "focusOutside"
29
29
  const delegatedProps = reactiveOmit(props, ["class", "una", "_alertDialogOverlay"]);
30
30
  const forwarded = useForwardPropsEmits(delegatedProps, emits);
31
31
  const contentEvents = computed(() => {
32
- if (props.preventClose) {
32
+ if (!props.dismissible) {
33
33
  return {
34
34
  pointerDownOutside: (e) => e.preventDefault(),
35
35
  interactOutside: (e) => e.preventDefault(),
@@ -18,6 +18,7 @@ declare const __VLS_component: import("vue").DefineComponent<NAlertDialogContent
18
18
  onOpenAutoFocus?: ((event: Event) => any) | undefined;
19
19
  onCloseAutoFocus?: ((event: Event) => any) | undefined;
20
20
  }>, {
21
+ dismissible: boolean;
21
22
  overlay: boolean;
22
23
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
24
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
@@ -24,8 +24,8 @@ declare const __VLS_component: import("vue").DefineComponent<NDialogProps, {}, {
24
24
  }, string, import("vue").PublicProps, Readonly<NDialogProps> & Readonly<{
25
25
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
26
26
  }>, {
27
- overlay: boolean;
28
27
  dismissible: boolean;
28
+ overlay: boolean;
29
29
  showClose: boolean;
30
30
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
31
31
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
@@ -18,8 +18,8 @@ declare const __VLS_component: import("vue").DefineComponent<NDialogContentProps
18
18
  onOpenAutoFocus?: ((event: Event) => any) | undefined;
19
19
  onCloseAutoFocus?: ((event: Event) => any) | undefined;
20
20
  }>, {
21
- overlay: boolean;
22
21
  dismissible: boolean;
22
+ overlay: boolean;
23
23
  showClose: boolean;
24
24
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
25
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
@@ -18,8 +18,8 @@ declare const __VLS_component: import("vue").DefineComponent<NDialogContentProps
18
18
  onOpenAutoFocus?: ((event: Event) => any) | undefined;
19
19
  onCloseAutoFocus?: ((event: Event) => any) | undefined;
20
20
  }>, {
21
- overlay: boolean;
22
21
  dismissible: boolean;
22
+ overlay: boolean;
23
23
  showClose: boolean;
24
24
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
25
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
@@ -26,7 +26,7 @@ const props = defineProps({
26
26
  defaultOpen: { type: Boolean, required: false },
27
27
  modal: { type: Boolean, required: false },
28
28
  sheet: { type: null, required: false },
29
- preventClose: { type: Boolean, required: false },
29
+ dismissible: { type: Boolean, required: false, default: true },
30
30
  showClose: { type: Boolean, required: false, default: true },
31
31
  overlay: { type: Boolean, required: false, default: true }
32
32
  });
@@ -40,8 +40,12 @@ const forwarded = useForwardPropsEmits(rootProps, emits);
40
40
  </script>
41
41
 
42
42
  <template>
43
- <DialogRoot v-slot="{ open }" v-bind="forwarded">
44
- <slot name="root">
43
+ <DialogRoot
44
+ v-slot="{ open }"
45
+ data-slot="sheet"
46
+ v-bind="forwarded"
47
+ >
48
+ <slot>
45
49
  <SheetTrigger
46
50
  v-if="$slots.trigger"
47
51
  v-bind="_sheetTrigger"
@@ -54,7 +58,7 @@ const forwarded = useForwardPropsEmits(rootProps, emits);
54
58
  :_sheet-overlay
55
59
  :_sheet-portal
56
60
  :sheet
57
- :prevent-close
61
+ :dismissible
58
62
  :show-close
59
63
  :overlay
60
64
  v-bind="_sheetContent"
@@ -99,7 +103,9 @@ const forwarded = useForwardPropsEmits(rootProps, emits);
99
103
  </slot>
100
104
  </SheetHeader>
101
105
 
102
- <slot />
106
+ <slot name="body">
107
+ <slot />
108
+ </slot>
103
109
 
104
110
  <SheetFooter
105
111
  v-if="$slots.footer"
@@ -1,9 +1,9 @@
1
1
  import type { NSheetProps } from '../../types/index.js';
2
2
  declare var __VLS_6: {}, __VLS_11: {
3
3
  open: any;
4
- }, __VLS_26: {}, __VLS_31: {}, __VLS_36: {}, __VLS_41: {}, __VLS_43: {}, __VLS_48: {};
4
+ }, __VLS_26: {}, __VLS_31: {}, __VLS_36: {}, __VLS_41: {}, __VLS_43: {}, __VLS_45: {}, __VLS_50: {};
5
5
  type __VLS_Slots = {} & {
6
- root?: (props: typeof __VLS_6) => any;
6
+ default?: (props: typeof __VLS_6) => any;
7
7
  } & {
8
8
  trigger?: (props: typeof __VLS_11) => any;
9
9
  } & {
@@ -15,15 +15,18 @@ type __VLS_Slots = {} & {
15
15
  } & {
16
16
  description?: (props: typeof __VLS_41) => any;
17
17
  } & {
18
- default?: (props: typeof __VLS_43) => any;
18
+ body?: (props: typeof __VLS_43) => any;
19
19
  } & {
20
- footer?: (props: typeof __VLS_48) => any;
20
+ default?: (props: typeof __VLS_45) => any;
21
+ } & {
22
+ footer?: (props: typeof __VLS_50) => any;
21
23
  };
22
24
  declare const __VLS_component: import("vue").DefineComponent<NSheetProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
23
25
  "update:open": (value: boolean) => any;
24
26
  }, string, import("vue").PublicProps, Readonly<NSheetProps> & Readonly<{
25
27
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
26
28
  }>, {
29
+ dismissible: boolean;
27
30
  overlay: boolean;
28
31
  showClose: boolean;
29
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -38,6 +38,7 @@ const props = defineProps({
38
38
 
39
39
  <template>
40
40
  <DialogClose
41
+ data-slot="sheet-close"
41
42
  as-child
42
43
  >
43
44
  <slot>
@@ -1,16 +1,17 @@
1
1
  <script setup>
2
2
  import { reactiveOmit } from "@vueuse/core";
3
- import { DialogContent, DialogOverlay, DialogPortal, useForwardPropsEmits } from "reka-ui";
3
+ import { DialogContent, DialogPortal, useForwardPropsEmits } from "reka-ui";
4
4
  import { computed } from "vue";
5
5
  import { cn } from "../../utils";
6
6
  import SheetClose from "./SheetClose.vue";
7
+ import SheetOverlay from "./SheetOverlay.vue";
7
8
  defineOptions({
8
9
  inheritAttrs: false
9
10
  });
10
11
  const props = defineProps({
11
12
  class: { type: null, required: false },
12
13
  sheet: { type: null, required: false, default: "right" },
13
- preventClose: { type: Boolean, required: false },
14
+ dismissible: { type: Boolean, required: false, default: true },
14
15
  showClose: { type: Boolean, required: false, default: true },
15
16
  overlay: { type: Boolean, required: false, default: true },
16
17
  _sheetClose: { type: Object, required: false },
@@ -27,7 +28,7 @@ const emits = defineEmits(["escapeKeyDown", "pointerDownOutside", "focusOutside"
27
28
  const contentProps = reactiveOmit(props, ["sheet", "class", "_sheetClose", "_sheetPortal", "_sheetOverlay"]);
28
29
  const forwarded = useForwardPropsEmits(contentProps, emits);
29
30
  const contentEvents = computed(() => {
30
- if (props.preventClose) {
31
+ if (!props.dismissible) {
31
32
  return {
32
33
  pointerDownOutside: (e) => e.preventDefault(),
33
34
  interactOutside: (e) => e.preventDefault(),
@@ -46,12 +47,12 @@ const contentEvents = computed(() => {
46
47
  v-bind="props._sheetPortal"
47
48
  :class="cn('sheet-portal', props.una?.sheetPortal, props._sheetPortal?.class)"
48
49
  >
49
- <DialogOverlay
50
+ <SheetOverlay
50
51
  v-if="props.overlay"
51
52
  v-bind="_sheetOverlay"
52
- :class="cn('sheet-overlay', props.una?.sheetOverlay, props._sheetOverlay?.class)"
53
53
  />
54
54
  <DialogContent
55
+ data-slot="sheet-content"
55
56
  v-bind="{ ...forwarded, ...$attrs }"
56
57
  :sheet
57
58
  :class="cn('sheet-content', props.una?.sheetContent, props.class)"
@@ -1,12 +1,13 @@
1
1
  import type { NSheetContentProps } from '../../types/index.js';
2
- declare var __VLS_14: {};
2
+ declare var __VLS_13: {};
3
3
  type __VLS_Slots = {} & {
4
- default?: (props: typeof __VLS_14) => any;
4
+ default?: (props: typeof __VLS_13) => any;
5
5
  };
6
6
  declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<NSheetContentProps>, {
7
7
  sheet: string;
8
8
  overlay: boolean;
9
9
  showClose: boolean;
10
+ dismissible: boolean;
10
11
  }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
12
  escapeKeyDown: (event: KeyboardEvent) => any;
12
13
  pointerDownOutside: (event: import("reka-ui").PointerDownOutsideEvent) => any;
@@ -18,6 +19,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
18
19
  sheet: string;
19
20
  overlay: boolean;
20
21
  showClose: boolean;
22
+ dismissible: boolean;
21
23
  }>>> & Readonly<{
22
24
  onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
23
25
  onPointerDownOutside?: ((event: import("reka-ui").PointerDownOutsideEvent) => any) | undefined;
@@ -13,6 +13,7 @@ const delegatedProps = reactiveOmit(props, ["class"]);
13
13
 
14
14
  <template>
15
15
  <DialogDescription
16
+ data-slot="sheet-description"
16
17
  :class="cn('sheet-description', props.una?.sheetDescription, props.class)"
17
18
  v-bind="delegatedProps"
18
19
  >
@@ -8,6 +8,7 @@ const props = defineProps({
8
8
 
9
9
  <template>
10
10
  <div
11
+ data-slot="sheet-footer"
11
12
  :class="
12
13
  cn(
13
14
  'sheet-footer',
@@ -8,6 +8,7 @@ const props = defineProps({
8
8
 
9
9
  <template>
10
10
  <div
11
+ data-slot="sheet-header"
11
12
  :class="
12
13
  cn('sheet-header', props.una?.sheetHeader, props.class)
13
14
  "
@@ -0,0 +1,23 @@
1
+ <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { DialogOverlay } from "reka-ui";
4
+ import { cn } from "../../utils";
5
+ const props = defineProps({
6
+ class: { type: null, required: false },
7
+ una: { type: Object, required: false },
8
+ forceMount: { type: Boolean, required: false },
9
+ asChild: { type: Boolean, required: false },
10
+ as: { type: null, required: false }
11
+ });
12
+ const delegatedProps = reactiveOmit(props, "class");
13
+ </script>
14
+
15
+ <template>
16
+ <DialogOverlay
17
+ data-slot="sheet-overlay"
18
+ :class="cn('dialog-overlay', props.una?.sheetOverlay, props.class)"
19
+ v-bind="delegatedProps"
20
+ >
21
+ <slot />
22
+ </DialogOverlay>
23
+ </template>
@@ -0,0 +1,12 @@
1
+ declare var __VLS_6: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_6) => any;
4
+ };
5
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
7
+ export default _default;
8
+ type __VLS_WithSlots<T, S> = T & {
9
+ new (): {
10
+ $slots: S;
11
+ };
12
+ };
@@ -13,6 +13,7 @@ const delegatedProps = reactiveOmit(props, ["class"]);
13
13
 
14
14
  <template>
15
15
  <DialogTitle
16
+ data-slot="sheet-title"
16
17
  :class="cn('sheet-title', props.una?.sheetTitle, props.class)"
17
18
  v-bind="delegatedProps"
18
19
  >
@@ -7,7 +7,10 @@ const props = defineProps({
7
7
  </script>
8
8
 
9
9
  <template>
10
- <DialogTrigger v-bind="props">
10
+ <DialogTrigger
11
+ data-slot="sheet-trigger"
12
+ v-bind="props"
13
+ >
11
14
  <slot />
12
15
  </DialogTrigger>
13
16
  </template>
@@ -1,7 +1,7 @@
1
1
  import type { AlertDialogActionProps, AlertDialogCancelProps, AlertDialogContentProps, AlertDialogDescriptionProps, AlertDialogOverlayProps, AlertDialogProps, AlertDialogTitleProps, AlertDialogTriggerProps } from 'reka-ui';
2
2
  import type { HTMLAttributes } from 'vue';
3
3
  import type { NButtonProps } from './button.js';
4
- export interface NAlertDialogProps extends AlertDialogProps, Pick<NAlertDialogContentProps, 'preventClose' | 'overlay' | '_alertDialogCancel' | '_alertDialogAction' | '_alertDialogOverlay'> {
4
+ export interface NAlertDialogProps extends AlertDialogProps, Pick<NAlertDialogContentProps, 'dismissible' | 'overlay' | '_alertDialogCancel' | '_alertDialogAction' | '_alertDialogOverlay'> {
5
5
  /**
6
6
  * The title of the dialog.
7
7
  */
@@ -40,7 +40,7 @@ export interface NAlertDialogContentProps extends AlertDialogContentProps, BaseE
40
40
  *
41
41
  * @default true
42
42
  */
43
- preventClose?: boolean;
43
+ dismissible?: boolean;
44
44
  /**
45
45
  * Show overlay.
46
46
  *
@@ -1,7 +1,7 @@
1
1
  import type { DialogCloseProps, DialogContentProps, DialogDescriptionProps, DialogOverlayProps, DialogPortalProps, DialogRootProps, DialogTitleProps, DialogTriggerProps } from 'reka-ui';
2
2
  import type { HTMLAttributes } from 'vue';
3
3
  import type { NButtonProps } from './button.js';
4
- export interface NSheetProps extends DialogRootProps, Pick<NSheetContentProps, 'sheet' | 'preventClose' | 'showClose' | 'overlay'> {
4
+ export interface NSheetProps extends DialogRootProps, Pick<NSheetContentProps, 'sheet' | 'dismissible' | 'showClose' | 'overlay'> {
5
5
  /**
6
6
  * The title of the sheet.
7
7
  */
@@ -47,7 +47,7 @@ export interface NSheetContentProps extends DialogContentProps {
47
47
  /**
48
48
  * Prevent close.
49
49
  */
50
- preventClose?: boolean;
50
+ dismissible?: boolean;
51
51
  /**
52
52
  * Show close button.
53
53
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@una-ui/nuxt-edge",
3
3
  "type": "module",
4
- "version": "1.0.0-alpha.0-29175660.d51c006",
4
+ "version": "1.0.0-alpha.0-29176511.c6828ac",
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.17.5",
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@1.0.0-alpha.0-29175660.d51c006",
45
- "@una-ui/preset": "npm:@una-ui/preset-edge@1.0.0-alpha.0-29175660.d51c006",
44
+ "@una-ui/extractor-vue-script": "npm:@una-ui/extractor-vue-script-edge@1.0.0-alpha.0-29176511.c6828ac",
45
+ "@una-ui/preset": "npm:@una-ui/preset-edge@1.0.0-alpha.0-29176511.c6828ac",
46
46
  "@unocss/core": "^66.2.0",
47
47
  "@unocss/nuxt": "^66.2.0",
48
48
  "@unocss/preset-attributify": "^66.2.0",