@privyid/persona 0.25.2 → 0.27.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/calendar/Calendar.vue.d.ts +3 -3
- package/dist/components/camera/Camera.vue.d.ts +4 -4
- package/dist/components/card/Card.vue.d.ts +1 -1
- package/dist/components/card/CardSection.vue.d.ts +1 -1
- package/dist/components/carousel/Carousel.vue.d.ts +2 -2
- package/dist/components/checkbox/index.mjs +4 -6
- package/dist/components/contextual-bar/ContextualBar.vue.d.ts +1 -1
- package/dist/components/cropper/Cropper.vue.d.ts +1 -1
- package/dist/components/datepicker/Datepicker.vue.d.ts +4 -4
- package/dist/components/dropdown/Dropdown.vue +4 -2
- package/dist/components/dropdown-subitem/DropdownSubitem.vue.d.ts +1 -1
- package/dist/components/dropzone/Dropzone.vue.d.ts +4 -4
- package/dist/components/filterbar/pinned/PinnedDate.vue.d.ts +2 -2
- package/dist/components/filterbar/pinned/PinnedMultiselect.vue.d.ts +1 -1
- package/dist/components/filterbar/pinned/PinnedSelect.vue.d.ts +1 -1
- package/dist/components/filterbar/pinned/PinnedToggle.vue.d.ts +1 -1
- package/dist/components/input/Input.vue.d.ts +2 -2
- package/dist/components/input-color/index.d.ts +1 -0
- package/dist/components/input-color/index.mjs +0 -0
- package/dist/components/input-color/inputColor.vue +257 -0
- package/dist/components/input-file/InputFile.vue.d.ts +5 -5
- package/dist/components/input-pin/InputPin.vue.d.ts +2 -2
- package/dist/components/input-range/InputRange.vue.d.ts +2 -2
- package/dist/components/list-group/ListGroup.vue.d.ts +1 -1
- package/dist/components/meta.json +7 -4
- package/dist/components/modal/Modal.vue.d.ts +1 -1
- package/dist/components/nav/Nav.vue.d.ts +1 -1
- package/dist/components/pagination/Pagination.vue.d.ts +1 -1
- package/dist/components/pdf-object/PdfObject.vue.d.ts +1 -1
- package/dist/components/pdf-text/PdfText.vue.d.ts +3 -3
- package/dist/components/popover/Popover.vue +131 -0
- package/dist/components/popover/index.d.ts +17 -0
- package/dist/components/popover/index.mjs +52 -0
- package/dist/components/progress-indicator/ProgressIndicator.vue.d.ts +1 -1
- package/dist/components/radio/Radio.vue.d.ts +1 -1
- package/dist/components/radio/index.mjs +2 -3
- package/dist/components/select/Select.vue +61 -49
- package/dist/components/shimmer/Shimmer.vue +125 -0
- package/dist/components/signature-draw/SignatureDraw.vue.d.ts +1 -1
- package/dist/components/signature-draw/SignatureDrawDesktop.vue +3 -1
- package/dist/components/signature-draw/SignatureDrawDesktop.vue.d.ts +1 -1
- package/dist/components/signature-draw/SignatureDrawMobile.vue +9 -1
- package/dist/components/signature-draw/SignatureDrawMobile.vue.d.ts +1 -1
- package/dist/components/signature-draw/utils/image.d.ts +7 -0
- package/dist/components/signature-draw/utils/{rotate-image.mjs → image.mjs} +12 -1
- package/dist/components/signature-text/SignatureText.vue.d.ts +1 -1
- package/dist/components/steps/Steps.vue.d.ts +1 -1
- package/dist/components/textarea/Textarea.vue.d.ts +2 -2
- package/dist/components/toggle/Toggle.vue.d.ts +1 -1
- package/dist/components/tooltip/Tooltip.vue +1 -1
- package/dist/components/tooltip/TooltipContainer.vue +3 -1
- package/dist/components/utils/date.d.ts +2 -2
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.mjs +3 -0
- package/dist/module.json +1 -1
- package/dist/types.d.mts +3 -2
- package/dist/types.d.ts +3 -2
- package/package.json +10 -10
- package/dist/components/signature-draw/utils/rotate-image.d.ts +0 -6
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
import Button from "../button/Button.vue";
|
|
67
67
|
import { useVModel } from "../input";
|
|
68
68
|
import SignatureDrawDesktop from "./SignatureDrawDesktop.vue";
|
|
69
|
-
import rotateImage from "./utils/
|
|
69
|
+
import { replaceColor, rotateImage } from "./utils/image";
|
|
70
70
|
import IconEdit from "@privyid/persona-icon/vue/edit/20.vue";
|
|
71
71
|
import { pAspectRatio } from "../aspect-ratio";
|
|
72
72
|
import { usePreview } from "../cropper";
|
|
@@ -153,6 +153,14 @@ export default defineComponent({
|
|
|
153
153
|
model.value = value;
|
|
154
154
|
isOpen.value = false;
|
|
155
155
|
}
|
|
156
|
+
watch(() => props.color, async (color) => {
|
|
157
|
+
if (!isOpen.value && preview.value) {
|
|
158
|
+
const result = await replaceColor(preview.value, color);
|
|
159
|
+
const value = props.modelModifiers.base64 ? result : fromBase64(result);
|
|
160
|
+
model.value = value;
|
|
161
|
+
isOpen.value = false;
|
|
162
|
+
}
|
|
163
|
+
});
|
|
156
164
|
watch(isOpen, (value) => {
|
|
157
165
|
if (value)
|
|
158
166
|
document.body.style.setProperty("overflow-y", "hidden");
|
|
@@ -94,8 +94,8 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
94
94
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
95
95
|
}, {
|
|
96
96
|
color: string;
|
|
97
|
-
modelValue: string | File;
|
|
98
97
|
placeholder: string;
|
|
98
|
+
modelValue: string | File;
|
|
99
99
|
modelModifiers: ModelModifier;
|
|
100
100
|
width: number;
|
|
101
101
|
height: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import loadImage from "../../avatar/utils/load-image.mjs";
|
|
2
|
-
|
|
2
|
+
import { replaceColor as canvasReplaceColor } from "./canvas.mjs";
|
|
3
|
+
export async function rotateImage(url, degrees) {
|
|
3
4
|
const canvas = document.createElement("canvas");
|
|
4
5
|
const context = canvas.getContext("2d");
|
|
5
6
|
const image = await loadImage(url);
|
|
@@ -10,3 +11,13 @@ export default async function rotateImage(url, degrees) {
|
|
|
10
11
|
context.drawImage(image, image.width / -2, image.height / -2);
|
|
11
12
|
return canvas.toDataURL();
|
|
12
13
|
}
|
|
14
|
+
export async function replaceColor(url, color) {
|
|
15
|
+
const canvas = document.createElement("canvas");
|
|
16
|
+
const context = canvas.getContext("2d");
|
|
17
|
+
const image = await loadImage(url);
|
|
18
|
+
canvas.width = image.width;
|
|
19
|
+
canvas.height = image.height;
|
|
20
|
+
context.drawImage(image, 0, 0);
|
|
21
|
+
canvasReplaceColor(canvas, color);
|
|
22
|
+
return canvas.toDataURL();
|
|
23
|
+
}
|
|
@@ -89,9 +89,9 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
89
89
|
text: string;
|
|
90
90
|
modelValue: string | File;
|
|
91
91
|
modelModifiers: ModelModifier;
|
|
92
|
+
font: string;
|
|
92
93
|
width: number;
|
|
93
94
|
height: number;
|
|
94
|
-
font: string;
|
|
95
95
|
maxlength: string | number;
|
|
96
96
|
maxwords: string | number;
|
|
97
97
|
}, {}>;
|
|
@@ -74,8 +74,8 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
74
74
|
}, {
|
|
75
75
|
modelValue: number;
|
|
76
76
|
direction: DirectionVariant;
|
|
77
|
-
loop: boolean;
|
|
78
77
|
animation: AnimationVariant;
|
|
78
|
+
loop: boolean;
|
|
79
79
|
onBeforePrev: TravelHook;
|
|
80
80
|
onBeforeNext: TravelHook;
|
|
81
81
|
keepAlive: boolean;
|
|
@@ -104,11 +104,11 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
104
104
|
}, {
|
|
105
105
|
error: boolean;
|
|
106
106
|
resize: boolean;
|
|
107
|
+
placeholder: string;
|
|
108
|
+
accept: AcceptVariant;
|
|
107
109
|
modelValue: string;
|
|
108
110
|
disabled: boolean;
|
|
109
111
|
readonly: boolean;
|
|
110
|
-
placeholder: string;
|
|
111
|
-
accept: AcceptVariant;
|
|
112
112
|
maxlength: string | number;
|
|
113
113
|
showCounter: boolean;
|
|
114
114
|
rows: string | number;
|
|
@@ -95,8 +95,8 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
95
95
|
default: undefined;
|
|
96
96
|
};
|
|
97
97
|
}>> & {
|
|
98
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
99
98
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
99
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
100
100
|
}, {
|
|
101
101
|
value: any;
|
|
102
102
|
variant: StyleVariant;
|
|
@@ -119,7 +119,7 @@ export default defineComponent({
|
|
|
119
119
|
@apply z-[var(--p-tooltip-z-index)] px-4 py-3 rounded text-xs inline-block absolute drop-shadow-sm;
|
|
120
120
|
|
|
121
121
|
&__arrow {
|
|
122
|
-
@apply absolute after:w-4 after:h-4 after:block after:rounded-[3px] after:rotate-45 after:left-0 after:content-[''] after:z-0;
|
|
122
|
+
@apply absolute text-xs after:w-4 after:h-4 after:block after:rounded-[3px] after:rotate-45 after:left-0 after:content-[''] after:z-0;
|
|
123
123
|
|
|
124
124
|
[data-popper-placement^="left"] > & {
|
|
125
125
|
@apply -right-[6px];
|
|
@@ -17,6 +17,6 @@ export declare function installLocale(name: string, locale: Locale): void;
|
|
|
17
17
|
* Get locale pack
|
|
18
18
|
* @param name language name, ex: 'fr'
|
|
19
19
|
*/
|
|
20
|
-
export declare function getLocale(name?:
|
|
20
|
+
export declare function getLocale(name?: (string & {
|
|
21
21
|
_?: undefined;
|
|
22
|
-
})): any;
|
|
22
|
+
}) | "id" | "en"): any;
|
package/dist/core/index.d.ts
CHANGED
|
@@ -34,3 +34,4 @@ export { findAllChildren, toBoolean, } from '../components/utils/vnode';
|
|
|
34
34
|
export { createSpinner, createAlias, createText, } from '../components/avatar/utils/create-image';
|
|
35
35
|
export { useSelector, } from '../components/pdf-object/utils/use-selector';
|
|
36
36
|
export { getDocument, } from '../components/pdf-viewer/utils/pdfjs';
|
|
37
|
+
export { usePopoverPromise, } from '../components/popover';
|
package/dist/core/index.mjs
CHANGED
package/dist/module.json
CHANGED
package/dist/types.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { ModuleOptions } from './module'
|
|
2
|
+
import type { ModuleOptions } from './module'
|
|
3
|
+
|
|
3
4
|
|
|
4
5
|
declare module '@nuxt/schema' {
|
|
5
6
|
interface NuxtConfig { ['persona']?: Partial<ModuleOptions> }
|
|
@@ -12,4 +13,4 @@ declare module 'nuxt/schema' {
|
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
|
|
15
|
-
export { ModuleOptions, default } from './module'
|
|
16
|
+
export type { ModuleOptions, default } from './module'
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { ModuleOptions } from './module'
|
|
2
|
+
import type { ModuleOptions } from './module'
|
|
3
|
+
|
|
3
4
|
|
|
4
5
|
declare module '@nuxt/schema' {
|
|
5
6
|
interface NuxtConfig { ['persona']?: Partial<ModuleOptions> }
|
|
@@ -12,4 +13,4 @@ declare module 'nuxt/schema' {
|
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
|
|
15
|
-
export { ModuleOptions, default } from './module'
|
|
16
|
+
export type { ModuleOptions, default } from './module'
|
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.27.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"url": "https://github.com/privy-open-source/design-system.git",
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@floating-ui/dom": "1.5.3",
|
|
62
62
|
"@juggle/resize-observer": "3.4.0",
|
|
63
|
-
"@nuxt/kit": "3.
|
|
63
|
+
"@nuxt/kit": "3.8.2",
|
|
64
64
|
"@splidejs/splide": "4.1.4",
|
|
65
65
|
"@testing-library/dom": "9.3.3",
|
|
66
66
|
"@testing-library/user-event": "14.5.1",
|
|
67
|
-
"@vueuse/core": "10.
|
|
67
|
+
"@vueuse/core": "10.7.0",
|
|
68
68
|
"@vueuse/math": "10.3.0",
|
|
69
69
|
"@zxing/browser": "0.1.4",
|
|
70
70
|
"@zxing/library": "0.20.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"defu": "6.1.3",
|
|
75
75
|
"fast-equals": "^5.0.0",
|
|
76
76
|
"fuse.js": "7.0.0",
|
|
77
|
-
"interactjs": "1.10.
|
|
77
|
+
"interactjs": "1.10.26",
|
|
78
78
|
"lodash-es": "4.17.21",
|
|
79
79
|
"marked": "5.1.2",
|
|
80
80
|
"nanodelay": "2.0.2",
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
"extends @privyid/browserslist-config"
|
|
93
93
|
],
|
|
94
94
|
"peerDependencies": {
|
|
95
|
-
"@privyid/browserslist-config": "^0.
|
|
96
|
-
"@privyid/tailwind-preset": "^0.
|
|
95
|
+
"@privyid/browserslist-config": "^0.27.0",
|
|
96
|
+
"@privyid/tailwind-preset": "^0.27.0",
|
|
97
97
|
"postcss-custom-properties": "^12.1.11 || ^13.0.0",
|
|
98
98
|
"postcss-hexrgba": "^2.1.0",
|
|
99
99
|
"postcss-lighten-darken": "^0.9.0",
|
|
@@ -102,13 +102,13 @@
|
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
104
|
"@nuxt/module-builder": "^0.5.0",
|
|
105
|
-
"@nuxt/schema": "3.
|
|
105
|
+
"@nuxt/schema": "3.8.2",
|
|
106
106
|
"@nuxtjs/tailwindcss": "^6.2.0",
|
|
107
|
-
"@privyid/browserslist-config": "^0.
|
|
108
|
-
"@privyid/tailwind-preset": "^0.
|
|
107
|
+
"@privyid/browserslist-config": "^0.27.0",
|
|
108
|
+
"@privyid/tailwind-preset": "^0.27.0",
|
|
109
109
|
"@types/sanitize-html": "^2",
|
|
110
110
|
"browserslist-to-esbuild": "^1.2.0",
|
|
111
|
-
"nuxt": "3.
|
|
111
|
+
"nuxt": "3.8.2",
|
|
112
112
|
"postcss-custom-properties": "^13.0.0",
|
|
113
113
|
"postcss-hexrgba": "^2.1.0",
|
|
114
114
|
"postcss-lighten-darken": "^0.9.0",
|