@soul-refiner/design-system 1.6.11 → 1.6.13
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/editor/plugins/blocks/image.d.ts +1 -1
- package/dist/components/editor/plugins/blocks/list.d.ts +1 -1
- package/dist/components/editor/plugins/blocks/resizable.d.ts +1 -1
- package/dist/components/editor/plugins/blocks/table-cell.d.ts +2 -2
- package/dist/components/editor/plugins/blocks/table-row.d.ts +1 -1
- package/dist/components/editor/plugins/blocks/table.d.ts +1 -1
- package/dist/components/editor/plugins/plate.d.ts +9 -9
- package/dist/components/iconography/avatar/avatar.d.ts +2 -1
- package/dist/components/iconography/avatar/avatar.js +4 -2
- package/dist/components/iconography/avatar/icons/default.js +3 -3
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
export declare const ImageElement: React.ForwardRefExoticComponent<Omit<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
|
|
3
3
|
element: import("@udecode/slate").TElement;
|
|
4
4
|
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5
|
-
as?: React.ElementType<any> | undefined;
|
|
5
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
6
6
|
asChild?: boolean | undefined;
|
|
7
7
|
} & React.RefAttributes<any> & {
|
|
8
8
|
elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
|
|
@@ -3,7 +3,7 @@ import { PlateElementProps } from '@udecode/plate';
|
|
|
3
3
|
export declare const ListElement: ({ children, variant, ...props }: import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
|
|
4
4
|
element: import("@udecode/slate").TElement;
|
|
5
5
|
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
6
|
-
as?: React.ElementType<any> | undefined;
|
|
6
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
7
7
|
asChild?: boolean | undefined;
|
|
8
8
|
} & React.RefAttributes<any> & {
|
|
9
9
|
elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
|
|
@@ -3,7 +3,7 @@ export declare const mediaResizeHandleVariants: (props?: ({
|
|
|
3
3
|
direction?: "right" | "left" | null | undefined;
|
|
4
4
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
5
5
|
export declare const ResizeHandle: React.ForwardRefExoticComponent<Omit<{
|
|
6
|
-
as?: React.ElementType<any> | undefined;
|
|
6
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
7
7
|
asChild?: boolean | undefined;
|
|
8
8
|
className?: string | undefined;
|
|
9
9
|
style?: React.CSSProperties | undefined;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
export declare const TableCellElement: React.ForwardRefExoticComponent<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
|
|
3
3
|
element: import("@udecode/slate").TElement;
|
|
4
4
|
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5
|
-
as?: React.ElementType<any> | undefined;
|
|
5
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
6
6
|
asChild?: boolean | undefined;
|
|
7
7
|
} & React.RefAttributes<any> & {
|
|
8
8
|
elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
|
|
@@ -13,7 +13,7 @@ export declare const TableCellElement: React.ForwardRefExoticComponent<Omit<impo
|
|
|
13
13
|
export declare const TableCellHeaderElement: React.ForwardRefExoticComponent<Omit<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
|
|
14
14
|
element: import("@udecode/slate").TElement;
|
|
15
15
|
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
16
|
-
as?: React.ElementType<any> | undefined;
|
|
16
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
17
17
|
asChild?: boolean | undefined;
|
|
18
18
|
} & React.RefAttributes<any> & {
|
|
19
19
|
elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
export declare const TableRowElement: React.ForwardRefExoticComponent<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
|
|
3
3
|
element: import("@udecode/slate").TElement;
|
|
4
4
|
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5
|
-
as?: React.ElementType<any> | undefined;
|
|
5
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
6
6
|
asChild?: boolean | undefined;
|
|
7
7
|
} & React.RefAttributes<any> & {
|
|
8
8
|
elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
|
|
@@ -5,7 +5,7 @@ export declare const TableFloatingToolbar: React.ForwardRefExoticComponent<Omit<
|
|
|
5
5
|
export declare const TableElement: React.ForwardRefExoticComponent<Omit<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
|
|
6
6
|
element: import("@udecode/slate").TElement;
|
|
7
7
|
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
8
|
-
as?: React.ElementType<any> | undefined;
|
|
8
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
9
9
|
asChild?: boolean | undefined;
|
|
10
10
|
} & React.RefAttributes<any> & {
|
|
11
11
|
elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
|
|
@@ -12,7 +12,7 @@ export declare const plateUI: {
|
|
|
12
12
|
ol: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
|
|
13
13
|
element: import("@udecode/slate").TElement;
|
|
14
14
|
} & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
15
|
-
as?: import("react").ElementType<any> | undefined;
|
|
15
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
16
16
|
asChild?: boolean | undefined;
|
|
17
17
|
} & import("react").RefAttributes<any> & {
|
|
18
18
|
elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
|
|
@@ -22,7 +22,7 @@ export declare const plateUI: {
|
|
|
22
22
|
ul: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
|
|
23
23
|
element: import("@udecode/slate").TElement;
|
|
24
24
|
} & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
25
|
-
as?: import("react").ElementType<any> | undefined;
|
|
25
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
26
26
|
asChild?: boolean | undefined;
|
|
27
27
|
} & import("react").RefAttributes<any> & {
|
|
28
28
|
elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
|
|
@@ -32,7 +32,7 @@ export declare const plateUI: {
|
|
|
32
32
|
img: import("react").ForwardRefExoticComponent<Omit<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
|
|
33
33
|
element: import("@udecode/slate").TElement;
|
|
34
34
|
} & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
35
|
-
as?: import("react").ElementType<any> | undefined;
|
|
35
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
36
36
|
asChild?: boolean | undefined;
|
|
37
37
|
} & import("react").RefAttributes<any> & {
|
|
38
38
|
elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
|
|
@@ -41,7 +41,7 @@ export declare const plateUI: {
|
|
|
41
41
|
table: import("react").ForwardRefExoticComponent<Omit<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
|
|
42
42
|
element: import("@udecode/slate").TElement;
|
|
43
43
|
} & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
44
|
-
as?: import("react").ElementType<any> | undefined;
|
|
44
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
45
45
|
asChild?: boolean | undefined;
|
|
46
46
|
} & import("react").RefAttributes<any> & {
|
|
47
47
|
elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
|
|
@@ -49,7 +49,7 @@ export declare const plateUI: {
|
|
|
49
49
|
td: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
|
|
50
50
|
element: import("@udecode/slate").TElement;
|
|
51
51
|
} & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
52
|
-
as?: import("react").ElementType<any> | undefined;
|
|
52
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
53
53
|
asChild?: boolean | undefined;
|
|
54
54
|
} & import("react").RefAttributes<any> & {
|
|
55
55
|
elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
|
|
@@ -60,7 +60,7 @@ export declare const plateUI: {
|
|
|
60
60
|
th: import("react").ForwardRefExoticComponent<Omit<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
|
|
61
61
|
element: import("@udecode/slate").TElement;
|
|
62
62
|
} & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
63
|
-
as?: import("react").ElementType<any> | undefined;
|
|
63
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
64
64
|
asChild?: boolean | undefined;
|
|
65
65
|
} & import("react").RefAttributes<any> & {
|
|
66
66
|
elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
|
|
@@ -71,7 +71,7 @@ export declare const plateUI: {
|
|
|
71
71
|
tr: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
|
|
72
72
|
element: import("@udecode/slate").TElement;
|
|
73
73
|
} & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
74
|
-
as?: import("react").ElementType<any> | undefined;
|
|
74
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
75
75
|
asChild?: boolean | undefined;
|
|
76
76
|
} & import("react").RefAttributes<any> & {
|
|
77
77
|
elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
|
|
@@ -82,7 +82,7 @@ export declare const plateUI: {
|
|
|
82
82
|
leaf: import("@udecode/slate").TText;
|
|
83
83
|
text: import("@udecode/slate").TText;
|
|
84
84
|
} & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
85
|
-
as?: import("react").ElementType<any> | undefined;
|
|
85
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
86
86
|
asChild?: boolean | undefined;
|
|
87
87
|
} & import("react").RefAttributes<any> & {
|
|
88
88
|
leafToAttributes?: ((leaf: import("@udecode/slate").TText) => any) | undefined;
|
|
@@ -91,7 +91,7 @@ export declare const plateUI: {
|
|
|
91
91
|
leaf: import("@udecode/slate").TText;
|
|
92
92
|
text: import("@udecode/slate").TText;
|
|
93
93
|
} & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
94
|
-
as?: import("react").ElementType<any> | undefined;
|
|
94
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
95
95
|
asChild?: boolean | undefined;
|
|
96
96
|
} & import("react").RefAttributes<any> & {
|
|
97
97
|
leafToAttributes?: ((leaf: import("@udecode/slate").TText) => any) | undefined;
|
|
@@ -16,13 +16,14 @@ export interface AvatarProps extends NativeProps {
|
|
|
16
16
|
title?: React.ReactNode;
|
|
17
17
|
tooltipContent?: React.ReactElement;
|
|
18
18
|
tooltipSx?: string;
|
|
19
|
+
fallbackImg?: string;
|
|
19
20
|
}
|
|
20
21
|
/**
|
|
21
22
|
*
|
|
22
23
|
* Avatar
|
|
23
24
|
*/
|
|
24
25
|
declare const Avatar: {
|
|
25
|
-
({ as, href, image, size, status, subtitle, sx, textPosition, title, tooltipContent, tooltipSx, ...rest }: AvatarProps): React.JSX.Element;
|
|
26
|
+
({ as, href, image, fallbackImg, size, status, subtitle, sx, textPosition, title, tooltipContent, tooltipSx, ...rest }: AvatarProps): React.JSX.Element;
|
|
26
27
|
displayName: string;
|
|
27
28
|
Group: {
|
|
28
29
|
({ children, numDisplayed, total }: AvatarGroupProps): React.JSX.Element;
|
|
@@ -54,11 +54,13 @@ const iconOffsetY = {
|
|
|
54
54
|
'24': -2,
|
|
55
55
|
'16': -1,
|
|
56
56
|
};
|
|
57
|
+
const fallbackImgData = 'iVBORw0KGgoAAAANSUhEUgAAAOQAAADkCAYAAACIV4iNAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAl0SURBVHgB7d0PcxrHHYfxNVgyCCwE+oOqWrabNnn/L8V1Z9yZdpqJq0QxtiIZBQxBAed+R4iRZSmSdu/47t3zmWHkRImN8D3s3t1y9+DFy1cfHQAJFQdABkECQggSEEKQgBCCBIQQJCCEIAEhBAkIIUhACEECQggSEEKQgBCCBIQQJCCEIAEhBAkIIUhACEECQggSEEKQgBCCBIQQJCCEIAEhBAkIIUhACEECQggSEEKQgBCCBIQQJCCEIAEhBAkIIUhACEECQggSEEKQgBCCBIQQJCCEIAEhBAkIIUhACEECQggSEEKQgJCHDvKqlYqr1WuuXrPHI1etVly9Xk+/t76+dum/nU5nbjKZJF+nbjQeJ7/+Nf06HH5w0EeQoizCdnvLtTabaXwW4a3+vzTWWvrrZr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gKyv9Nvvv7K7WzHdSfq2yrcCNnd23X73TjuUIz7++vBfnr1hN7bYt3huVAjpI2MxFge+93d9Kh5kRQmSNtntB1/lMthcvTcPoNaFIUI0pa+2QEclNPzZ4eFWfJYiJ+im0xTOYBTXvZ3byNlEUQf5Hz1zZZDudm55qzvOp2H6IO0HXvAFGGUjDpIGx2ZqmLBtgXbJmIWdZCMjvhc7NtEtEHagnFGR3zOtomY9yWjDbJoJ4QRTjvibSPaIO1aqMCXxPzpniiDtOkq177BdWyNa6zT1ii3alsmB9ykFulyuiiDtA+qAje56Q5fyqIMslqpOuAmBJkjTnfgz8T6pk2QKKRYtxEOVQJCCBIQQpCAEIIEhBAkIIQgASEECQghSEAIQQJCCBIQQpCAEIIEhBAkIIQgASEECQghSEAIQQJCCBIQQpCAEIIEhBAkIIQgASEECQghSEAIQQJCHroI/fNf/3ZAETFCAkIIEhBCkIAQggSEECQghCABIQQJCCFIQAhBAkIIEhBCkIAQggSEECQghCABIQQJCCFIQAhBAkIIEhBCkIAQggSEECQghCABIQQJCCFIQAhBAkIIEhBCkIAQggSEECQghCABIQQJCCFIQAhBAkIIEhBCkIAQggSEECQghCABIQQJCCFIQAhBAkIIEhBCkIAQggSE/AbILrjDyekHTAAAAABJRU5ErkJggg==';
|
|
58
|
+
const fallBackImgSrc = `data:image/png;base64,${fallbackImgData}`;
|
|
57
59
|
/**
|
|
58
60
|
*
|
|
59
61
|
* Avatar
|
|
60
62
|
*/
|
|
61
|
-
const Avatar = ({ as = 'button', href, image, size = 64, status, subtitle, sx, textPosition = 'left', title, tooltipContent, tooltipSx, ...rest }) => {
|
|
63
|
+
const Avatar = ({ as = 'button', href, image, fallbackImg = fallBackImgSrc, size = 64, status, subtitle, sx, textPosition = 'left', title, tooltipContent, tooltipSx, ...rest }) => {
|
|
62
64
|
const [displayDefault, setDisplayDefault] = React.useState(false);
|
|
63
65
|
const Icon = iconReference?.[status ?? 'none'];
|
|
64
66
|
return (React.createElement(Box, { "$align": "center", "$gap": 18, sx: `
|
|
@@ -71,7 +73,7 @@ const Avatar = ({ as = 'button', href, image, size = 64, status, subtitle, sx, t
|
|
|
71
73
|
${sx}
|
|
72
74
|
`, ...rest },
|
|
73
75
|
React.createElement(Container, { as: as, "$size": size, href: href },
|
|
74
|
-
!displayDefault && (React.createElement(Image, { alt: "avatar image", height: size, onError: () => setDisplayDefault(true), quality: 100, sizes: "96 | 72 | 64 | 56 | 48 | 40 | 36 | 32 | 24 | 16", src: image ??
|
|
76
|
+
!displayDefault && (React.createElement(Image, { alt: "avatar image", height: size, onError: () => setDisplayDefault(true), quality: 100, sizes: "96 | 72 | 64 | 56 | 48 | 40 | 36 | 32 | 24 | 16", src: image ?? fallbackImg, width: size })),
|
|
75
77
|
displayDefault && React.createElement(Default, null),
|
|
76
78
|
React.createElement("div", null,
|
|
77
79
|
React.createElement(Icon, null))),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export const Default = () => (React.createElement("svg", { viewBox: "0 0
|
|
3
|
-
React.createElement("rect", { width: "228", height: "228",
|
|
4
|
-
React.createElement("path", { d: "M114
|
|
2
|
+
export const Default = () => (React.createElement("svg", { viewBox: "0 0 228 228", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
3
|
+
React.createElement("rect", { width: "228", height: "228", fill: "#D0D2D6" }),
|
|
4
|
+
React.createElement("path", { d: "M114 114C104.513 114 96.3906 110.622 89.6344 103.866C82.8781 97.1094 79.5 88.9875 79.5 79.5C79.5 70.0125 82.8781 61.8906 89.6344 55.1344C96.3906 48.3781 104.513 45 114 45C123.488 45 131.609 48.3781 138.366 55.1344C145.122 61.8906 148.5 70.0125 148.5 79.5C148.5 88.9875 145.122 97.1094 138.366 103.866C131.609 110.622 123.488 114 114 114ZM45 183V158.85C45 153.963 46.2593 149.469 48.7778 145.369C51.2905 141.275 54.6312 138.15 58.8 135.994C67.7125 131.538 76.7688 128.194 85.9688 125.963C95.1688 123.738 104.513 122.625 114 122.625C123.488 122.625 132.831 123.738 142.031 125.963C151.231 128.194 160.288 131.538 169.2 135.994C173.369 138.15 176.71 141.275 179.222 145.369C181.741 149.469 183 153.963 183 158.85V183H45Z", fill: "white" })));
|