@privyid/persona 0.23.0 → 0.25.0
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/components/accordion/Accordion.vue +1 -1
- package/dist/components/aspect-ratio/index.d.ts +1 -1
- package/dist/components/avatar/Avatar.vue.d.ts +4 -4
- package/dist/components/badge/Badge.vue.d.ts +4 -4
- package/dist/components/banner/Banner.vue +2 -2
- package/dist/components/banner/Banner.vue.d.ts +2 -2
- package/dist/components/breadcrumbs/Breadcrumb.vue.d.ts +1 -1
- package/dist/components/breadcrumbs/BreadcrumbItem.vue.d.ts +1 -1
- package/dist/components/button/Button.vue +15 -3
- package/dist/components/button-group/ButtonGroup.vue.d.ts +1 -1
- package/dist/components/button-group/index.d.ts +2 -2
- package/dist/components/calendar/Calendar.vue +7 -3
- package/dist/components/calendar/Calendar.vue.d.ts +2 -2
- package/dist/components/calendar/adapter/adapter.d.ts +1 -1
- package/dist/components/camera/Camera.vue +2 -2
- package/dist/components/camera/Camera.vue.d.ts +2 -2
- package/dist/components/camera/adapter/adapter.d.ts +1 -1
- package/dist/components/camera/utils/motion.mjs +2 -2
- package/dist/components/caption/Caption.vue.d.ts +3 -3
- package/dist/components/card/Card.vue.d.ts +2 -2
- package/dist/components/carousel/Carousel.vue +1 -1
- package/dist/components/carousel/Carousel.vue.d.ts +9 -9
- package/dist/components/carousel/index.d.ts +1 -1
- package/dist/components/chart/Chart.vue +20 -17
- package/dist/components/chart/Chart.vue.d.ts +3 -3
- package/dist/components/chart/ChartSet.vue.d.ts +2 -2
- package/dist/components/chart/ChartVal.vue.d.ts +4 -4
- package/dist/components/chart/adapter/adapter.d.ts +1 -1
- package/dist/components/chart/adapter/index.d.ts +1 -1
- package/dist/components/chart/index.d.ts +1 -1
- package/dist/components/checkbox/Checkbox.vue +5 -25
- package/dist/components/checkbox/index.d.ts +1 -1
- package/dist/components/contextual-bar/ContextualBar.vue +4 -4
- package/dist/components/contextual-bar/ContextualBar.vue.d.ts +3 -3
- package/dist/components/cropper/Cropper.vue +7 -3
- package/dist/components/cropper/Cropper.vue.d.ts +12 -12
- package/dist/components/cropper/index.d.ts +2 -2
- package/dist/components/cropper/utils/use-pinch.d.ts +1 -1
- package/dist/components/cropper/utils/use-ratio.d.ts +1 -1
- package/dist/components/datepicker/Datepicker.vue +1 -0
- package/dist/components/datepicker/Datepicker.vue.d.ts +3 -3
- package/dist/components/dialog/Dialog.vue +29 -2
- package/dist/components/dialog/Dialog.vue.d.ts +1 -1
- package/dist/components/dialog/DialogFooter.vue +1 -7
- package/dist/components/dialog/DialogFooter.vue.d.ts +1 -1
- package/dist/components/dialog/index.d.ts +19 -2
- package/dist/components/dialog/index.mjs +42 -0
- package/dist/components/dot/Dot.vue +5 -2
- package/dist/components/dot/Dot.vue.d.ts +4 -4
- package/dist/components/dropdown/Dropdown.vue +26 -24
- package/dist/components/dropdown/DropdownItem.vue +2 -1
- package/dist/components/dropdown/DropdownItem.vue.d.ts +1 -1
- package/dist/components/dropdown/index.d.ts +1 -1
- package/dist/components/dropdown-subitem/DropdownSubitem.vue +3 -3
- package/dist/components/dropdown-subitem/index.d.ts +1 -1
- package/dist/components/dropzone/Dropzone.vue.d.ts +5 -5
- package/dist/components/filterbar/Filterbar.vue.d.ts +2 -2
- package/dist/components/filterbar/index.d.ts +4 -4
- package/dist/components/filterbar/pinned/PinnedDate.vue.d.ts +2 -2
- package/dist/components/filterbar/pinned/PinnedMultiselect.vue.d.ts +3 -3
- package/dist/components/filterbar/pinned/PinnedSelect.vue.d.ts +5 -5
- package/dist/components/filterbar/pinned/PinnedToggle.vue.d.ts +8 -8
- package/dist/components/form-group/FormGroup.vue +24 -11
- package/dist/components/global/store.d.ts +2 -2
- package/dist/components/global/use-singleton.d.ts +1 -1
- package/dist/components/heading/Heading.vue.d.ts +3 -3
- package/dist/components/input/Input.vue.d.ts +9 -8
- package/dist/components/input/index.d.ts +1 -1
- package/dist/components/input/utils/accept.d.ts +1 -1
- package/dist/components/input-file/InputFile.vue.d.ts +8 -8
- package/dist/components/input-group/InputGroup.vue +1 -1
- package/dist/components/input-group/InputGroup.vue.d.ts +2 -2
- package/dist/components/input-group/index.d.ts +2 -2
- package/dist/components/input-password/InputPassword.vue.d.ts +1 -1
- package/dist/components/input-password/index.d.ts +1 -1
- package/dist/components/input-pin/InputPin.vue +1 -1
- package/dist/components/input-pin/InputPin.vue.d.ts +6 -6
- package/dist/components/input-range/InputRange.vue +1 -1
- package/dist/components/input-range/InputRange.vue.d.ts +8 -8
- package/dist/components/input-range/utils/use-drag.d.ts +1 -1
- package/dist/components/label/Label.vue +16 -8
- package/dist/components/label/Label.vue.d.ts +4 -4
- package/dist/components/list-group/ListGroup.vue.d.ts +1 -1
- package/dist/components/list-group/ListGroupItem.vue.d.ts +2 -2
- package/dist/components/markdown/index.d.ts +1 -1
- package/dist/components/meta.json +19 -19
- package/dist/components/modal/Modal.vue +6 -6
- package/dist/components/modal/Modal.vue.d.ts +12 -12
- package/dist/components/nav/Nav.vue +7 -7
- package/dist/components/nav/Nav.vue.d.ts +3 -3
- package/dist/components/nav/NavItem.vue +1 -1
- package/dist/components/nav/NavItem.vue.d.ts +3 -3
- package/dist/components/nav/NavItemDropdown.vue.d.ts +5 -5
- package/dist/components/navbar/Navbar.vue +1 -1
- package/dist/components/navbar/Navbar.vue.d.ts +4 -4
- package/dist/components/navbar/NavbarNav.vue.d.ts +2 -2
- package/dist/components/navbar/index.d.ts +2 -2
- package/dist/components/navbar-menu/NavbarNavMenu.vue.d.ts +2 -2
- package/dist/components/page/Page.vue.d.ts +3 -3
- package/dist/components/pagination/Pagination.vue +5 -2
- package/dist/components/pagination/Pagination.vue.d.ts +3 -3
- package/dist/components/pdf-helipad/utils/use-drag.d.ts +2 -2
- package/dist/components/pdf-object/PdfObject.vue.d.ts +2 -2
- package/dist/components/pdf-object/PdfObjectAddon.vue.d.ts +2 -2
- package/dist/components/pdf-object/index.d.ts +3 -3
- package/dist/components/pdf-object/utils/use-drag.d.ts +1 -1
- package/dist/components/pdf-object/utils/use-drop.d.ts +1 -1
- package/dist/components/pdf-object/utils/use-resize.d.ts +2 -2
- package/dist/components/pdf-object/utils/use-selector.d.ts +2 -2
- package/dist/components/pdf-text/PdfText.vue.d.ts +3 -3
- package/dist/components/pdf-viewer/PdfError.vue.d.ts +1 -1
- package/dist/components/pdf-viewer/PdfNavigation.vue +7 -1
- package/dist/components/pdf-viewer/PdfNavigation.vue.d.ts +1 -1
- package/dist/components/pdf-viewer/PdfViewer.vue +1 -1
- package/dist/components/pdf-viewer/PdfViewer.vue.d.ts +8 -8
- package/dist/components/pdf-viewer/index.d.ts +1 -1
- package/dist/components/pdf-viewer/utils/use-idle.d.ts +1 -1
- package/dist/components/pdf-viewer/utils/use-sticky.d.ts +2 -2
- package/dist/components/pdf-viewer/utils/use-viewer.d.ts +1 -1
- package/dist/components/pdf-viewer/utils/use-viewer.mjs +6 -4
- package/dist/components/progress/Progress.vue.d.ts +1 -1
- package/dist/components/progress-indicator/ProgressIndicator.vue.d.ts +4 -4
- package/dist/components/progressbar/Progressbar.vue.d.ts +7 -7
- package/dist/components/radio/Radio.vue +5 -19
- package/dist/components/radio/Radio.vue.d.ts +8 -8
- package/dist/components/ringbar/Ringbar.vue.d.ts +7 -7
- package/dist/components/select/Select.vue +26 -23
- package/dist/components/select/SelectInput.vue +14 -3
- package/dist/components/select/SelectTags.vue +3 -2
- package/dist/components/select/adapter/adapter.d.ts +2 -2
- package/dist/components/select/adapter/async-adapter.d.ts +2 -2
- package/dist/components/select/adapter/async-adapter.mjs +2 -2
- package/dist/components/select/utils/use-on-scroll.d.ts +1 -1
- package/dist/components/select/utils/use-on-typing.d.ts +1 -1
- package/dist/components/sheet/Sheet.vue +3 -3
- package/dist/components/sidebar/Sidebar.vue +7 -6
- package/dist/components/sidebar/SidebarContent.vue +19 -25
- package/dist/components/sidebar/SidebarContent.vue.d.ts +16 -0
- package/dist/components/sidebar/SidebarNav.vue +18 -2
- package/dist/components/sidebar/index.d.ts +2 -2
- package/dist/components/sidebar-menu/SidebarMenu.vue +5 -5
- package/dist/components/sidebar-menu/SidebarMenuItem.vue +2 -2
- package/dist/components/sidebar-menu/index.d.ts +4 -4
- package/dist/components/signature-draw/SignatureDraw.vue.d.ts +3 -3
- package/dist/components/signature-draw/SignatureDrawDesktop.vue.d.ts +3 -3
- package/dist/components/signature-draw/SignatureDrawMobile.vue.d.ts +3 -3
- package/dist/components/signature-draw/utils/smooth-line.d.ts +1 -1
- package/dist/components/signature-draw/utils/straight-line.d.ts +1 -1
- package/dist/components/signature-draw/utils/use-draw.d.ts +1 -1
- package/dist/components/signature-text/SignatureText.vue.d.ts +6 -6
- package/dist/components/steps/Step.vue.d.ts +2 -2
- package/dist/components/steps/Steps.vue.d.ts +2 -2
- package/dist/components/steps/index.d.ts +1 -1
- package/dist/components/strengthbar/Strengthbar.vue +1 -1
- package/dist/components/strengthbar/Strengthbar.vue.d.ts +9 -9
- package/dist/components/subheading/Subheading.vue.d.ts +3 -3
- package/dist/components/table/Table.vue +5 -3
- package/dist/components/table/Table.vue.d.ts +12 -12
- package/dist/components/table/index.d.ts +2 -2
- package/dist/components/table-flex/TableFlex.vue +9 -5
- package/dist/components/table-static/TableStatic.vue +39 -8
- package/dist/components/table-static/TableStaticRoot.vue +1 -1
- package/dist/components/tabs/TabContent.vue +1 -1
- package/dist/components/tabs/Tabs.vue +17 -3
- package/dist/components/text/Text.vue.d.ts +4 -4
- package/dist/components/textarea/Textarea.vue.d.ts +8 -7
- package/dist/components/toast/Toast.vue +90 -17
- package/dist/components/toast/Toast.vue.d.ts +17 -5
- package/dist/components/toast/ToastContainer.vue +18 -13
- package/dist/components/toast/ToastContainer.vue.d.ts +6 -12
- package/dist/components/toast/ToastRoot.vue +1 -3
- package/dist/components/toast/ToastRoot.vue.d.ts +2 -2
- package/dist/components/toast/index.d.ts +5 -1
- package/dist/components/toggle/Toggle.vue +4 -25
- package/dist/components/toggle/Toggle.vue.d.ts +12 -12
- package/dist/components/tooltip/Tooltip.vue.d.ts +3 -3
- package/dist/components/tooltip/TooltipContainer.vue.d.ts +1 -1
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/components/tooltip/utils/parse-bindings.d.ts +2 -2
- package/dist/components/tour/TourDialog.vue +2 -2
- package/dist/components/tour/TourHighlight.vue.d.ts +1 -1
- package/dist/components/tour/core/step/conditional.d.ts +2 -2
- package/dist/components/tour/core/tour.d.ts +2 -1
- package/dist/components/tour/index.d.ts +1 -1
- package/dist/components/truncate/Truncate.vue +1 -8
- package/dist/components/truncate/Truncate.vue.d.ts +2 -2
- package/dist/components/utils/date.d.ts +2 -1
- package/dist/components/utils/vnode.d.ts +1 -1
- package/dist/components/wizard/Wizard.vue +2 -2
- package/dist/components/wizard/Wizard.vue.d.ts +2 -2
- package/dist/components/wizard/WizardBody.vue.d.ts +1 -1
- package/dist/components/wizard/WizardStep.vue.d.ts +2 -2
- package/dist/core/index.d.ts +5 -1
- package/dist/core/index.mjs +15 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/package.json +8 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PropType, StyleValue } from 'vue-demi';
|
|
2
|
-
import { ModelModifier } from '../camera/adapter/adapter';
|
|
1
|
+
import type { PropType, StyleValue } from 'vue-demi';
|
|
2
|
+
import type { ModelModifier } from '../camera/adapter/adapter';
|
|
3
3
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
4
4
|
modelValue: {
|
|
5
5
|
type: (StringConstructor | {
|
|
@@ -24,23 +24,23 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
24
24
|
default: undefined;
|
|
25
25
|
};
|
|
26
26
|
width: {
|
|
27
|
-
type: (
|
|
27
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
28
28
|
default: undefined;
|
|
29
29
|
};
|
|
30
30
|
height: {
|
|
31
|
-
type: (
|
|
31
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
32
32
|
default: undefined;
|
|
33
33
|
};
|
|
34
34
|
imgWidth: {
|
|
35
|
-
type: (
|
|
35
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
36
36
|
default: number;
|
|
37
37
|
};
|
|
38
38
|
imgHeight: {
|
|
39
|
-
type: (
|
|
39
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
40
40
|
default: number;
|
|
41
41
|
};
|
|
42
42
|
imgClass: {
|
|
43
|
-
type: (StringConstructor |
|
|
43
|
+
type: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
44
44
|
default: undefined;
|
|
45
45
|
};
|
|
46
46
|
rounded: {
|
|
@@ -96,23 +96,23 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
96
96
|
default: undefined;
|
|
97
97
|
};
|
|
98
98
|
width: {
|
|
99
|
-
type: (
|
|
99
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
100
100
|
default: undefined;
|
|
101
101
|
};
|
|
102
102
|
height: {
|
|
103
|
-
type: (
|
|
103
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
104
104
|
default: undefined;
|
|
105
105
|
};
|
|
106
106
|
imgWidth: {
|
|
107
|
-
type: (
|
|
107
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
108
108
|
default: number;
|
|
109
109
|
};
|
|
110
110
|
imgHeight: {
|
|
111
|
-
type: (
|
|
111
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
112
112
|
default: number;
|
|
113
113
|
};
|
|
114
114
|
imgClass: {
|
|
115
|
-
type: (StringConstructor |
|
|
115
|
+
type: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
116
116
|
default: undefined;
|
|
117
117
|
};
|
|
118
118
|
rounded: {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MaybeRef } from '@vueuse/core';
|
|
2
|
-
import { Ref } from 'vue-demi';
|
|
1
|
+
import type { MaybeRef } from '@vueuse/core';
|
|
2
|
+
import type { Ref } from 'vue-demi';
|
|
3
3
|
export declare function usePreview(file: MaybeRef<string | globalThis.File>, fallback?: string): Ref<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PropType } from 'vue-demi';
|
|
2
|
-
import { SizeVariant } from '../button';
|
|
1
|
+
import type { PropType } from 'vue-demi';
|
|
2
|
+
import type { SizeVariant } from '../button';
|
|
3
3
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
4
4
|
modelValue: {
|
|
5
5
|
type: PropType<Date | [Date, Date]>;
|
|
@@ -148,7 +148,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
148
148
|
range: boolean;
|
|
149
149
|
minRange: string;
|
|
150
150
|
maxRange: string;
|
|
151
|
-
format: string;
|
|
152
151
|
placeholder: string;
|
|
152
|
+
format: string;
|
|
153
153
|
}, {}>;
|
|
154
154
|
export default _default;
|
|
@@ -3,13 +3,27 @@
|
|
|
3
3
|
v-if="context"
|
|
4
4
|
:key="id"
|
|
5
5
|
v-model="modal"
|
|
6
|
+
class="dialog"
|
|
6
7
|
:title="context.title"
|
|
7
8
|
:size="context.size"
|
|
8
9
|
:centered="context.centered"
|
|
9
10
|
:dismissable="context.dismissable"
|
|
10
11
|
:no-close-on-backdrop="context.noCloseOnBackdrop"
|
|
11
|
-
:text="context.text"
|
|
12
12
|
@close="onCancel">
|
|
13
|
+
<template #header>
|
|
14
|
+
<Heading
|
|
15
|
+
v-p-md.inline="context.title"
|
|
16
|
+
class="modal__title"
|
|
17
|
+
element="h6" />
|
|
18
|
+
</template>
|
|
19
|
+
<template #default>
|
|
20
|
+
<template v-if="(typeof context.content === 'function')">
|
|
21
|
+
<component :is="context.content" />
|
|
22
|
+
</template>
|
|
23
|
+
<template v-else>
|
|
24
|
+
<span v-p-md.inline="context.text" />
|
|
25
|
+
</template>
|
|
26
|
+
</template>
|
|
13
27
|
<template #footer>
|
|
14
28
|
<dialog-footer
|
|
15
29
|
:align="context.footerAlign"
|
|
@@ -36,9 +50,16 @@ import {
|
|
|
36
50
|
ref
|
|
37
51
|
} from "vue-demi";
|
|
38
52
|
import Modal from "../modal/Modal.vue";
|
|
53
|
+
import Heading from "../heading/Heading.vue";
|
|
39
54
|
import DialogFooter from "./DialogFooter.vue";
|
|
55
|
+
import { pMd } from "../markdown";
|
|
40
56
|
export default defineComponent({
|
|
41
|
-
components: {
|
|
57
|
+
components: {
|
|
58
|
+
Modal,
|
|
59
|
+
Heading,
|
|
60
|
+
DialogFooter
|
|
61
|
+
},
|
|
62
|
+
directives: { pMd },
|
|
42
63
|
setup() {
|
|
43
64
|
const id = ref();
|
|
44
65
|
const modal = ref(false);
|
|
@@ -77,3 +98,9 @@ export default defineComponent({
|
|
|
77
98
|
}
|
|
78
99
|
});
|
|
79
100
|
</script>
|
|
101
|
+
|
|
102
|
+
<style lang="postcss">
|
|
103
|
+
.dialog {
|
|
104
|
+
--p-modal-z-index: theme(zIndex.dialog);
|
|
105
|
+
}
|
|
106
|
+
</style>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropType } from 'vue-demi';
|
|
1
|
+
import type { PropType } from 'vue-demi';
|
|
2
2
|
import type { StyleVariant as FooterButtonStyleVariant, ColorVariant as FooterButtonColorVariant } from '../button';
|
|
3
3
|
export type FooterAlignVariant = 'start' | 'end';
|
|
4
4
|
export type { StyleVariant as FooterButtonStyleVariant, ColorVariant as FooterButtonColorVariant, } from '../button';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { FooterAlignVariant, FooterButtonColorVariant, FooterButtonStyleVariant } from './DialogFooter.vue';
|
|
2
2
|
import type { SizeVariant } from '../modal';
|
|
3
|
+
import type { SizeVariant as InputSizeVariant } from '../button';
|
|
4
|
+
import type { VNode } from 'vue-demi';
|
|
5
|
+
import type { AcceptVariant } from '../input';
|
|
3
6
|
interface DialogButton {
|
|
4
7
|
text?: string;
|
|
5
8
|
visible?: boolean;
|
|
@@ -19,10 +22,24 @@ export interface DialogOptions {
|
|
|
19
22
|
cancel?: DialogButton;
|
|
20
23
|
confirm?: DialogButton;
|
|
21
24
|
}
|
|
25
|
+
export type DialogConfirmOption = DialogOptions;
|
|
26
|
+
export type DialogAlertOption = Omit<DialogOptions, 'cancel'>;
|
|
27
|
+
export interface DialogPromptOption extends DialogOptions {
|
|
28
|
+
value?: string;
|
|
29
|
+
input?: {
|
|
30
|
+
type?: string;
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
size?: InputSizeVariant;
|
|
33
|
+
clearable?: boolean;
|
|
34
|
+
accept?: AcceptVariant;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
22
37
|
export interface DialogContext extends DialogOptions {
|
|
23
38
|
onConfirm: () => void;
|
|
24
39
|
onCancel: () => void;
|
|
40
|
+
content?: () => VNode;
|
|
25
41
|
}
|
|
26
|
-
export declare function confirm(options:
|
|
27
|
-
export declare function alert(options:
|
|
42
|
+
export declare function confirm(options: DialogConfirmOption): Promise<boolean>;
|
|
43
|
+
export declare function alert(options: DialogConfirmOption): Promise<void>;
|
|
44
|
+
export declare function prompt(options: DialogPromptOption): Promise<string>;
|
|
28
45
|
export {};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { useSingleton } from "../global/use-singleton.mjs";
|
|
2
2
|
import defu from "defu";
|
|
3
|
+
import {
|
|
4
|
+
ref,
|
|
5
|
+
h
|
|
6
|
+
} from "vue-demi";
|
|
7
|
+
import pInput from "../input/Input.vue";
|
|
8
|
+
import pFormGroup from "../form-group/FormGroup.vue";
|
|
3
9
|
export async function confirm(options) {
|
|
4
10
|
const { default: Dialog } = await import("./Dialog.vue");
|
|
5
11
|
const modal = await useSingleton(Dialog);
|
|
@@ -30,3 +36,39 @@ export async function alert(options) {
|
|
|
30
36
|
}
|
|
31
37
|
));
|
|
32
38
|
}
|
|
39
|
+
export async function prompt(options) {
|
|
40
|
+
const { default: Dialog } = await import("./Dialog.vue");
|
|
41
|
+
const model = ref(options.value);
|
|
42
|
+
const modal = await useSingleton(Dialog);
|
|
43
|
+
const result = await new Promise((resolve) => {
|
|
44
|
+
modal.show(defu(
|
|
45
|
+
{
|
|
46
|
+
content: () => {
|
|
47
|
+
return h(pFormGroup, { label: options.text }, () => [
|
|
48
|
+
h(pInput, {
|
|
49
|
+
"type": options.input?.type,
|
|
50
|
+
"placeholder": options.input?.placeholder,
|
|
51
|
+
"size": options.input?.size,
|
|
52
|
+
"clearable": options.input?.clearable,
|
|
53
|
+
"accept": options.input?.accept,
|
|
54
|
+
"modelValue": model.value,
|
|
55
|
+
"onUpdate:modelValue": (value) => {
|
|
56
|
+
model.value = value;
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
]);
|
|
60
|
+
},
|
|
61
|
+
onConfirm: () => resolve(model.value),
|
|
62
|
+
onCancel: () => resolve("")
|
|
63
|
+
},
|
|
64
|
+
options,
|
|
65
|
+
{
|
|
66
|
+
title: "Question",
|
|
67
|
+
confirm: { text: "Submit" },
|
|
68
|
+
cancel: {},
|
|
69
|
+
centered: true
|
|
70
|
+
}
|
|
71
|
+
));
|
|
72
|
+
});
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
@@ -60,8 +60,11 @@ export default defineComponent({
|
|
|
60
60
|
* warning & danger
|
|
61
61
|
*/
|
|
62
62
|
&&--default {
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
--p-dot-bg-default: theme(backgroundColor.inverse);
|
|
64
|
+
--p-dot-bg-dark-default: theme(backgroundColor.dark.inverse);
|
|
65
|
+
|
|
66
|
+
@apply bg-[color:var(--p-dot-bg-default)];
|
|
67
|
+
@apply dark:bg-[color:var(--p-dot-bg-dark-default)];
|
|
65
68
|
}
|
|
66
69
|
|
|
67
70
|
&&--primary {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PropType } from 'vue-demi';
|
|
2
|
-
import { StyleVariant } from '.';
|
|
3
|
-
import { ColorVariant } from '../button';
|
|
1
|
+
import type { PropType } from 'vue-demi';
|
|
2
|
+
import type { StyleVariant } from '.';
|
|
3
|
+
import type { ColorVariant } from '../button';
|
|
4
4
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
5
5
|
color: {
|
|
6
6
|
type: PropType<ColorVariant>;
|
|
@@ -22,7 +22,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
22
22
|
default: string;
|
|
23
23
|
};
|
|
24
24
|
}>>, {
|
|
25
|
-
variant: StyleVariant;
|
|
26
25
|
color: ColorVariant;
|
|
26
|
+
variant: StyleVariant;
|
|
27
27
|
}, {}>;
|
|
28
28
|
export default _default;
|
|
@@ -67,15 +67,17 @@
|
|
|
67
67
|
</template>
|
|
68
68
|
|
|
69
69
|
<script lang="ts" setup>
|
|
70
|
-
import {
|
|
70
|
+
import type {
|
|
71
71
|
PropType,
|
|
72
|
+
VNode,
|
|
73
|
+
} from 'vue-demi'
|
|
74
|
+
import {
|
|
72
75
|
provide,
|
|
73
76
|
watch,
|
|
74
77
|
toRef,
|
|
75
78
|
watchEffect,
|
|
76
79
|
computed,
|
|
77
80
|
ref,
|
|
78
|
-
VNode,
|
|
79
81
|
} from 'vue-demi'
|
|
80
82
|
import {
|
|
81
83
|
onClickOutside,
|
|
@@ -84,8 +86,8 @@ import {
|
|
|
84
86
|
import Button from '../button/Button.vue'
|
|
85
87
|
import DropdownGroup from '../dropdown-subitem/DropdownSubitem.vue'
|
|
86
88
|
import { useFocus } from './utils/use-focus'
|
|
89
|
+
import type { Placement } from '@floating-ui/dom'
|
|
87
90
|
import {
|
|
88
|
-
Placement,
|
|
89
91
|
autoUpdate,
|
|
90
92
|
computePosition,
|
|
91
93
|
offset,
|
|
@@ -216,15 +218,15 @@ const classNames = computed(() => {
|
|
|
216
218
|
if (props.divider)
|
|
217
219
|
result.push('dropdown--divider')
|
|
218
220
|
|
|
221
|
+
if (props.menuSize)
|
|
222
|
+
result.push(`dropdown--menu-${props.menuSize}`)
|
|
223
|
+
|
|
219
224
|
return result
|
|
220
225
|
})
|
|
221
226
|
|
|
222
227
|
const containerSize = computed(() => {
|
|
223
228
|
const result: string[] = ['']
|
|
224
229
|
|
|
225
|
-
if (props.menuSize)
|
|
226
|
-
result.push(`dropdown__menu--${props.menuSize}`)
|
|
227
|
-
|
|
228
230
|
if (slots.prepend)
|
|
229
231
|
result.push('dropdown__menu--has-prepend')
|
|
230
232
|
|
|
@@ -360,8 +362,24 @@ defineExpose({
|
|
|
360
362
|
|
|
361
363
|
@apply inline-flex;
|
|
362
364
|
|
|
365
|
+
&--menu-xl {
|
|
366
|
+
--p-dropdown-size: var(--p-dropdown-size-xl);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
&--menu-lg {
|
|
370
|
+
--p-dropdown-size: var(--p-dropdown-size-lg);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
&--menu-md {
|
|
374
|
+
--p-dropdown-size: var(--p-dropdown-size-md);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
&--menu-sm {
|
|
378
|
+
--p-dropdown-size: var(--p-dropdown-size-sm);
|
|
379
|
+
}
|
|
380
|
+
|
|
363
381
|
&__menu {
|
|
364
|
-
@apply border rounded bg-default z-[var(--p-dropdown-z-index)] border-default shadow-xl absolute flex flex-col overflow-hidden;
|
|
382
|
+
@apply border rounded bg-default z-[var(--p-dropdown-z-index)] border-default shadow-xl absolute flex flex-col overflow-hidden w-[var(--p-dropdown-size)];
|
|
365
383
|
@apply dark:bg-dark-default dark:border-dark-default;
|
|
366
384
|
|
|
367
385
|
&__prepend,
|
|
@@ -370,7 +388,7 @@ defineExpose({
|
|
|
370
388
|
}
|
|
371
389
|
|
|
372
390
|
&__body {
|
|
373
|
-
@apply max-h-[var(--p-dropdown-max-height)] overflow-x-hidden overflow-y-auto
|
|
391
|
+
@apply max-h-[var(--p-dropdown-max-height)] overflow-x-hidden overflow-y-auto grow;
|
|
374
392
|
}
|
|
375
393
|
|
|
376
394
|
&:not(&--has-prepend) &__container {
|
|
@@ -390,22 +408,6 @@ defineExpose({
|
|
|
390
408
|
}
|
|
391
409
|
}
|
|
392
410
|
}
|
|
393
|
-
|
|
394
|
-
&--xl {
|
|
395
|
-
@apply w-[var(--p-dropdown-size-xl)];
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
&--lg {
|
|
399
|
-
@apply w-[var(--p-dropdown-size-lg)];
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
&--md {
|
|
403
|
-
@apply w-[var(--p-dropdown-size-md)];
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
&--sm {
|
|
407
|
-
@apply w-[var(--p-dropdown-size-sm)];
|
|
408
|
-
}
|
|
409
411
|
}
|
|
410
412
|
|
|
411
413
|
&__activator > &__caret {
|
|
@@ -84,7 +84,8 @@ export default defineComponent({
|
|
|
84
84
|
@apply dark:bg-dark-default-alpha dark:text-dark-default;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
&&--active
|
|
87
|
+
&&--active,
|
|
88
|
+
&.selected {
|
|
88
89
|
@apply bg-default-alpha text-default;
|
|
89
90
|
@apply dark:bg-dark-default-alpha cursor-default dark:text-dark-default;
|
|
90
91
|
}
|
|
@@ -152,17 +152,17 @@ export default defineComponent({
|
|
|
152
152
|
@apply flex items-center space-x-1;
|
|
153
153
|
|
|
154
154
|
&--back {
|
|
155
|
-
@apply
|
|
155
|
+
@apply shrink-0;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
&__content {
|
|
160
|
-
@apply
|
|
160
|
+
@apply grow;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
&__next,
|
|
164
164
|
&__back {
|
|
165
|
-
@apply
|
|
165
|
+
@apply shrink-0;
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PropType } from 'vue-demi';
|
|
2
|
-
import { ModelModifier, MultipleType } from '.';
|
|
1
|
+
import type { PropType } from 'vue-demi';
|
|
2
|
+
import type { ModelModifier, MultipleType } from '.';
|
|
3
3
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
4
4
|
modelValue: {
|
|
5
5
|
type: PropType<string | string[] | File | File[]>;
|
|
@@ -14,7 +14,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
14
14
|
default: boolean;
|
|
15
15
|
};
|
|
16
16
|
maxlength: {
|
|
17
|
-
type: (
|
|
17
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
18
18
|
default: undefined;
|
|
19
19
|
};
|
|
20
20
|
accept: {
|
|
@@ -57,7 +57,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
57
57
|
default: boolean;
|
|
58
58
|
};
|
|
59
59
|
maxlength: {
|
|
60
|
-
type: (
|
|
60
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
61
61
|
default: undefined;
|
|
62
62
|
};
|
|
63
63
|
accept: {
|
|
@@ -84,10 +84,10 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
84
84
|
modelValue: string | string[] | File | File[];
|
|
85
85
|
disabled: boolean;
|
|
86
86
|
readonly: boolean;
|
|
87
|
+
accept: string;
|
|
87
88
|
modelModifiers: ModelModifier;
|
|
88
89
|
multiple: boolean | MultipleType;
|
|
89
90
|
maxlength: string | number;
|
|
90
|
-
accept: string;
|
|
91
91
|
clearOnCancel: boolean;
|
|
92
92
|
}, {}>;
|
|
93
93
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SelectProps } from '../select';
|
|
2
|
-
import { Adapter } from '../select/adapter/adapter';
|
|
3
|
-
import { CalendarMode } from '../calendar/adapter/adapter';
|
|
4
|
-
import { MaybeRef } from '@vueuse/core';
|
|
1
|
+
import type { SelectProps } from '../select';
|
|
2
|
+
import type { Adapter } from '../select/adapter/adapter';
|
|
3
|
+
import type { CalendarMode } from '../calendar/adapter/adapter';
|
|
4
|
+
import type { MaybeRef } from '@vueuse/core';
|
|
5
5
|
interface FilterType {
|
|
6
6
|
key: string;
|
|
7
7
|
label?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PropType } from 'vue-demi';
|
|
2
|
-
import { FilterSelect } from '..';
|
|
3
|
-
import { SelectItem } from '../../select';
|
|
1
|
+
import type { PropType } from 'vue-demi';
|
|
2
|
+
import type { FilterSelect } from '..';
|
|
3
|
+
import type { SelectItem } from '../../select';
|
|
4
4
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
5
5
|
schema: {
|
|
6
6
|
type: PropType<FilterSelect>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PropType } from 'vue-demi';
|
|
2
|
-
import { FilterSelect } from '..';
|
|
3
|
-
import { SelectItem } from '../../select';
|
|
1
|
+
import type { PropType } from 'vue-demi';
|
|
2
|
+
import type { FilterSelect } from '..';
|
|
3
|
+
import type { SelectItem } from '../../select';
|
|
4
4
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
5
5
|
schema: {
|
|
6
6
|
type: PropType<FilterSelect>;
|
|
@@ -11,7 +11,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
11
11
|
default: () => never[];
|
|
12
12
|
};
|
|
13
13
|
modelValue: {
|
|
14
|
-
type: (
|
|
14
|
+
type: (NumberConstructor | StringConstructor | BooleanConstructor | ObjectConstructor | DateConstructor | ArrayConstructor)[];
|
|
15
15
|
default: undefined;
|
|
16
16
|
};
|
|
17
17
|
}, {
|
|
@@ -30,7 +30,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
30
30
|
default: () => never[];
|
|
31
31
|
};
|
|
32
32
|
modelValue: {
|
|
33
|
-
type: (
|
|
33
|
+
type: (NumberConstructor | StringConstructor | BooleanConstructor | ObjectConstructor | DateConstructor | ArrayConstructor)[];
|
|
34
34
|
default: undefined;
|
|
35
35
|
};
|
|
36
36
|
}>> & {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { PropType } from 'vue-demi';
|
|
2
|
-
import { FilterToggle } from '..';
|
|
1
|
+
import type { PropType } from 'vue-demi';
|
|
2
|
+
import type { FilterToggle } from '..';
|
|
3
3
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
4
4
|
schema: {
|
|
5
5
|
type: PropType<FilterToggle>;
|
|
6
6
|
required: true;
|
|
7
7
|
};
|
|
8
8
|
modelValue: {
|
|
9
|
-
type: (
|
|
9
|
+
type: (NumberConstructor | StringConstructor | BooleanConstructor | ObjectConstructor | DateConstructor | ArrayConstructor)[];
|
|
10
10
|
default: boolean;
|
|
11
11
|
};
|
|
12
12
|
value: {
|
|
13
|
-
type: (
|
|
13
|
+
type: (NumberConstructor | StringConstructor | BooleanConstructor | ObjectConstructor | DateConstructor | ArrayConstructor)[];
|
|
14
14
|
default: boolean;
|
|
15
15
|
};
|
|
16
16
|
uncheckedValue: {
|
|
17
|
-
type: (
|
|
17
|
+
type: (NumberConstructor | StringConstructor | BooleanConstructor | ObjectConstructor | DateConstructor | ArrayConstructor)[];
|
|
18
18
|
default: boolean;
|
|
19
19
|
};
|
|
20
20
|
checked: {
|
|
@@ -30,15 +30,15 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
30
30
|
required: true;
|
|
31
31
|
};
|
|
32
32
|
modelValue: {
|
|
33
|
-
type: (
|
|
33
|
+
type: (NumberConstructor | StringConstructor | BooleanConstructor | ObjectConstructor | DateConstructor | ArrayConstructor)[];
|
|
34
34
|
default: boolean;
|
|
35
35
|
};
|
|
36
36
|
value: {
|
|
37
|
-
type: (
|
|
37
|
+
type: (NumberConstructor | StringConstructor | BooleanConstructor | ObjectConstructor | DateConstructor | ArrayConstructor)[];
|
|
38
38
|
default: boolean;
|
|
39
39
|
};
|
|
40
40
|
uncheckedValue: {
|
|
41
|
-
type: (
|
|
41
|
+
type: (NumberConstructor | StringConstructor | BooleanConstructor | ObjectConstructor | DateConstructor | ArrayConstructor)[];
|
|
42
42
|
default: boolean;
|
|
43
43
|
};
|
|
44
44
|
checked: {
|