beesoft-components 0.11.0 → 0.12.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/beesoft-components.css +1 -1
- package/dist/beesoft-components.css.gz +0 -0
- package/dist/index.es.js +37940 -7621
- package/dist/index.es.js.gz +0 -0
- package/dist/index.umd.js +230 -8
- package/dist/index.umd.js.gz +0 -0
- package/package.json +4 -2
- package/types/index.d.ts +61 -4
package/dist/index.umd.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "beesoft-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -34,15 +34,17 @@
|
|
|
34
34
|
"chromatic": "chromatic --project-token $CHROMATIC_PROJECT_TOKEN"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@beesoft/common": "^0.2.
|
|
37
|
+
"@beesoft/common": "^0.2.1",
|
|
38
38
|
"@beesoft/headless-ui": "^0.1.0",
|
|
39
39
|
"@preact/signals": "^2.5.1",
|
|
40
40
|
"@react-hook/media-query": "^1.1.1",
|
|
41
41
|
"classnames": "^2.3.2",
|
|
42
42
|
"date-fns": "^3.3.1",
|
|
43
43
|
"dot-object": "^2.1.4",
|
|
44
|
+
"konva": "^10.0.12",
|
|
44
45
|
"lodash": "^4.17.21",
|
|
45
46
|
"motion": "^12.24.10",
|
|
47
|
+
"react-konva": "^19.2.1",
|
|
46
48
|
"uuid": "^9.0.1"
|
|
47
49
|
},
|
|
48
50
|
"devDependencies": {
|
package/types/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { CheckboxChangeEvent } from '@beesoft/headless-ui';
|
|
|
3
3
|
import { CheckboxProps as CheckboxProps_2 } from '@beesoft/headless-ui';
|
|
4
4
|
import { ComponentAnimationProps } from '@beesoft/headless-ui';
|
|
5
5
|
import { default as default_2 } from 'react';
|
|
6
|
+
import { Easing } from 'motion';
|
|
6
7
|
import { FormInputControl } from '@beesoft/common';
|
|
7
8
|
import { FormInputControlData } from '@beesoft/common';
|
|
8
9
|
import { ForwardRefExoticComponent } from 'react';
|
|
@@ -23,6 +24,62 @@ import { TypeOrArray } from '@beesoft/common';
|
|
|
23
24
|
|
|
24
25
|
export declare function applyBeeSoftTheme(theme: Record<string, unknown>): void;
|
|
25
26
|
|
|
27
|
+
export declare const AvatarEditor: ({ width, height, label, source, showPreviewOnFileLoad, cropRadius, cropColor, closeColor, shadingColor, shadingOpacity, onEdit, onRemove }: AvatarEditorProps) => JSX_2.Element;
|
|
28
|
+
|
|
29
|
+
declare interface AvatarEditorProps {
|
|
30
|
+
/**
|
|
31
|
+
* The visible width of the display area; this will be used to resize the loaded image to a viewable size. If width is
|
|
32
|
+
* set do not set the height.
|
|
33
|
+
*/
|
|
34
|
+
width?: number;
|
|
35
|
+
/**
|
|
36
|
+
* The visible height of the display area; this will be used to resize the loaded image to a viewable size. If height
|
|
37
|
+
* is set do not set the width.
|
|
38
|
+
*/
|
|
39
|
+
height?: number;
|
|
40
|
+
/**
|
|
41
|
+
* The text to display when no file is loaded.
|
|
42
|
+
*/
|
|
43
|
+
label?: string;
|
|
44
|
+
/**
|
|
45
|
+
* The base64 encoded image to show in the editor.
|
|
46
|
+
*/
|
|
47
|
+
source?: string;
|
|
48
|
+
/**
|
|
49
|
+
* When true (the default) a preview cropped image is created when the file first loads.
|
|
50
|
+
*/
|
|
51
|
+
showPreviewOnFileLoad?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* The default size of the crop radius circle.
|
|
54
|
+
*/
|
|
55
|
+
cropRadius?: number;
|
|
56
|
+
/**
|
|
57
|
+
* The color of the crop circle and adjustment icon (default gray).
|
|
58
|
+
*/
|
|
59
|
+
cropColor?: string;
|
|
60
|
+
/**
|
|
61
|
+
* The color of the close/remove icon (default gray).
|
|
62
|
+
*/
|
|
63
|
+
closeColor?: string;
|
|
64
|
+
/**
|
|
65
|
+
* The color of the non-cropped part of the image (default gray).
|
|
66
|
+
*/
|
|
67
|
+
shadingColor?: string;
|
|
68
|
+
/**
|
|
69
|
+
* The opacity level applied to the shader (default 0.4).
|
|
70
|
+
*/
|
|
71
|
+
shadingOpacity?: number;
|
|
72
|
+
/**
|
|
73
|
+
* Event fired when an edit operation is performed.
|
|
74
|
+
* @param data {string} - The resulting image as a Base64 string.
|
|
75
|
+
*/
|
|
76
|
+
onEdit?: (data?: string) => void;
|
|
77
|
+
/**
|
|
78
|
+
* Event fired when the loaded image is removed.
|
|
79
|
+
*/
|
|
80
|
+
onRemove?: () => void;
|
|
81
|
+
}
|
|
82
|
+
|
|
26
83
|
declare interface BeeSoftContextProps {
|
|
27
84
|
overlayKeepOnScreen?: boolean;
|
|
28
85
|
useAnimations?: boolean;
|
|
@@ -466,7 +523,7 @@ declare interface MediaQueryProps {
|
|
|
466
523
|
desktopMarkup?: TypeOrArray<ReactNode>;
|
|
467
524
|
}
|
|
468
525
|
|
|
469
|
-
export declare const MobileOverlayPanel: ({ visible, target, appendTo, unmountWhenHidden, transitionDuration, showTransitionOptions, hideTransitionOptions, approveText, shown, hidden, isClickedWithin, children, }: MobileOverlayPanelProps) => ReactPortal;
|
|
526
|
+
export declare const MobileOverlayPanel: ({ visible, target, appendTo, unmountWhenHidden, transitionDuration, showTransitionOptions, hideTransitionOptions, approveText, shown, hidden, isClickedWithin, children, }: MobileOverlayPanelProps) => default_2.ReactPortal | null;
|
|
470
527
|
|
|
471
528
|
declare interface MobileOverlayPanelProps {
|
|
472
529
|
visible: boolean;
|
|
@@ -474,8 +531,8 @@ declare interface MobileOverlayPanelProps {
|
|
|
474
531
|
appendTo?: HTMLElement;
|
|
475
532
|
unmountWhenHidden?: boolean;
|
|
476
533
|
transitionDuration?: number;
|
|
477
|
-
showTransitionOptions?:
|
|
478
|
-
hideTransitionOptions?:
|
|
534
|
+
showTransitionOptions?: Easing;
|
|
535
|
+
hideTransitionOptions?: Easing;
|
|
479
536
|
approveText?: string;
|
|
480
537
|
shown?: () => void;
|
|
481
538
|
hidden?: () => void;
|
|
@@ -483,7 +540,7 @@ declare interface MobileOverlayPanelProps {
|
|
|
483
540
|
children: TypeOrArray<ReactNode>;
|
|
484
541
|
}
|
|
485
542
|
|
|
486
|
-
export declare const OverlayPanel: ({ visible, target, targetPosition, elementAlignment, shouldTargetCloseOverlay, shouldMatchTargetWidth, shouldScrollCloseOverlay, shouldCheckZIndex, shouldRemainOnScreen, unmountWhenHidden, transitionDuration, showTransitionOptions, hideTransitionOptions, shown, hidden, isClickedWithin, markupCreated, children, }: OverlayPanelProps & MarkupEvents) => JSX_2.Element;
|
|
543
|
+
export declare const OverlayPanel: ({ visible, target, targetPosition, elementAlignment, shouldTargetCloseOverlay, shouldMatchTargetWidth, shouldScrollCloseOverlay, shouldCheckZIndex, shouldRemainOnScreen, unmountWhenHidden, transitionDuration, showTransitionOptions, hideTransitionOptions, shown, hidden, isClickedWithin, markupCreated, children, }: OverlayPanelProps & MarkupEvents) => JSX_2.Element | null;
|
|
487
544
|
|
|
488
545
|
declare interface OverlayPanelProps {
|
|
489
546
|
visible: boolean;
|