nuance-ui 0.2.19 → 0.2.20
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 +1 -1
- package/dist/runtime/components/dialog/index.d.ts +2 -0
- package/dist/runtime/components/dialog/ui/dialog-footer.d.vue.ts +16 -0
- package/dist/runtime/components/dialog/ui/dialog-footer.vue +16 -0
- package/dist/runtime/components/dialog/ui/dialog-footer.vue.d.ts +16 -0
- package/dist/runtime/components/dialog/ui/dialog-root.d.vue.ts +2 -2
- package/dist/runtime/components/dialog/ui/dialog-root.vue +9 -4
- package/dist/runtime/components/dialog/ui/dialog-root.vue.d.ts +2 -2
- package/dist/runtime/components/dialog/ui/dialog-section.d.vue.ts +17 -0
- package/dist/runtime/components/dialog/ui/dialog-section.vue +17 -0
- package/dist/runtime/components/dialog/ui/dialog-section.vue.d.ts +17 -0
- package/dist/runtime/components/dialog/ui/dialog.module.css +1 -1
- package/dist/runtime/components/drawer/drawer-footer.d.vue.ts +16 -0
- package/dist/runtime/components/drawer/drawer-footer.vue +13 -0
- package/dist/runtime/components/drawer/drawer-footer.vue.d.ts +16 -0
- package/dist/runtime/components/drawer/drawer-root.vue +1 -0
- package/dist/runtime/components/drawer/drawer-section.d.vue.ts +16 -0
- package/dist/runtime/components/drawer/drawer-section.vue +14 -0
- package/dist/runtime/components/drawer/drawer-section.vue.d.ts +16 -0
- package/dist/runtime/components/drawer/index.d.ts +2 -0
- package/dist/runtime/components/modal/index.d.ts +0 -2
- package/dist/runtime/components/modal/modal-footer.d.vue.ts +14 -0
- package/dist/runtime/components/modal/modal-footer.vue +13 -0
- package/dist/runtime/components/modal/modal-footer.vue.d.ts +14 -0
- package/dist/runtime/components/modal/modal-header.d.vue.ts +1 -3
- package/dist/runtime/components/modal/modal-header.vue.d.ts +1 -3
- package/dist/runtime/components/modal/modal-root.d.vue.ts +1 -2
- package/dist/runtime/components/modal/modal-root.vue +3 -1
- package/dist/runtime/components/modal/modal-root.vue.d.ts +1 -2
- package/dist/runtime/components/modal/modal-section.d.vue.ts +14 -0
- package/dist/runtime/components/modal/modal-section.vue +14 -0
- package/dist/runtime/components/modal/modal-section.vue.d.ts +14 -0
- package/dist/runtime/components/modal/modal-title.d.vue.ts +1 -3
- package/dist/runtime/components/modal/modal-title.vue.d.ts +1 -3
- package/dist/runtime/components/pin-input/pin-input.vue +2 -2
- package/dist/runtime/modals/_confirm-modal/confirm-modal.vue +16 -6
- package/dist/runtime/styles/const.css +1 -1
- package/dist/runtime/types/styling.d.ts +2 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { useDialogState } from './lib.js';
|
|
2
2
|
export type * from './types';
|
|
3
|
+
export type * from './ui/dialog-footer.vue';
|
|
3
4
|
export type * from './ui/dialog-header.vue';
|
|
4
5
|
export type * from './ui/dialog-root.vue';
|
|
6
|
+
export type * from './ui/dialog-section.vue';
|
|
5
7
|
export type * from './ui/dialog-title.vue';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { BoxProps } from '../../box.vue.js';
|
|
2
|
+
export interface DialogFooterProps extends BoxProps {
|
|
3
|
+
}
|
|
4
|
+
declare var __VLS_14: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_14) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<DialogFooterProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogFooterProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import Box from "../../box.vue";
|
|
3
|
+
import css from "./dialog.module.css";
|
|
4
|
+
const { is = "footer", mod } = defineProps({
|
|
5
|
+
is: { type: null, required: false },
|
|
6
|
+
mod: { type: [Object, Array, null], required: false }
|
|
7
|
+
});
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<ClientOnly>
|
|
12
|
+
<Box :is :mod :class='css.footer'>
|
|
13
|
+
<slot />
|
|
14
|
+
</Box>
|
|
15
|
+
</ClientOnly>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { BoxProps } from '../../box.vue.js';
|
|
2
|
+
export interface DialogFooterProps extends BoxProps {
|
|
3
|
+
}
|
|
4
|
+
declare var __VLS_14: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_14) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<DialogFooterProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogFooterProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NuanceRadius, NuanceShadow, NuanceSize, NuanceSpacing } from '@nui/types';
|
|
1
|
+
import type { Classes, NuanceRadius, NuanceShadow, NuanceSize, NuanceSpacing } from '@nui/types';
|
|
2
2
|
import type { CSSProperties, RendererElement } from 'vue';
|
|
3
3
|
import type { BoxProps } from '../../box.vue.js';
|
|
4
4
|
import type { TransitionName } from '../../transition.vue.js';
|
|
@@ -27,7 +27,7 @@ export interface DialogRootProps extends BoxProps, StyleProps {
|
|
|
27
27
|
/** If set, the component is rendered with `Overlay` @default `true` */
|
|
28
28
|
withoutOverlay?: boolean;
|
|
29
29
|
/** Passes a class to root element */
|
|
30
|
-
|
|
30
|
+
classes?: Classes<'root' | 'content'>;
|
|
31
31
|
/** Portal target to render element @default 'body' */
|
|
32
32
|
portalTarget?: string | RendererElement | null;
|
|
33
33
|
}
|
|
@@ -17,7 +17,7 @@ const {
|
|
|
17
17
|
padding,
|
|
18
18
|
size,
|
|
19
19
|
shadow,
|
|
20
|
-
|
|
20
|
+
classes,
|
|
21
21
|
transition = "fade-down",
|
|
22
22
|
withoutOverlay = false,
|
|
23
23
|
portalTarget = "body"
|
|
@@ -25,7 +25,7 @@ const {
|
|
|
25
25
|
closeOnClickOutside: { type: Boolean, required: false },
|
|
26
26
|
withinPortal: { type: Boolean, required: false },
|
|
27
27
|
withoutOverlay: { type: Boolean, required: false },
|
|
28
|
-
|
|
28
|
+
classes: { type: Object, required: false },
|
|
29
29
|
portalTarget: { type: [String, Object, null], required: false },
|
|
30
30
|
is: { type: null, required: false },
|
|
31
31
|
mod: { type: [Object, Array, null], required: false },
|
|
@@ -79,7 +79,7 @@ const style = computed(() => ({
|
|
|
79
79
|
<Box
|
|
80
80
|
is='dialog'
|
|
81
81
|
ref='dialogRef'
|
|
82
|
-
:class='[css.root,
|
|
82
|
+
:class='[css.root, classes?.root]'
|
|
83
83
|
:mod='[{ "without-overlay": withoutOverlay }, mod]'
|
|
84
84
|
:style
|
|
85
85
|
@click='overlayClick'
|
|
@@ -87,7 +87,12 @@ const style = computed(() => ({
|
|
|
87
87
|
@cancel.prevent='opened = false'
|
|
88
88
|
>
|
|
89
89
|
<NTransition :name='transition'>
|
|
90
|
-
<Box
|
|
90
|
+
<Box
|
|
91
|
+
is='section'
|
|
92
|
+
v-if='opened'
|
|
93
|
+
:class='[css.content, classes?.content]'
|
|
94
|
+
v-bind='$attrs'
|
|
95
|
+
>
|
|
91
96
|
<slot />
|
|
92
97
|
</Box>
|
|
93
98
|
</NTransition>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NuanceRadius, NuanceShadow, NuanceSize, NuanceSpacing } from '@nui/types';
|
|
1
|
+
import type { Classes, NuanceRadius, NuanceShadow, NuanceSize, NuanceSpacing } from '@nui/types';
|
|
2
2
|
import type { CSSProperties, RendererElement } from 'vue';
|
|
3
3
|
import type { BoxProps } from '../../box.vue.js';
|
|
4
4
|
import type { TransitionName } from '../../transition.vue.js';
|
|
@@ -27,7 +27,7 @@ export interface DialogRootProps extends BoxProps, StyleProps {
|
|
|
27
27
|
/** If set, the component is rendered with `Overlay` @default `true` */
|
|
28
28
|
withoutOverlay?: boolean;
|
|
29
29
|
/** Passes a class to root element */
|
|
30
|
-
|
|
30
|
+
classes?: Classes<'root' | 'content'>;
|
|
31
31
|
/** Portal target to render element @default 'body' */
|
|
32
32
|
portalTarget?: string | RendererElement | null;
|
|
33
33
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { BoxProps } from '../../box.vue.js';
|
|
2
|
+
export interface DialogSectionProps extends BoxProps {
|
|
3
|
+
bordered?: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare var __VLS_14: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_14) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<DialogSectionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogSectionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import Box from "../../box.vue";
|
|
3
|
+
import css from "./dialog.module.css";
|
|
4
|
+
const { is = "section", bordered, mod } = defineProps({
|
|
5
|
+
bordered: { type: Boolean, required: false },
|
|
6
|
+
is: { type: null, required: false },
|
|
7
|
+
mod: { type: [Object, Array, null], required: false }
|
|
8
|
+
});
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<ClientOnly>
|
|
13
|
+
<Box :is :mod='[{ bordered }, mod]' :class='css.section'>
|
|
14
|
+
<slot />
|
|
15
|
+
</Box>
|
|
16
|
+
</ClientOnly>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { BoxProps } from '../../box.vue.js';
|
|
2
|
+
export interface DialogSectionProps extends BoxProps {
|
|
3
|
+
bordered?: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare var __VLS_14: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_14) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<DialogSectionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogSectionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.root{--dialog-size-xs:rem(320px);--dialog-size-sm:rem(380px);--dialog-size-md:rem(440px);--dialog-size-lg:rem(620px);--dialog-size-xl:rem(780px);--dialog-size:var(--dialog-size-md);--dialog-y-offset:0;--dialog-x-offset:0;--dialog-shadow:var(--shadow-md);--dialog-radius:var(--radius-
|
|
1
|
+
.root{--dialog-size-xs:rem(320px);--dialog-size-sm:rem(380px);--dialog-size-md:rem(440px);--dialog-size-lg:rem(620px);--dialog-size-xl:rem(780px);--dialog-size:var(--dialog-size-md);--dialog-y-offset:0;--dialog-x-offset:0;--dialog-shadow:var(--shadow-md);--dialog-radius:var(--radius-md);--dialog-padding:var(--spacing-sm);--dialog-bd-c:var(--color-gray-4);--overlay-bg:rgba(0,0,0,.4);--overlay-filter:blur(.1rem);background:none;border:none;box-shadow:var(--dialog-shadow);display:grid;left:var(--dialog-x-offset);max-height:100%;max-width:100%;min-height:0;opacity:0;overflow:hidden;padding:0;top:var(--dialog-y-offset);transition:opacity .3s ease,overlay allow-discrete .3s ease,display allow-discrete .3s ease;width:var(--dialog-size);z-index:2}.root::backdrop{backdrop-filter:var(--overlay-filter);background:var(--overlay-bg,rgba(0,0,0,.6));opacity:0;transition:opacity .3s ease,overlay allow-discrete .3s ease,display allow-discrete .3s ease}.root[open]{opacity:1}@starting-style{.root[open]{opacity:0}}.root[open]::backdrop{opacity:1}@starting-style{.root[open]::backdrop{opacity:0}}.root:not([open]){opacity:0;pointer-events:none}.root:not([open])::backdrop{opacity:0}.root[data-without-overlay]::backdrop{display:none}.content{background-color:var(--color-body);border-radius:var(--dialog-radius);color:var(--color-text);height:100%;min-height:0;width:100%}.footer,.header,.section{padding:var(--dialog-padding)}.header{align-items:center;border-bottom:1px solid var(--dialog-bd-c);display:flex;justify-content:space-between}.footer,.section[data-bordered=true]:not(:first-of-type){border-top:1px solid var(--dialog-bd-c)}.title{font-weight:400}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DialogFooterProps } from '../dialog/index.js';
|
|
2
|
+
export interface DrawerFooterProps extends DialogFooterProps {
|
|
3
|
+
}
|
|
4
|
+
declare var __VLS_8: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_8) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<DrawerFooterProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DrawerFooterProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import DialogFooter from "../dialog/ui/dialog-footer.vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
is: { type: null, required: false },
|
|
5
|
+
mod: { type: [Object, Array, null], required: false }
|
|
6
|
+
});
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<DialogFooter v-bind='props'>
|
|
11
|
+
<slot />
|
|
12
|
+
</DialogFooter>
|
|
13
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DialogFooterProps } from '../dialog/index.js';
|
|
2
|
+
export interface DrawerFooterProps extends DialogFooterProps {
|
|
3
|
+
}
|
|
4
|
+
declare var __VLS_8: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_8) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<DrawerFooterProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DrawerFooterProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -14,6 +14,7 @@ const {
|
|
|
14
14
|
closeOnClickOutside: { type: Boolean, required: false },
|
|
15
15
|
withinPortal: { type: Boolean, required: false },
|
|
16
16
|
withoutOverlay: { type: Boolean, required: false },
|
|
17
|
+
classes: { type: Object, required: false },
|
|
17
18
|
portalTarget: { type: [String, Object, null], required: false },
|
|
18
19
|
is: { type: null, required: false },
|
|
19
20
|
mod: { type: [Object, Array, null], required: false },
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DialogSectionProps } from '../dialog/index.js';
|
|
2
|
+
export interface DrawerSectionProps extends DialogSectionProps {
|
|
3
|
+
}
|
|
4
|
+
declare var __VLS_8: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_8) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<DrawerSectionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DrawerSectionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import DialogSection from "../dialog/ui/dialog-section.vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
bordered: { type: Boolean, required: false },
|
|
5
|
+
is: { type: null, required: false },
|
|
6
|
+
mod: { type: [Object, Array, null], required: false }
|
|
7
|
+
});
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<DialogSection v-bind='props'>
|
|
12
|
+
<slot />
|
|
13
|
+
</DialogSection>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DialogSectionProps } from '../dialog/index.js';
|
|
2
|
+
export interface DrawerSectionProps extends DialogSectionProps {
|
|
3
|
+
}
|
|
4
|
+
declare var __VLS_8: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_8) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<DrawerSectionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DrawerSectionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DialogFooterProps } from '../dialog/index.js';
|
|
2
|
+
declare var __VLS_8: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_8) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<DialogFooterProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogFooterProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
11
|
+
new (): {
|
|
12
|
+
$slots: S;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import DialogFooter from "../dialog/ui/dialog-footer.vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
is: { type: null, required: false },
|
|
5
|
+
mod: { type: [Object, Array, null], required: false }
|
|
6
|
+
});
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<DialogFooter v-bind='props'>
|
|
11
|
+
<slot />
|
|
12
|
+
</DialogFooter>
|
|
13
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DialogFooterProps } from '../dialog/index.js';
|
|
2
|
+
declare var __VLS_8: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_8) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<DialogFooterProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogFooterProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
11
|
+
new (): {
|
|
12
|
+
$slots: S;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { DialogHeaderProps } from '../dialog/index.js';
|
|
2
|
-
export interface ModalHeaderProps extends DialogHeaderProps {
|
|
3
|
-
}
|
|
4
2
|
declare var __VLS_8: {};
|
|
5
3
|
type __VLS_Slots = {} & {
|
|
6
4
|
default?: (props: typeof __VLS_8) => any;
|
|
7
5
|
};
|
|
8
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<DialogHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogHeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
7
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
8
|
declare const _default: typeof __VLS_export;
|
|
11
9
|
export default _default;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { DialogHeaderProps } from '../dialog/index.js';
|
|
2
|
-
export interface ModalHeaderProps extends DialogHeaderProps {
|
|
3
|
-
}
|
|
4
2
|
declare var __VLS_8: {};
|
|
5
3
|
type __VLS_Slots = {} & {
|
|
6
4
|
default?: (props: typeof __VLS_8) => any;
|
|
7
5
|
};
|
|
8
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<DialogHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogHeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
7
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
8
|
declare const _default: typeof __VLS_export;
|
|
11
9
|
export default _default;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { DialogModel, DialogRootProps } from '../dialog/index.js';
|
|
2
|
-
|
|
3
|
-
export interface ModalRootProps extends OmittedDialogRootProps {
|
|
2
|
+
export interface ModalRootProps extends DialogRootProps {
|
|
4
3
|
/** If set, the modal is centered vertically @default `false` */
|
|
5
4
|
centered?: boolean;
|
|
6
5
|
/** If set, the modal takes the entire screen @default `false` */
|
|
@@ -8,6 +8,7 @@ const {
|
|
|
8
8
|
withoutOverlay = false,
|
|
9
9
|
withinPortal = false,
|
|
10
10
|
closeOnClickOutside = true,
|
|
11
|
+
classes,
|
|
11
12
|
...rest
|
|
12
13
|
} = defineProps({
|
|
13
14
|
centered: { type: Boolean, required: false },
|
|
@@ -15,6 +16,7 @@ const {
|
|
|
15
16
|
closeOnClickOutside: { type: Boolean, required: false },
|
|
16
17
|
withinPortal: { type: Boolean, required: false },
|
|
17
18
|
withoutOverlay: { type: Boolean, required: false },
|
|
19
|
+
classes: { type: Object, required: false },
|
|
18
20
|
portalTarget: { type: [String, Object, null], required: false },
|
|
19
21
|
is: { type: null, required: false },
|
|
20
22
|
mod: { type: [Object, Array, null], required: false },
|
|
@@ -34,11 +36,11 @@ const opened = defineModel("open", { type: Boolean, ...{ default: false } });
|
|
|
34
36
|
<DialogRoot
|
|
35
37
|
v-model:open='opened'
|
|
36
38
|
:mod='[{ centered, "full-screen": fullScreen }, mod]'
|
|
37
|
-
:root-class='css.root'
|
|
38
39
|
:within-portal
|
|
39
40
|
:close-on-click-outside
|
|
40
41
|
:without-overlay
|
|
41
42
|
v-bind='rest'
|
|
43
|
+
:classes='{ ...classes, root: [css.root, classes?.root] }'
|
|
42
44
|
@open='$emit("open")'
|
|
43
45
|
@close='$emit("close")'
|
|
44
46
|
>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { DialogModel, DialogRootProps } from '../dialog/index.js';
|
|
2
|
-
|
|
3
|
-
export interface ModalRootProps extends OmittedDialogRootProps {
|
|
2
|
+
export interface ModalRootProps extends DialogRootProps {
|
|
4
3
|
/** If set, the modal is centered vertically @default `false` */
|
|
5
4
|
centered?: boolean;
|
|
6
5
|
/** If set, the modal takes the entire screen @default `false` */
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DialogSectionProps } from '../dialog/index.js';
|
|
2
|
+
declare var __VLS_8: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_8) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<DialogSectionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogSectionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
11
|
+
new (): {
|
|
12
|
+
$slots: S;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import DialogSection from "../dialog/ui/dialog-section.vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
bordered: { type: Boolean, required: false },
|
|
5
|
+
is: { type: null, required: false },
|
|
6
|
+
mod: { type: [Object, Array, null], required: false }
|
|
7
|
+
});
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<DialogSection v-bind='props'>
|
|
12
|
+
<slot />
|
|
13
|
+
</DialogSection>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DialogSectionProps } from '../dialog/index.js';
|
|
2
|
+
declare var __VLS_8: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_8) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<DialogSectionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogSectionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
11
|
+
new (): {
|
|
12
|
+
$slots: S;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { DialogTitleProps } from '../dialog/index.js';
|
|
2
|
-
export interface ModalTitleProps extends DialogTitleProps {
|
|
3
|
-
}
|
|
4
2
|
declare var __VLS_8: {};
|
|
5
3
|
type __VLS_Slots = {} & {
|
|
6
4
|
default?: (props: typeof __VLS_8) => any;
|
|
7
5
|
};
|
|
8
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<DialogTitleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogTitleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
7
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
8
|
declare const _default: typeof __VLS_export;
|
|
11
9
|
export default _default;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { DialogTitleProps } from '../dialog/index.js';
|
|
2
|
-
export interface ModalTitleProps extends DialogTitleProps {
|
|
3
|
-
}
|
|
4
2
|
declare var __VLS_8: {};
|
|
5
3
|
type __VLS_Slots = {} & {
|
|
6
4
|
default?: (props: typeof __VLS_8) => any;
|
|
7
5
|
};
|
|
8
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<DialogTitleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogTitleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
7
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
8
|
declare const _default: typeof __VLS_export;
|
|
11
9
|
export default _default;
|
|
@@ -16,7 +16,7 @@ const {
|
|
|
16
16
|
otp = true,
|
|
17
17
|
type = "number",
|
|
18
18
|
mask,
|
|
19
|
-
gap,
|
|
19
|
+
gap = "xs",
|
|
20
20
|
placeholder,
|
|
21
21
|
autoFocus,
|
|
22
22
|
manageFocus = true,
|
|
@@ -142,7 +142,7 @@ const style = useVarsResolver(() => ({
|
|
|
142
142
|
:input-mode
|
|
143
143
|
:type='mask ? "password" : "text"'
|
|
144
144
|
:placeholder
|
|
145
|
-
:
|
|
145
|
+
:autofocus='autoFocus && ix === 0'
|
|
146
146
|
:readonly='readOnly'
|
|
147
147
|
:disabled
|
|
148
148
|
@input='handleInput($event, ix)'
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
import { ref } from "vue";
|
|
3
3
|
import Button from "../../components/button/button.vue";
|
|
4
4
|
import ModalCloseButton from "../../components/modal/modal-close-button.vue";
|
|
5
|
+
import ModalFooter from "../../components/modal/modal-footer.vue";
|
|
5
6
|
import ModalHeader from "../../components/modal/modal-header.vue";
|
|
6
7
|
import ModalRoot from "../../components/modal/modal-root.vue";
|
|
8
|
+
import ModalSection from "../../components/modal/modal-section.vue";
|
|
7
9
|
import Title from "../../components/title.vue";
|
|
8
10
|
import { useModal } from "../use-modal";
|
|
9
11
|
const {
|
|
@@ -53,11 +55,19 @@ async function hanleConfirm() {
|
|
|
53
55
|
<ModalCloseButton />
|
|
54
56
|
</ModalHeader>
|
|
55
57
|
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
<ModalSection bordered>
|
|
59
|
+
<p v-if='body' :class='$style.body'>
|
|
60
|
+
{{ body }}
|
|
61
|
+
</p>
|
|
62
|
+
</ModalSection>
|
|
59
63
|
|
|
60
|
-
<
|
|
64
|
+
<ModalSection bordered>
|
|
65
|
+
<p v-if='body' :class='$style.body'>
|
|
66
|
+
{{ body }}
|
|
67
|
+
</p>
|
|
68
|
+
</ModalSection>
|
|
69
|
+
|
|
70
|
+
<ModalFooter :class='$style.footer'>
|
|
61
71
|
<Button
|
|
62
72
|
variant='default'
|
|
63
73
|
v-bind='cancelProps'
|
|
@@ -74,10 +84,10 @@ async function hanleConfirm() {
|
|
|
74
84
|
>
|
|
75
85
|
{{ labels?.confirm ?? "Confirm" }}
|
|
76
86
|
</Button>
|
|
77
|
-
</
|
|
87
|
+
</ModalFooter>
|
|
78
88
|
</ModalRoot>
|
|
79
89
|
</template>
|
|
80
90
|
|
|
81
91
|
<style module>
|
|
82
|
-
.body{color:var(--color-dimmed);margin:0}.footer{display:flex;gap:var(--spacing-sm);justify-content:flex-end
|
|
92
|
+
.body{color:var(--color-dimmed);margin:0}.footer{display:flex;gap:var(--spacing-sm);justify-content:flex-end}
|
|
83
93
|
</style>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--mantine-scale:1;--font-family:Inter
|
|
1
|
+
:root{--mantine-scale:1;--font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";--font-family-headings:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;--font-family-mono:"JetBrains Mono","JetBrainsMono Nerd Font","SF Mono",Menlo,Consolas,monospace;--heading-text-wrap:wrap;--font-size-xs:.75rem;--font-size-sm:.875rem;--font-size-md:1rem;--font-size-lg:1.125rem;--font-size-xl:1.25rem;--font-size-h1:2.125rem;--line-height-h1:1.3;--font-weight-h1:700;--font-size-h2:1.625rem;--line-height-h2:1.35;--font-weight-h2:700;--font-size-h3:1.375rem;--line-height-h3:1.4;--font-weight-h3:700;--font-size-h4:1.125rem;--line-height-h4:1.45;--font-weight-h4:700;--font-size-h5:1rem;--line-height-h5:1.5;--font-weight-h5:600;--font-size-h6:0.875rem;--line-height-h6:1.5;--font-weight-h6:600;--spacing-2xs:0.25rem;--spacing-xs:0.5rem;--spacing-sm:0.75rem;--spacing-md:1rem;--spacing-lg:1.25rem;--spacing-xl:2rem;--spacing-2xl:3rem;--radius-xs:0.125rem;--radius-sm:0.25rem;--radius-md:0.5rem;--radius-lg:1rem;--radius-xl:2rem;--radius-default:var(--radius-sm);--line-height:1.55;--line-height-xs:1.4;--line-height-sm:1.45;--line-height-md:1.55;--line-height-lg:1.6;--line-height-xl:1.65;--shadow-xs:0 0.0625rem 0.1875rem rgba(0,0,0,.05),0 0.0625rem 0.125rem rgba(0,0,0,.1);--shadow-sm:0 0.0625rem 0.1875rem rgba(0,0,0,.05),rgba(0,0,0,.05) 0 0.625rem 0.9375rem -0.3125rem,rgba(0,0,0,.04) 0 0.4375rem 0.4375rem -0.3125rem;--shadow-md:0 0.0625rem 0.1875rem rgba(0,0,0,.05),rgba(0,0,0,.05) 0 1.25rem 1.5625rem -0.3125rem,rgba(0,0,0,.04) 0 0.625rem 0.625rem -0.3125rem;--shadow-lg:0 0.0625rem 0.1875rem rgba(0,0,0,.05),rgba(0,0,0,.05) 0 1.75rem 1.4375rem -0.4375rem,rgba(0,0,0,.04) 0 0.75rem 0.75rem -0.4375rem;--shadow-xl:0 0.0625rem 0.1875rem rgba(0,0,0,.05),rgba(0,0,0,.05) 0 2.25rem 1.75rem -0.4375rem,rgba(0,0,0,.04) 0 1.0625rem 1.0625rem -0.4375rem;--breakpoint-xs:36em;--breakpoint-sm:48em;--breakpoint-md:62em;--breakpoint-lg:75em;--breakpoint-xl:88em}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
1
2
|
export type CssVariable = `--${string}`;
|
|
2
3
|
export type TransformVars<V> = {
|
|
3
4
|
[Key in keyof V]: V[Key] extends CssVariable ? Record<V[Key], string | number | undefined> : never;
|
|
4
5
|
};
|
|
5
6
|
/** Map of component part names to user-provided class names. */
|
|
6
|
-
export type Classes<Key extends string
|
|
7
|
+
export type Classes<Key extends string> = Partial<Record<Key, HTMLAttributes['class']>>;
|