@privyid/persona 0.17.1 → 0.18.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/avatar/utils/create-image.mjs +1 -1
- package/dist/components/banner/Banner.vue +3 -3
- package/dist/components/breadcrumbs/BreadcrumbItem.vue +1 -1
- package/dist/components/breadcrumbs/BreadcrumbItemDropdown.vue +1 -1
- package/dist/components/button/Button.vue +24 -11
- package/dist/components/button/Button.vue.d.ts +19 -9
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/calendar/Calendar.vue +8 -4
- package/dist/components/camera/Camera.vue +3 -3
- package/dist/components/card/Card.vue +9 -3
- package/dist/components/card/Card.vue.d.ts +1 -1
- package/dist/components/carousel/Carousel.vue.d.ts +6 -6
- package/dist/components/chart/ChartSet.vue.d.ts +2 -2
- package/dist/components/chart/ChartVal.vue.d.ts +4 -4
- package/dist/components/checkbox/Checkbox.vue.d.ts +6 -6
- package/dist/components/checkbox/index.mjs +1 -1
- package/dist/components/collapse/Collapse.vue +12 -1
- package/dist/components/contextual-bar/ContextualBar.vue +1 -1
- package/dist/components/contextual-bar/ContextualBar.vue.d.ts +2 -2
- package/dist/components/cropper/Cropper.vue +4 -4
- package/dist/components/cropper/Cropper.vue.d.ts +8 -8
- package/dist/components/datepicker/Datepicker.vue +19 -4
- package/dist/components/datepicker/Datepicker.vue.d.ts +10 -0
- package/dist/components/dropdown/Dropdown.vue +1 -1
- package/dist/components/dropdown/Dropdown.vue.d.ts +4 -4
- package/dist/components/dropdown/DropdownItem.vue +10 -0
- package/dist/components/dropdown/DropdownItem.vue.d.ts +9 -0
- package/dist/components/dropdown/utils/use-focus.d.ts +1 -1
- package/dist/components/dropdown/utils/use-focus.mjs +2 -2
- package/dist/components/dropdown-subitem/DropdownSubitem.vue +2 -2
- package/dist/components/dropzone/Dropzone.vue.d.ts +2 -2
- package/dist/components/filterbar/pinned/PinnedDate.vue +4 -7
- package/dist/components/filterbar/pinned/PinnedMultiselect.vue +4 -7
- package/dist/components/filterbar/pinned/PinnedSelect.vue +5 -7
- package/dist/components/filterbar/pinned/PinnedSelect.vue.d.ts +2 -2
- package/dist/components/filterbar/pinned/PinnedToggle.vue.d.ts +6 -6
- package/dist/components/form-group/FormGroup.vue +1 -1
- package/dist/components/global/router.d.ts +2 -1
- package/dist/components/input/Input.vue +22 -4
- package/dist/components/input/Input.vue.d.ts +22 -2
- package/dist/components/input/index.d.ts +1 -0
- package/dist/components/input/index.mjs +5 -0
- package/dist/components/input/utils/accept.d.ts +26 -0
- package/dist/components/input/utils/accept.mjs +81 -0
- package/dist/components/input-file/InputFile.vue.d.ts +3 -3
- package/dist/components/input-password/InputPassword.vue +4 -1
- package/dist/components/input-password/InputPassword.vue.d.ts +7 -3
- package/dist/components/input-pin/InputPin.vue +45 -30
- package/dist/components/input-pin/InputPin.vue.d.ts +26 -7
- package/dist/components/input-pin/index.d.ts +6 -0
- package/dist/components/input-pin/index.mjs +3 -0
- package/dist/components/input-range/InputRange.vue +5 -5
- package/dist/components/input-range/InputRange.vue.d.ts +6 -6
- package/dist/components/label/Label.vue +1 -1
- package/dist/components/label/Label.vue.d.ts +1 -1
- package/dist/components/list-group/ListGroup.vue +25 -0
- package/dist/components/list-group/ListGroup.vue.d.ts +18 -0
- package/dist/components/modal/Modal.vue +5 -2
- package/dist/components/modal/Modal.vue.d.ts +2 -2
- package/dist/components/nav/NavItem.vue +19 -6
- package/dist/components/nav/NavItem.vue.d.ts +6 -3
- package/dist/components/nav/NavItemDropdown.vue.d.ts +1 -1
- package/dist/components/navbar/Navbar.vue.d.ts +1 -1
- package/dist/components/navbar/NavbarToggle.vue +2 -2
- package/dist/components/pagination/Pagination.vue +2 -2
- package/dist/components/pagination/Pagination.vue.d.ts +1 -1
- package/dist/components/pdf-text/PdfText.vue.d.ts +1 -1
- package/dist/components/pdf-viewer/PdfNavigation.vue +4 -4
- package/dist/components/pdf-viewer/PdfViewer.vue +1 -2
- package/dist/components/pdf-viewer/PdfViewer.vue.d.ts +4 -4
- package/dist/components/progress-indicator/ProgressIndicator.vue.d.ts +2 -2
- package/dist/components/radio/Radio.vue +1 -1
- package/dist/components/radio/Radio.vue.d.ts +4 -4
- package/dist/components/select/Select.vue +54 -27
- package/dist/components/select/Select.vue.d.ts +23 -5
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/index.mjs +4 -0
- package/dist/components/sidebar/Sidebar.vue.d.ts +1 -1
- package/dist/components/sidebar/SidebarNav.vue +2 -0
- package/dist/components/sidebar-menu/SidebarMenu.vue +68 -48
- package/dist/components/sidebar-menu/SidebarMenu.vue.d.ts +3 -3
- package/dist/components/sidebar-menu/index.d.ts +95 -2
- package/dist/components/sidebar-menu/index.mjs +41 -0
- package/dist/components/signature-draw/SignatureDrawMobile.vue +3 -7
- package/dist/components/signature-text/SignatureText.vue.d.ts +5 -5
- package/dist/components/spinner/Spinner.vue +28 -12
- package/dist/components/spinner/SpinnerRing.vue +14 -7
- package/dist/components/spinner/SpinnerRinggo.vue +62 -0
- package/dist/components/spinner/SpinnerRinggo.vue.d.ts +6 -0
- package/dist/components/steps/Step.vue +3 -0
- package/dist/components/steps/Step.vue.d.ts +1 -0
- package/dist/components/steps/Steps.vue +1 -0
- package/dist/components/steps/index.d.ts +2 -0
- package/dist/components/steps/index.mjs +1 -0
- package/dist/components/strengthbar/Strengthbar.vue.d.ts +9 -9
- package/dist/components/table/Table.vue +2 -2
- package/dist/components/tabs/Tabs.vue +4 -2
- package/dist/components/textarea/Textarea.vue +10 -1
- package/dist/components/textarea/Textarea.vue.d.ts +16 -4
- package/dist/components/toast/Toast.vue +5 -5
- package/dist/components/toast/ToastContainer.vue +6 -6
- package/dist/components/toggle/Toggle.vue +1 -1
- package/dist/components/toggle/Toggle.vue.d.ts +6 -6
- package/dist/components/tooltip/Tooltip.vue.d.ts +1 -1
- package/dist/components/tooltip/TooltipContainer.vue +18 -3
- package/dist/components/tooltip/index.d.ts +3 -0
- package/dist/components/tooltip/index.mjs +29 -4
- package/dist/components/tooltip/utils/parse-bindings.d.ts +2 -1
- package/dist/components/tooltip/utils/parse-bindings.mjs +2 -0
- package/dist/components/tour/TourDialog.vue +1 -1
- package/dist/components/tour/TourDialog.vue.d.ts +1 -1
- package/dist/components/truncate/Truncate.vue +9 -1
- package/dist/components/truncate/Truncate.vue.d.ts +11 -2
- package/dist/core/index.d.ts +2 -1
- package/dist/core/index.mjs +7 -1
- package/dist/module.json +1 -1
- package/package.json +14 -14
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
:rows="rows"
|
|
15
15
|
:maxlength="maxlength"
|
|
16
16
|
:aria-valuemax="maxlength"
|
|
17
|
+
@beforeinput="checkOnInput(accept, $event)"
|
|
17
18
|
@input="handleInput" />
|
|
18
19
|
<div
|
|
19
20
|
v-if="showCounter"
|
|
@@ -25,7 +26,10 @@
|
|
|
25
26
|
</template>
|
|
26
27
|
|
|
27
28
|
<script>
|
|
28
|
-
import {
|
|
29
|
+
import {
|
|
30
|
+
checkOnInput,
|
|
31
|
+
useVModel
|
|
32
|
+
} from "../input";
|
|
29
33
|
import {
|
|
30
34
|
defineComponent,
|
|
31
35
|
computed,
|
|
@@ -75,6 +79,10 @@ export default defineComponent({
|
|
|
75
79
|
maxlength: {
|
|
76
80
|
type: [Number, String],
|
|
77
81
|
default: void 0
|
|
82
|
+
},
|
|
83
|
+
accept: {
|
|
84
|
+
type: String,
|
|
85
|
+
default: void 0
|
|
78
86
|
}
|
|
79
87
|
},
|
|
80
88
|
models: {
|
|
@@ -122,6 +130,7 @@ export default defineComponent({
|
|
|
122
130
|
model,
|
|
123
131
|
classNames,
|
|
124
132
|
handleInput,
|
|
133
|
+
checkOnInput,
|
|
125
134
|
charactersLength,
|
|
126
135
|
calculateRowHeight
|
|
127
136
|
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AcceptVariant, checkOnInput } from '../input';
|
|
2
|
+
import { PropType } from 'vue-demi';
|
|
1
3
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
2
4
|
modelValue: {
|
|
3
5
|
type: StringConstructor;
|
|
@@ -32,17 +34,22 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
32
34
|
default: boolean;
|
|
33
35
|
};
|
|
34
36
|
rows: {
|
|
35
|
-
type: (
|
|
37
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
36
38
|
default: number;
|
|
37
39
|
};
|
|
38
40
|
maxlength: {
|
|
39
|
-
type: (
|
|
41
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
42
|
+
default: undefined;
|
|
43
|
+
};
|
|
44
|
+
accept: {
|
|
45
|
+
type: PropType<AcceptVariant>;
|
|
40
46
|
default: undefined;
|
|
41
47
|
};
|
|
42
48
|
}, {
|
|
43
49
|
model: import("vue-demi").Ref<string | undefined>;
|
|
44
50
|
classNames: import("vue-demi").ComputedRef<string[]>;
|
|
45
51
|
handleInput: () => void;
|
|
52
|
+
checkOnInput: typeof checkOnInput;
|
|
46
53
|
charactersLength: import("vue-demi").ComputedRef<number | "0">;
|
|
47
54
|
calculateRowHeight: () => void;
|
|
48
55
|
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("input" | "update:modelValue")[], "input" | "update:modelValue", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
@@ -79,11 +86,15 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
79
86
|
default: boolean;
|
|
80
87
|
};
|
|
81
88
|
rows: {
|
|
82
|
-
type: (
|
|
89
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
83
90
|
default: number;
|
|
84
91
|
};
|
|
85
92
|
maxlength: {
|
|
86
|
-
type: (
|
|
93
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
94
|
+
default: undefined;
|
|
95
|
+
};
|
|
96
|
+
accept: {
|
|
97
|
+
type: PropType<AcceptVariant>;
|
|
87
98
|
default: undefined;
|
|
88
99
|
};
|
|
89
100
|
}>> & {
|
|
@@ -97,6 +108,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
97
108
|
readonly: boolean;
|
|
98
109
|
placeholder: string;
|
|
99
110
|
maxlength: string | number;
|
|
111
|
+
accept: AcceptVariant;
|
|
100
112
|
showCounter: boolean;
|
|
101
113
|
rows: string | number;
|
|
102
114
|
autoGrow: boolean;
|
|
@@ -32,11 +32,11 @@ import {
|
|
|
32
32
|
onMounted,
|
|
33
33
|
onUnmounted
|
|
34
34
|
} from "vue-demi";
|
|
35
|
-
import IconInfo from "@
|
|
36
|
-
import IconSuccess from "@
|
|
37
|
-
import IconWarning from "@
|
|
38
|
-
import IconError from "@
|
|
39
|
-
import IconClose from "@
|
|
35
|
+
import IconInfo from "@privyid/persona-icon/vue/information-circle-solid/24.vue";
|
|
36
|
+
import IconSuccess from "@privyid/persona-icon/vue/checkmark/24.vue";
|
|
37
|
+
import IconWarning from "@privyid/persona-icon/vue/exclamation-circle-solid/24.vue";
|
|
38
|
+
import IconError from "@privyid/persona-icon/vue/exclamation-triangle-solid/24.vue";
|
|
39
|
+
import IconClose from "@privyid/persona-icon/vue/close/16.vue";
|
|
40
40
|
const ToastIcons = {
|
|
41
41
|
info: IconInfo,
|
|
42
42
|
success: IconSuccess,
|
|
@@ -76,7 +76,7 @@ export default defineComponent({
|
|
|
76
76
|
@apply z-[var(--p-toast-z-index)] fixed flex flex-col space-y-2 max-h-screen overflow-visible;
|
|
77
77
|
|
|
78
78
|
&--top-right {
|
|
79
|
-
@apply top-
|
|
79
|
+
@apply top-2 right-4;
|
|
80
80
|
|
|
81
81
|
.toast {
|
|
82
82
|
&-enter-from,
|
|
@@ -87,7 +87,7 @@ export default defineComponent({
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
&--top-center {
|
|
90
|
-
@apply top-
|
|
90
|
+
@apply top-2 left-1/2 -translate-x-1/2;
|
|
91
91
|
|
|
92
92
|
.toast {
|
|
93
93
|
&-enter-from,
|
|
@@ -98,7 +98,7 @@ export default defineComponent({
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
&--top-left {
|
|
101
|
-
@apply top-
|
|
101
|
+
@apply top-2 left-4;
|
|
102
102
|
|
|
103
103
|
.toast {
|
|
104
104
|
&-enter-from,
|
|
@@ -109,7 +109,7 @@ export default defineComponent({
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
&--bottom-right {
|
|
112
|
-
@apply bottom-
|
|
112
|
+
@apply bottom-2 right-4;
|
|
113
113
|
|
|
114
114
|
.toast {
|
|
115
115
|
&-enter-from,
|
|
@@ -120,7 +120,7 @@ export default defineComponent({
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
&--bottom-center {
|
|
123
|
-
@apply bottom-
|
|
123
|
+
@apply bottom-2 left-1/2 -translate-x-1/2;
|
|
124
124
|
|
|
125
125
|
.toast {
|
|
126
126
|
&-enter-from,
|
|
@@ -131,7 +131,7 @@ export default defineComponent({
|
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
&--bottom-left {
|
|
134
|
-
@apply bottom-
|
|
134
|
+
@apply bottom-2 left-4;
|
|
135
135
|
|
|
136
136
|
.toast {
|
|
137
137
|
&-enter-from,
|
|
@@ -140,7 +140,7 @@ export default defineComponent({
|
|
|
140
140
|
@apply dark:text-dark-default;
|
|
141
141
|
|
|
142
142
|
&__switch {
|
|
143
|
-
@apply flex items-center justify-center relative bg-subtle border-default;
|
|
143
|
+
@apply flex items-center justify-center relative bg-subtle border-default font-medium;
|
|
144
144
|
@apply dark:bg-dark-subtle dark:border-dark-default;
|
|
145
145
|
}
|
|
146
146
|
|
|
@@ -6,15 +6,15 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
6
6
|
default: string;
|
|
7
7
|
};
|
|
8
8
|
modelValue: {
|
|
9
|
-
type: (StringConstructor | ArrayConstructor | ObjectConstructor | BooleanConstructor | DateConstructor
|
|
9
|
+
type: (NumberConstructor | StringConstructor | ArrayConstructor | ObjectConstructor | BooleanConstructor | DateConstructor)[];
|
|
10
10
|
default: boolean;
|
|
11
11
|
};
|
|
12
12
|
value: {
|
|
13
|
-
type: (StringConstructor | ArrayConstructor | ObjectConstructor | BooleanConstructor | DateConstructor
|
|
13
|
+
type: (NumberConstructor | StringConstructor | ArrayConstructor | ObjectConstructor | BooleanConstructor | DateConstructor)[];
|
|
14
14
|
default: boolean;
|
|
15
15
|
};
|
|
16
16
|
uncheckedValue: {
|
|
17
|
-
type: (StringConstructor | ArrayConstructor | ObjectConstructor | BooleanConstructor | DateConstructor
|
|
17
|
+
type: (NumberConstructor | StringConstructor | ArrayConstructor | ObjectConstructor | BooleanConstructor | DateConstructor)[];
|
|
18
18
|
default: boolean;
|
|
19
19
|
};
|
|
20
20
|
checked: {
|
|
@@ -51,15 +51,15 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
51
51
|
default: string;
|
|
52
52
|
};
|
|
53
53
|
modelValue: {
|
|
54
|
-
type: (StringConstructor | ArrayConstructor | ObjectConstructor | BooleanConstructor | DateConstructor
|
|
54
|
+
type: (NumberConstructor | StringConstructor | ArrayConstructor | ObjectConstructor | BooleanConstructor | DateConstructor)[];
|
|
55
55
|
default: boolean;
|
|
56
56
|
};
|
|
57
57
|
value: {
|
|
58
|
-
type: (StringConstructor | ArrayConstructor | ObjectConstructor | BooleanConstructor | DateConstructor
|
|
58
|
+
type: (NumberConstructor | StringConstructor | ArrayConstructor | ObjectConstructor | BooleanConstructor | DateConstructor)[];
|
|
59
59
|
default: boolean;
|
|
60
60
|
};
|
|
61
61
|
uncheckedValue: {
|
|
62
|
-
type: (StringConstructor | ArrayConstructor | ObjectConstructor | BooleanConstructor | DateConstructor
|
|
62
|
+
type: (NumberConstructor | StringConstructor | ArrayConstructor | ObjectConstructor | BooleanConstructor | DateConstructor)[];
|
|
63
63
|
default: boolean;
|
|
64
64
|
};
|
|
65
65
|
checked: {
|
|
@@ -21,7 +21,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
21
21
|
}, {
|
|
22
22
|
isShow: import("vue-demi").Ref<boolean>;
|
|
23
23
|
classNames: import("vue-demi").ComputedRef<string[]>;
|
|
24
|
-
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("
|
|
24
|
+
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("show" | "update:modelValue" | "hide")[], "show" | "update:modelValue" | "hide", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
25
25
|
modelValue: {
|
|
26
26
|
type: BooleanConstructor;
|
|
27
27
|
default: boolean;
|
|
@@ -40,14 +40,29 @@ export default defineComponent({
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
function show(id) {
|
|
43
|
-
items.value.get(id)
|
|
43
|
+
const item = items.value.get(id);
|
|
44
|
+
const result = item.target.dispatchEvent(new CustomEvent("tooltip:show", {
|
|
45
|
+
detail: item,
|
|
46
|
+
cancelable: true
|
|
47
|
+
}));
|
|
48
|
+
if (result)
|
|
49
|
+
item.isShow = true;
|
|
44
50
|
}
|
|
45
51
|
function hide(id) {
|
|
46
|
-
items.value.get(id)
|
|
52
|
+
const item = items.value.get(id);
|
|
53
|
+
const result = item.target.dispatchEvent(new CustomEvent("tooltip:hide", {
|
|
54
|
+
detail: item,
|
|
55
|
+
cancelable: true
|
|
56
|
+
}));
|
|
57
|
+
if (result)
|
|
58
|
+
item.isShow = false;
|
|
47
59
|
}
|
|
48
60
|
function toggle(id) {
|
|
49
61
|
const item = items.value.get(id);
|
|
50
|
-
|
|
62
|
+
if (item.isShow)
|
|
63
|
+
hide(id);
|
|
64
|
+
else
|
|
65
|
+
show(id);
|
|
51
66
|
}
|
|
52
67
|
function remove(id) {
|
|
53
68
|
items.value.delete(id);
|
|
@@ -12,3 +12,6 @@ export interface TooltipItem extends TooltipOptions {
|
|
|
12
12
|
}
|
|
13
13
|
export declare const pTooltip: Directive<HTMLElement, string | boolean>;
|
|
14
14
|
export declare const vPTooltip: import("vue-demi").ObjectDirective<HTMLElement, string | boolean>;
|
|
15
|
+
export declare function showTooltip(selector: string | HTMLElement): Promise<void>;
|
|
16
|
+
export declare function hideTooltip(selector: string | HTMLElement): Promise<void>;
|
|
17
|
+
export declare function toggleTooltip(selector: string | HTMLElement): Promise<void>;
|
|
@@ -11,10 +11,14 @@ const handleMouseEnter = createHandler("hover", "show");
|
|
|
11
11
|
const handleMouseLeave = createHandler("hover", "hide");
|
|
12
12
|
const handleFocus = createHandler("focus", "show");
|
|
13
13
|
const handleBlur = createHandler("focus", "hide");
|
|
14
|
+
async function useTooltip() {
|
|
15
|
+
const { default: TooltipContainer } = await import("./TooltipContainer.vue");
|
|
16
|
+
const tooltip = await useSingleton(TooltipContainer);
|
|
17
|
+
return tooltip;
|
|
18
|
+
}
|
|
14
19
|
export const pTooltip = {
|
|
15
20
|
async mounted(el, bindings) {
|
|
16
|
-
const
|
|
17
|
-
const tooltip = await useSingleton(TooltipContainer);
|
|
21
|
+
const tooltip = await useTooltip();
|
|
18
22
|
const action = parseAction(el, bindings);
|
|
19
23
|
const color = parseColor(el, bindings);
|
|
20
24
|
const text = parseText(el, bindings);
|
|
@@ -38,8 +42,7 @@ export const pTooltip = {
|
|
|
38
42
|
el.addEventListener("blur", handleBlur, { passive: true });
|
|
39
43
|
},
|
|
40
44
|
async updated(el, bindings) {
|
|
41
|
-
const
|
|
42
|
-
const tooltip = await useSingleton(TooltipContainer);
|
|
45
|
+
const tooltip = await useTooltip();
|
|
43
46
|
const id = el.dataset.tooltipId;
|
|
44
47
|
const action = parseAction(el, bindings);
|
|
45
48
|
const color = parseColor(el, bindings);
|
|
@@ -80,3 +83,25 @@ export const pTooltip = {
|
|
|
80
83
|
}
|
|
81
84
|
};
|
|
82
85
|
export const vPTooltip = pTooltip;
|
|
86
|
+
function getTooltipId(selector) {
|
|
87
|
+
const targets = selector instanceof HTMLElement ? [selector] : [...document.querySelectorAll(selector)];
|
|
88
|
+
return targets.map((target) => target?.dataset.tooltipId).filter(Boolean);
|
|
89
|
+
}
|
|
90
|
+
export async function showTooltip(selector) {
|
|
91
|
+
const ids = getTooltipId(selector);
|
|
92
|
+
const tooltip = await useTooltip();
|
|
93
|
+
for (const id of ids)
|
|
94
|
+
tooltip.show(id);
|
|
95
|
+
}
|
|
96
|
+
export async function hideTooltip(selector) {
|
|
97
|
+
const ids = getTooltipId(selector);
|
|
98
|
+
const tooltip = await useTooltip();
|
|
99
|
+
for (const id of ids)
|
|
100
|
+
tooltip.hide(id);
|
|
101
|
+
}
|
|
102
|
+
export async function toggleTooltip(selector) {
|
|
103
|
+
const ids = getTooltipId(selector);
|
|
104
|
+
const tooltip = await useTooltip();
|
|
105
|
+
for (const id of ids)
|
|
106
|
+
tooltip.toggle(id);
|
|
107
|
+
}
|
|
@@ -17,6 +17,7 @@ export declare function parseAction(_el: HTMLElement, { modifiers }: DirectiveBi
|
|
|
17
17
|
export declare function parseText(el: HTMLElement, bindings: DirectiveBinding<string | boolean>): string;
|
|
18
18
|
/**
|
|
19
19
|
* Parse color from modifiers
|
|
20
|
-
* @param _el (
|
|
20
|
+
* @param _el (unused)
|
|
21
|
+
* @param bindings directive bindings options
|
|
21
22
|
*/
|
|
22
23
|
export declare function parseColor(_el: HTMLElement, { modifiers }: DirectiveBinding): ColorVariant;
|
|
@@ -89,7 +89,7 @@ import pSubheading from "../subheading/Subheading.vue";
|
|
|
89
89
|
import pCaption from "../caption/Caption.vue";
|
|
90
90
|
import pButton from "../button/Button.vue";
|
|
91
91
|
import { pMd } from "../markdown";
|
|
92
|
-
import IconClose from "@
|
|
92
|
+
import IconClose from "@privyid/persona-icon/vue/close/16.vue";
|
|
93
93
|
export default defineComponent({
|
|
94
94
|
components: {
|
|
95
95
|
pSubheading,
|
|
@@ -94,9 +94,9 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
94
94
|
onPrev?: ((...args: any[]) => any) | undefined;
|
|
95
95
|
}, {
|
|
96
96
|
image: string;
|
|
97
|
+
dismissable: boolean;
|
|
97
98
|
text: string;
|
|
98
99
|
title: string;
|
|
99
|
-
dismissable: boolean;
|
|
100
100
|
step: number;
|
|
101
101
|
highlight: boolean;
|
|
102
102
|
totalStep: number;
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
mode="out-in">
|
|
5
5
|
<span
|
|
6
6
|
:key="`${expand}`"
|
|
7
|
+
v-p-tooltip="tooltip && !expandable && text.length > maxLength"
|
|
7
8
|
class="truncate"
|
|
8
|
-
data-testid="truncate"
|
|
9
|
+
data-testid="truncate"
|
|
10
|
+
:title="text">
|
|
9
11
|
{{ viewText }}
|
|
10
12
|
<template v-if="expandable && text.length > maxLength">
|
|
11
13
|
<a
|
|
@@ -25,7 +27,9 @@ import {
|
|
|
25
27
|
ref,
|
|
26
28
|
computed
|
|
27
29
|
} from "vue-demi";
|
|
30
|
+
import { pTooltip } from "../tooltip";
|
|
28
31
|
export default defineComponent({
|
|
32
|
+
directives: { pTooltip },
|
|
29
33
|
props: {
|
|
30
34
|
text: {
|
|
31
35
|
type: String,
|
|
@@ -50,6 +54,10 @@ export default defineComponent({
|
|
|
50
54
|
showLessText: {
|
|
51
55
|
type: String,
|
|
52
56
|
default: "Show Less"
|
|
57
|
+
},
|
|
58
|
+
tooltip: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: true
|
|
53
61
|
}
|
|
54
62
|
},
|
|
55
63
|
setup(props) {
|
|
@@ -4,7 +4,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
4
4
|
default: string;
|
|
5
5
|
};
|
|
6
6
|
length: {
|
|
7
|
-
type: (
|
|
7
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
8
8
|
default: number;
|
|
9
9
|
};
|
|
10
10
|
omission: {
|
|
@@ -23,6 +23,10 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
23
23
|
type: StringConstructor;
|
|
24
24
|
default: string;
|
|
25
25
|
};
|
|
26
|
+
tooltip: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
26
30
|
}, {
|
|
27
31
|
expand: import("vue-demi").Ref<boolean>;
|
|
28
32
|
viewText: import("vue-demi").ComputedRef<string>;
|
|
@@ -34,7 +38,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
34
38
|
default: string;
|
|
35
39
|
};
|
|
36
40
|
length: {
|
|
37
|
-
type: (
|
|
41
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
38
42
|
default: number;
|
|
39
43
|
};
|
|
40
44
|
omission: {
|
|
@@ -53,9 +57,14 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
53
57
|
type: StringConstructor;
|
|
54
58
|
default: string;
|
|
55
59
|
};
|
|
60
|
+
tooltip: {
|
|
61
|
+
type: BooleanConstructor;
|
|
62
|
+
default: boolean;
|
|
63
|
+
};
|
|
56
64
|
}>>, {
|
|
57
65
|
length: string | number;
|
|
58
66
|
text: string;
|
|
67
|
+
tooltip: boolean;
|
|
59
68
|
showMoreText: string;
|
|
60
69
|
showLessText: string;
|
|
61
70
|
omission: string;
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
export { useSingleton, removeSingleton, resetInstance, } from '../components/global/use-singleton';
|
|
2
2
|
export { hideOverlay, showOverlay, } from '../components/overlay';
|
|
3
|
+
export { hideTooltip, showTooltip, toggleTooltip, } from '../components/tooltip';
|
|
3
4
|
export { default as toast, } from '../components/toast';
|
|
4
5
|
export * as dialog from '../components/dialog';
|
|
5
6
|
export { defineOptions, } from '../components/select';
|
|
6
7
|
export { default as defineAsyncAdapter, } from '../components/select/adapter/async-adapter';
|
|
7
8
|
export { default as FuzzyAdapter, } from '../components/select/adapter/fuzzy-adapter';
|
|
8
9
|
export { default as BasicAdapter, } from '../components/select/adapter/basic-adapter';
|
|
9
|
-
export { defineMenu, } from '../components/sidebar-menu';
|
|
10
|
+
export { defineMenu, filterMenu, } from '../components/sidebar-menu';
|
|
10
11
|
export { defineTable, } from '../components/table';
|
|
11
12
|
export { toBase64, fromBase64, } from '../components/utils/base64';
|
|
12
13
|
export { default as CaptureAdapter, } from '../components/camera/adapter/capture';
|
package/dist/core/index.mjs
CHANGED
|
@@ -7,6 +7,11 @@ export {
|
|
|
7
7
|
hideOverlay,
|
|
8
8
|
showOverlay
|
|
9
9
|
} from "../components/overlay";
|
|
10
|
+
export {
|
|
11
|
+
hideTooltip,
|
|
12
|
+
showTooltip,
|
|
13
|
+
toggleTooltip
|
|
14
|
+
} from "../components/tooltip";
|
|
10
15
|
export {
|
|
11
16
|
default as toast
|
|
12
17
|
} from "../components/toast";
|
|
@@ -24,7 +29,8 @@ export {
|
|
|
24
29
|
default as BasicAdapter
|
|
25
30
|
} from "../components/select/adapter/basic-adapter";
|
|
26
31
|
export {
|
|
27
|
-
defineMenu
|
|
32
|
+
defineMenu,
|
|
33
|
+
filterMenu
|
|
28
34
|
} from "../components/sidebar-menu";
|
|
29
35
|
export {
|
|
30
36
|
defineTable
|
package/dist/module.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@privyid/persona",
|
|
3
3
|
"description": "Persona core package",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.18.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"url": "https://github.com/privy-open-source/design-system.git",
|
|
@@ -58,31 +58,30 @@
|
|
|
58
58
|
"dev:prepare": "nuxt-module-build --stub && nuxi prepare playground"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@carbon/icons-vue": "10.49.1",
|
|
62
61
|
"@floating-ui/dom": "^1.0.4",
|
|
63
62
|
"@juggle/resize-observer": "^3.4.0",
|
|
64
63
|
"@nuxt/kit": "^3.3.2",
|
|
65
|
-
"@testing-library/dom": "^
|
|
64
|
+
"@testing-library/dom": "^9.0.0",
|
|
66
65
|
"@testing-library/user-event": "^14.4.3",
|
|
67
66
|
"@vueuse/core": "10.2.1",
|
|
68
67
|
"@vueuse/math": "10.2.1",
|
|
69
68
|
"@zxing/browser": "0.1.4",
|
|
70
69
|
"@zxing/library": "0.20.0",
|
|
71
|
-
"chart.js": "4.3.
|
|
70
|
+
"chart.js": "4.3.2",
|
|
72
71
|
"core-js": "3",
|
|
73
72
|
"date-fns": "2.30.0",
|
|
74
73
|
"defu": "6.1.2",
|
|
75
|
-
"fast-equals": "^
|
|
74
|
+
"fast-equals": "^5.0.0",
|
|
76
75
|
"fuse.js": "6.6.2",
|
|
77
76
|
"interactjs": "1.10.17",
|
|
78
77
|
"lodash-es": "4.17.21",
|
|
79
|
-
"marked": "^
|
|
78
|
+
"marked": "^5.0.0",
|
|
80
79
|
"nanodelay": "2.0.2",
|
|
81
80
|
"pdfjs-dist": "^3.2.146",
|
|
82
81
|
"sanitize-html": "^2.8.1",
|
|
83
82
|
"scroll-into-view": "^1.16.2",
|
|
84
|
-
"tabbable": "6.0
|
|
85
|
-
"vue-demi": "0.
|
|
83
|
+
"tabbable": "6.2.0",
|
|
84
|
+
"vue-demi": "0.14.5",
|
|
86
85
|
"vuedraggable": "next",
|
|
87
86
|
"webfontloader": "1.6.28",
|
|
88
87
|
"zxcvbn": "^4.4.2"
|
|
@@ -91,8 +90,9 @@
|
|
|
91
90
|
"extends @privyid/browserslist-config"
|
|
92
91
|
],
|
|
93
92
|
"peerDependencies": {
|
|
94
|
-
"@privyid/
|
|
95
|
-
"
|
|
93
|
+
"@privyid/browserslist-config": "^0.18.0",
|
|
94
|
+
"@privyid/tailwind-preset": "^0.18.0",
|
|
95
|
+
"postcss-custom-properties": "^12.1.11 || ^13.0.0",
|
|
96
96
|
"postcss-hexrgba": "^2.1.0",
|
|
97
97
|
"postcss-lighten-darken": "^0.9.0",
|
|
98
98
|
"tailwind": ">=3.0.0",
|
|
@@ -100,13 +100,13 @@
|
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"@nuxt/module-builder": "^0.4.0",
|
|
103
|
-
"@nuxt/schema": "3.
|
|
103
|
+
"@nuxt/schema": "3.6.5",
|
|
104
104
|
"@nuxtjs/tailwindcss": "^6.2.0",
|
|
105
|
-
"@privyid/browserslist-config": "^0.
|
|
106
|
-
"@privyid/tailwind-preset": "^0.
|
|
105
|
+
"@privyid/browserslist-config": "^0.18.0",
|
|
106
|
+
"@privyid/tailwind-preset": "^0.18.0",
|
|
107
107
|
"@types/sanitize-html": "^2",
|
|
108
108
|
"browserslist-to-esbuild": "^1.2.0",
|
|
109
|
-
"nuxt": "3.
|
|
109
|
+
"nuxt": "3.6.5",
|
|
110
110
|
"postcss-custom-properties": "^13.0.0",
|
|
111
111
|
"postcss-hexrgba": "^2.1.0",
|
|
112
112
|
"postcss-lighten-darken": "^0.9.0",
|