nuance-ui 0.2.25 → 0.2.27

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
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^4.0.0"
6
6
  },
7
- "version": "0.2.25",
7
+ "version": "0.2.27",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
2
  import { getRadius, getShadow, getSize, getSpacing, rem } from "@nui/utils";
3
- import { onClickOutside, unrefElement } from "@vueuse/core";
3
+ import { unrefElement } from "@vueuse/core";
4
4
  import { computed, shallowRef, watch } from "vue";
5
5
  import Box from "../../box.vue";
6
6
  import NTransition from "../../transition.vue";
@@ -41,7 +41,7 @@ const emit = defineEmits(["open", "close"]);
41
41
  const opened = defineModel("open", { type: Boolean, ...{ default: false } });
42
42
  useProvideDialogState(() => opened.value = false);
43
43
  function overlayClick(event) {
44
- if (event.target === event.currentTarget && closeOnClickOutside && !withoutOverlay)
44
+ if (event.target === event.currentTarget && closeOnClickOutside)
45
45
  opened.value = false;
46
46
  }
47
47
  function open(dialog) {
@@ -52,9 +52,6 @@ function open(dialog) {
52
52
  dialog?.showModal();
53
53
  }
54
54
  const dialogRef = shallowRef(null);
55
- if (closeOnClickOutside) {
56
- onClickOutside(dialogRef, () => opened.value = false);
57
- }
58
55
  watch([opened, () => unrefElement(dialogRef)], ([isOpen, dialog]) => {
59
56
  if (!dialog)
60
57
  return;
@@ -1,7 +1,7 @@
1
1
  import type { MaybePromise } from '@nui/types';
2
2
  import type { ButtonProps, ModalRootProps } from '../../components/index.js';
3
3
  type ConfirmLabels = Record<'confirm' | 'cancel', string>;
4
- export interface ConfirmModalProps extends /* @vue-ignore */ ModalRootProps {
4
+ export interface ConfirmModalProps extends ModalRootProps {
5
5
  /** Modal title */
6
6
  title: string;
7
7
  /** Description text displayed below the title */
@@ -27,7 +27,23 @@ const {
27
27
  onCancel: { type: Function, required: false },
28
28
  onConfirm: { type: Function, required: false },
29
29
  cancelProps: { type: Object, required: false },
30
- confirmProps: { type: Object, required: false }
30
+ confirmProps: { type: Object, required: false },
31
+ centered: { type: Boolean, required: false },
32
+ fullScreen: { type: Boolean, required: false },
33
+ closeOnClickOutside: { type: Boolean, required: false },
34
+ withinPortal: { type: Boolean, required: false },
35
+ withoutOverlay: { type: Boolean, required: false },
36
+ classes: { type: Object, required: false },
37
+ portalTarget: { type: [String, Object, null], required: false },
38
+ is: { type: null, required: false },
39
+ mod: { type: [Object, Array, null], required: false },
40
+ yOffset: { type: void 0, required: false },
41
+ xOffset: { type: void 0, required: false },
42
+ radius: { type: [String, Number], required: false },
43
+ size: { type: String, required: false },
44
+ shadow: { type: String, required: false },
45
+ padding: { type: [String, Number], required: false },
46
+ transition: { type: String, required: false }
31
47
  });
32
48
  const { opened, resolve: hide } = useModal("confirm");
33
49
  const loading = ref(false);
@@ -61,12 +77,6 @@ async function hanleConfirm() {
61
77
  </p>
62
78
  </ModalSection>
63
79
 
64
- <ModalSection bordered>
65
- <p v-if='body' :class='$style.body'>
66
- {{ body }}
67
- </p>
68
- </ModalSection>
69
-
70
80
  <ModalFooter :class='$style.footer'>
71
81
  <Button
72
82
  variant='default'
@@ -1,7 +1,7 @@
1
1
  import type { MaybePromise } from '@nui/types';
2
2
  import type { ButtonProps, ModalRootProps } from '../../components/index.js';
3
3
  type ConfirmLabels = Record<'confirm' | 'cancel', string>;
4
- export interface ConfirmModalProps extends /* @vue-ignore */ ModalRootProps {
4
+ export interface ConfirmModalProps extends ModalRootProps {
5
5
  /** Modal title */
6
6
  title: string;
7
7
  /** Description text displayed below the title */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuance-ui",
3
- "version": "0.2.25",
3
+ "version": "0.2.27",
4
4
  "description": "A modern Vue UI library inspired by the best of the React ecosystem.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -46,7 +46,7 @@
46
46
  "dev": "npm run dev:prepare && nuxi dev playground",
47
47
  "dev:build": "nuxi build playground",
48
48
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
49
- "release": "npm run lint && npm run test && npm run prepack && changelogen --release && git push --follow-tags",
49
+ "release": "npm run lint && npm run prepack && changelogen --release && git push --follow-tags",
50
50
  "lint": "eslint ./src",
51
51
  "test": "vitest run",
52
52
  "test:watch": "vitest watch",