@fanvue/ui 3.4.0 → 3.6.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/cjs/components/ChatInput/ChatInput.cjs +128 -92
- package/dist/cjs/components/ChatInput/ChatInput.cjs.map +1 -1
- package/dist/cjs/components/Drawer/Drawer.cjs +6 -3
- package/dist/cjs/components/Drawer/Drawer.cjs.map +1 -1
- package/dist/cjs/components/DropdownMenu/DropdownMenu.cjs +20 -4
- package/dist/cjs/components/DropdownMenu/DropdownMenu.cjs.map +1 -1
- package/dist/cjs/components/Icons/TickIcon.cjs +3 -1
- package/dist/cjs/components/Icons/TickIcon.cjs.map +1 -1
- package/dist/cjs/components/Logo/Logo.cjs +107 -33
- package/dist/cjs/components/Logo/Logo.cjs.map +1 -1
- package/dist/cjs/components/Logo/agenciesIcon.cjs +6 -0
- package/dist/cjs/components/Logo/agenciesIcon.cjs.map +1 -0
- package/dist/cjs/components/Pill/Pill.cjs +2 -1
- package/dist/cjs/components/Pill/Pill.cjs.map +1 -1
- package/dist/cjs/components/Table/Table.cjs +25 -18
- package/dist/cjs/components/Table/Table.cjs.map +1 -1
- package/dist/components/ChatInput/ChatInput.mjs +128 -92
- package/dist/components/ChatInput/ChatInput.mjs.map +1 -1
- package/dist/components/Drawer/Drawer.mjs +6 -3
- package/dist/components/Drawer/Drawer.mjs.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.mjs +20 -4
- package/dist/components/DropdownMenu/DropdownMenu.mjs.map +1 -1
- package/dist/components/Icons/TickIcon.mjs +3 -1
- package/dist/components/Icons/TickIcon.mjs.map +1 -1
- package/dist/components/Logo/Logo.mjs +107 -33
- package/dist/components/Logo/Logo.mjs.map +1 -1
- package/dist/components/Logo/agenciesIcon.mjs +6 -0
- package/dist/components/Logo/agenciesIcon.mjs.map +1 -0
- package/dist/components/Pill/Pill.mjs +2 -1
- package/dist/components/Pill/Pill.mjs.map +1 -1
- package/dist/components/Table/Table.mjs +25 -18
- package/dist/components/Table/Table.mjs.map +1 -1
- package/dist/index.d.ts +73 -11
- package/package.json +7 -4
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { cn } from "../../utils/cn.mjs";
|
|
5
|
+
import { AGENCIES_ICON_SVG } from "./agenciesIcon.mjs";
|
|
5
6
|
const getLogoColors = (color, variant) => {
|
|
6
7
|
if (color === "fullColour") {
|
|
7
8
|
return {
|
|
8
9
|
icon: "var(--color-brand-primary-default)",
|
|
9
10
|
iconInner: "var(--primitives-color-gray-black)",
|
|
10
11
|
textClass: ""
|
|
11
|
-
// Uses parent's text-content-primary
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
if (color === "decolour") {
|
|
@@ -16,7 +16,6 @@ const getLogoColors = (color, variant) => {
|
|
|
16
16
|
iconClass: "fill-[#151515] dark:fill-[#ffffff]",
|
|
17
17
|
iconInnerClass: "fill-[#ffffff] dark:fill-[#151515]",
|
|
18
18
|
textClass: ""
|
|
19
|
-
// Uses parent's text-content-primary
|
|
20
19
|
};
|
|
21
20
|
}
|
|
22
21
|
if (color === "whiteAlways") {
|
|
@@ -37,7 +36,6 @@ const getLogoColors = (color, variant) => {
|
|
|
37
36
|
icon: "var(--color-brand-primary-default)",
|
|
38
37
|
iconInner: "var(--primitives-color-gray-black)",
|
|
39
38
|
textClass: ""
|
|
40
|
-
// Default to adaptive color
|
|
41
39
|
};
|
|
42
40
|
};
|
|
43
41
|
const sizeClasses = {
|
|
@@ -49,6 +47,60 @@ const sizeClasses = {
|
|
|
49
47
|
"48": "h-12",
|
|
50
48
|
"64": "h-16"
|
|
51
49
|
};
|
|
50
|
+
const ICON_BG_PATH = "M0 11.2339C0 5.02957 5.02957 0 11.2339 0H27.7661C33.9704 0 39 5.02957 39 11.2339V27.7661C39 33.9704 33.9704 39 27.7661 39H11.2339C5.02957 39 0 33.9704 0 27.7661V11.2339Z";
|
|
51
|
+
const ICON_F_PATH = "M12.277 30.5825C11.4418 30.5825 11.0355 29.8659 11.2059 29.1153C11.4275 28.0916 12.5838 25.0548 11.7145 23.6899C10.4361 21.6938 7.25562 21.9838 6.5397 20.9602C6.02371 20.2089 6.48355 19.478 7.19738 19.0493C8.79967 18.0257 11.902 18.3157 14.9191 16.3025C16.5895 15.2106 18.1237 12.9927 18.993 11.662C20.2203 9.78527 20.7487 9.39287 23.3226 9.39287H32.3376C33.7574 9.39287 34.202 11.8036 31.8852 12.0686C31.2886 12.1368 29.6977 12.3757 27.4306 12.6487C25.2658 12.9216 20.4589 13.5728 22.351 16.6608C23.7658 18.2816 26.7488 18.0769 27.4306 19.0493C27.9238 19.7225 27.4875 20.4384 26.9505 20.7824C25.3311 21.8061 21.8737 21.6938 18.8566 23.6899C16.8111 25.0548 15.1478 28.0916 14.4659 29.1153C13.9716 29.8659 13.1293 30.5825 12.294 30.5825H12.277Z";
|
|
52
|
+
const FlatIconSVG = ({
|
|
53
|
+
className,
|
|
54
|
+
color,
|
|
55
|
+
variant
|
|
56
|
+
}) => {
|
|
57
|
+
const colors = getLogoColors(color, variant);
|
|
58
|
+
return /* @__PURE__ */ jsxs(
|
|
59
|
+
"svg",
|
|
60
|
+
{
|
|
61
|
+
viewBox: "0 0 39 39",
|
|
62
|
+
fill: "none",
|
|
63
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
64
|
+
className,
|
|
65
|
+
"aria-hidden": "true",
|
|
66
|
+
"data-testid": "logo-icon",
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ jsx(
|
|
69
|
+
"path",
|
|
70
|
+
{
|
|
71
|
+
d: ICON_BG_PATH,
|
|
72
|
+
...color === "decolour" ? { className: colors.iconClass } : { fill: colors.icon }
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
/* @__PURE__ */ jsx(
|
|
76
|
+
"path",
|
|
77
|
+
{
|
|
78
|
+
fillRule: "evenodd",
|
|
79
|
+
clipRule: "evenodd",
|
|
80
|
+
d: ICON_F_PATH,
|
|
81
|
+
...color === "decolour" ? { className: colors.iconInnerClass } : { fill: colors.iconInner }
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
const AgenciesIconSVG = ({ className }) => {
|
|
89
|
+
const ns = React.useId().replace(/:/g, "");
|
|
90
|
+
const html = React.useMemo(
|
|
91
|
+
() => AGENCIES_ICON_SVG.replace(/id="([a-z]+)"/g, `id="$1${ns}"`).replace(/url\(#([a-z]+)\)/g, `url(#$1${ns})`).replace(/href="#([a-z]+)"/g, `href="#$1${ns}"`),
|
|
92
|
+
[ns]
|
|
93
|
+
);
|
|
94
|
+
return /* @__PURE__ */ jsx(
|
|
95
|
+
"span",
|
|
96
|
+
{
|
|
97
|
+
className: cn("inline-block aspect-square isolate", className),
|
|
98
|
+
"aria-hidden": "true",
|
|
99
|
+
"data-testid": "logo-icon",
|
|
100
|
+
dangerouslySetInnerHTML: { __html: html }
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
};
|
|
52
104
|
const WordmarkSVG = ({ className }) => {
|
|
53
105
|
return /* @__PURE__ */ jsx(
|
|
54
106
|
"svg",
|
|
@@ -69,20 +121,55 @@ const WordmarkSVG = ({ className }) => {
|
|
|
69
121
|
}
|
|
70
122
|
);
|
|
71
123
|
};
|
|
124
|
+
const AgenciesWordmark = ({
|
|
125
|
+
size,
|
|
126
|
+
color,
|
|
127
|
+
textClass,
|
|
128
|
+
padTop
|
|
129
|
+
}) => /* @__PURE__ */ jsxs(
|
|
130
|
+
"div",
|
|
131
|
+
{
|
|
132
|
+
className: cn("inline-flex flex-col items-end", padTop && "pt-[0.125em]"),
|
|
133
|
+
style: { fontSize: `${size}px` },
|
|
134
|
+
children: [
|
|
135
|
+
/* @__PURE__ */ jsx(WordmarkSVG, { className: cn("h-[0.75em] w-auto", textClass) }),
|
|
136
|
+
/* @__PURE__ */ jsx(
|
|
137
|
+
"span",
|
|
138
|
+
{
|
|
139
|
+
className: "font-bold uppercase leading-none",
|
|
140
|
+
style: {
|
|
141
|
+
color: color === "decolour" ? "currentColor" : "var(--primitives-color-purple-300)",
|
|
142
|
+
fontSize: "0.25em",
|
|
143
|
+
letterSpacing: "0.05em",
|
|
144
|
+
marginTop: "0.06em"
|
|
145
|
+
},
|
|
146
|
+
children: "AGENCIES"
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
);
|
|
72
152
|
const Logo = React.forwardRef(
|
|
73
|
-
({ className, variant = "full", color = "fullColour", size, ...props }, ref) => {
|
|
153
|
+
({ className, variant = "full", color = "fullColour", version = "default", size, ...props }, ref) => {
|
|
74
154
|
const colors = getLogoColors(color, variant);
|
|
155
|
+
const isAgencies = version === "agencies";
|
|
156
|
+
const isAgenciesFull = isAgencies && variant === "full";
|
|
75
157
|
const showIcon = variant === "full" || variant === "icon" || variant === "portrait";
|
|
76
158
|
const showWordmark = variant === "full" || variant === "wordmark" || variant === "portrait";
|
|
77
|
-
const
|
|
159
|
+
const resolvedSize = size ?? (variant === "icon" ? "40" : "32");
|
|
160
|
+
const sizeClass = sizeClasses[resolvedSize];
|
|
78
161
|
const ariaProps = props["aria-label"] ? { role: "img" } : {};
|
|
162
|
+
const useGlossyIcon = isAgencies && color !== "decolour";
|
|
79
163
|
return /* @__PURE__ */ jsxs(
|
|
80
164
|
"div",
|
|
81
165
|
{
|
|
82
166
|
ref,
|
|
83
167
|
"data-testid": "logo",
|
|
84
168
|
className: cn(
|
|
85
|
-
"inline-flex
|
|
169
|
+
"inline-flex text-content-primary",
|
|
170
|
+
// Agencies full lockup aligns the icon and wordmark by their centres while the
|
|
171
|
+
// AGENCIES label hangs below; every other case centres the row.
|
|
172
|
+
isAgenciesFull ? "items-start" : "items-center",
|
|
86
173
|
variant === "portrait" ? "flex-col gap-2" : "flex-row",
|
|
87
174
|
variant === "full" && "gap-2",
|
|
88
175
|
className
|
|
@@ -90,36 +177,23 @@ const Logo = React.forwardRef(
|
|
|
90
177
|
...ariaProps,
|
|
91
178
|
...props,
|
|
92
179
|
children: [
|
|
93
|
-
showIcon && /* @__PURE__ */
|
|
94
|
-
|
|
180
|
+
showIcon && (useGlossyIcon ? /* @__PURE__ */ jsx(AgenciesIconSVG, { className: cn("w-auto shrink-0", sizeClass) }) : /* @__PURE__ */ jsx(
|
|
181
|
+
FlatIconSVG,
|
|
95
182
|
{
|
|
96
|
-
viewBox: "0 0 39 39",
|
|
97
|
-
fill: "none",
|
|
98
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
99
183
|
className: cn("w-auto shrink-0", sizeClass),
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
"path",
|
|
112
|
-
{
|
|
113
|
-
fillRule: "evenodd",
|
|
114
|
-
clipRule: "evenodd",
|
|
115
|
-
d: "M12.277 30.5825C11.4418 30.5825 11.0355 29.8659 11.2059 29.1153C11.4275 28.0916 12.5838 25.0548 11.7145 23.6899C10.4361 21.6938 7.25562 21.9838 6.5397 20.9602C6.02371 20.2089 6.48355 19.478 7.19738 19.0493C8.79967 18.0257 11.902 18.3157 14.9191 16.3025C16.5895 15.2106 18.1237 12.9927 18.993 11.662C20.2203 9.78527 20.7487 9.39287 23.3226 9.39287H32.3376C33.7574 9.39287 34.202 11.8036 31.8852 12.0686C31.2886 12.1368 29.6977 12.3757 27.4306 12.6487C25.2658 12.9216 20.4589 13.5728 22.351 16.6608C23.7658 18.2816 26.7488 18.0769 27.4306 19.0493C27.9238 19.7225 27.4875 20.4384 26.9505 20.7824C25.3311 21.8061 21.8737 21.6938 18.8566 23.6899C16.8111 25.0548 15.1478 28.0916 14.4659 29.1153C13.9716 29.8659 13.1293 30.5825 12.294 30.5825H12.277Z",
|
|
116
|
-
...color === "decolour" ? { className: colors.iconInnerClass } : { fill: colors.iconInner }
|
|
117
|
-
}
|
|
118
|
-
)
|
|
119
|
-
]
|
|
184
|
+
color,
|
|
185
|
+
variant
|
|
186
|
+
}
|
|
187
|
+
)),
|
|
188
|
+
showWordmark && (isAgencies ? /* @__PURE__ */ jsx(
|
|
189
|
+
AgenciesWordmark,
|
|
190
|
+
{
|
|
191
|
+
size: resolvedSize,
|
|
192
|
+
color,
|
|
193
|
+
textClass: colors.textClass,
|
|
194
|
+
padTop: isAgenciesFull
|
|
120
195
|
}
|
|
121
|
-
),
|
|
122
|
-
showWordmark && /* @__PURE__ */ jsx(WordmarkSVG, { className: cn("w-auto", sizeClass, colors.textClass) })
|
|
196
|
+
) : /* @__PURE__ */ jsx(WordmarkSVG, { className: cn("w-auto", sizeClass, colors.textClass) }))
|
|
123
197
|
]
|
|
124
198
|
}
|
|
125
199
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logo.mjs","sources":["../../../src/components/Logo/Logo.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\nconst getLogoColors = (color: LogoColor, variant: LogoVariant) => {\n if (color === \"fullColour\") {\n return {\n icon: \"var(--color-brand-primary-default)\",\n iconInner: \"var(--primitives-color-gray-black)\",\n textClass: \"\", // Uses parent's text-content-primary\n };\n }\n\n if (color === \"decolour\") {\n return {\n iconClass: \"fill-[#151515] dark:fill-[#ffffff]\",\n iconInnerClass: \"fill-[#ffffff] dark:fill-[#151515]\",\n textClass: \"\", // Uses parent's text-content-primary\n };\n }\n\n if (color === \"whiteAlways\") {\n return {\n icon:\n variant === \"icon\"\n ? \"var(--primitives-color-gray-white)\"\n : \"var(--color-brand-primary-default)\",\n iconInner: \"var(--primitives-color-gray-black)\",\n textClass: \"text-content-always-white\",\n };\n }\n\n if (color === \"blackAlways\") {\n return {\n icon:\n variant === \"icon\"\n ? \"var(--primitives-color-gray-black)\"\n : \"var(--color-brand-primary-default)\",\n iconInner:\n variant === \"icon\"\n ? \"var(--primitives-color-gray-white)\"\n : \"var(--primitives-color-gray-black)\",\n textClass: \"text-content-always-black\",\n };\n }\n\n return {\n icon: \"var(--color-brand-primary-default)\",\n iconInner: \"var(--primitives-color-gray-black)\",\n textClass: \"\", // Default to adaptive color\n };\n};\n\n/** Layout variant of the logo. */\nexport type LogoVariant = \"full\" | \"icon\" | \"wordmark\" | \"portrait\";\n/** Colour scheme of the logo. */\nexport type LogoColor = \"fullColour\" | \"decolour\" | \"whiteAlways\" | \"blackAlways\";\n/** Height of the logo in pixels. Both icon and wordmark scale proportionally. */\nexport type LogoSize = \"16\" | \"20\" | \"24\" | \"32\" | \"40\" | \"48\" | \"64\";\n\nconst sizeClasses: Record<LogoSize, string> = {\n \"16\": \"h-4\",\n \"20\": \"h-5\",\n \"24\": \"h-6\",\n \"32\": \"h-8\",\n \"40\": \"h-10\",\n \"48\": \"h-12\",\n \"64\": \"h-16\",\n};\n\nexport interface LogoProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Layout variant of the logo. @default \"full\" */\n variant?: LogoVariant;\n /** Colour scheme of the logo. @default \"fullColour\" */\n color?: LogoColor;\n /** Height of the logo in pixels. @default \"32\" (or \"40\" when `variant=\"icon\"`) */\n size?: LogoSize;\n /**\n * Accessible label for the logo. Required when `type` is `\"icon\"` and\n * the logo is used inside interactive contexts (links, buttons).\n *\n * @example \"Fanvue home\"\n */\n \"aria-label\"?: string;\n}\n\nconst WordmarkSVG = ({ className }: { className?: string }) => {\n return (\n <svg\n viewBox=\"0 0 128 30\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n className={className}\n data-testid=\"logo-wordmark\"\n >\n <path\n d=\"M89.0679 20.1823C89.0679 23.4373 90.1256 25.553 93.0961 25.553C95.9847 25.553 98.1815 23.0304 98.1815 17.7818V8.01701H102.902V29.0523H98.2629V25.3495C97.1238 27.75 95.2114 29.6218 91.9566 29.6218C86.464 29.6218 84.3888 26.0006 84.3888 21.1589V8.01701H89.0679V20.1823ZM116.586 7.44485C123.787 7.44485 126.717 12.9782 126.757 18.9592C126.757 19.1627 126.757 19.4883 126.716 19.8544H110.523C110.889 23.5569 113.249 25.8353 116.586 25.8353C118.986 25.8353 121.02 24.8995 121.752 22.8245H126.432C125.211 27.0966 121.59 29.6192 116.586 29.6192C110.279 29.6192 106.007 25.1028 106.007 18.4707C106.007 12.0829 110.483 7.44485 116.586 7.44485ZM29.0135 7.40527C35.971 7.40527 37.8834 11.5958 37.8834 16.112V24.2089C37.8834 25.7957 37.965 27.8301 38.2091 29.0508H33.408C33.3266 28.237 33.2858 27.4232 33.2858 26.5688V25.5922H33.2451C32.5534 27.301 30.7633 29.5795 26.5726 29.5796C21.8122 29.5796 19.1673 26.6501 19.1673 23.3137C19.1674 17.4955 26.2876 17.0073 29.3391 16.5191C32.0245 16.1122 33.2451 15.5831 33.2451 13.7929C33.2451 12.1248 31.6581 11.067 29.0949 11.067C26.8165 11.067 25.1484 12.3691 24.6601 14.4441H20.1846C20.7135 11.1078 23.5208 7.40535 29.0135 7.40527ZM66.6676 8.01701C68.4577 13.5504 70.2072 18.8399 71.9568 24.3326H71.9973C73.5435 19.2874 75.4559 13.5911 77.2055 8.01701H82.2099C79.606 15.0559 77.0835 22.0134 74.5202 29.0523H69.312L61.6223 8.01701H66.6676ZM18.3094 4.15021H4.92328V12.2878H17.2107V16.3973H4.92328V29.0508H0V0H18.3094V4.15021ZM52.6473 7.44485C58.099 7.44493 60.2147 11.066 60.2147 15.9077V29.0497H55.536V16.8839C55.536 13.629 54.437 11.5133 51.5078 11.5133C48.5783 11.5133 46.4216 14.036 46.4216 19.2845V29.0497H41.7024V8.01436H46.3406V11.7168C47.4392 9.31627 49.3921 7.44485 52.6473 7.44485ZM33.3265 17.0886C32.879 18.2685 31.7802 19.2856 28.1997 19.9773C25.3111 20.5062 23.8464 21.4015 23.8464 23.1509C23.8464 24.8191 25.2704 26.04 27.7523 26.04C30.5597 26.04 33.3265 24.2902 33.3265 19.2857V17.0886ZM116.586 11.1066C113.249 11.1066 111.011 13.263 110.564 16.5179H122.119C121.834 13.5071 120.085 11.1066 116.586 11.1066Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n\n/**\n * The Fanvue brand logo. Supports full (icon + wordmark), icon-only, wordmark-only,\n * and portrait (stacked) layouts with multiple colour schemes.\n *\n * @example\n * ```tsx\n * <Logo type=\"full\" color=\"fullColour\" />\n * ```\n */\nexport const Logo = React.forwardRef<HTMLDivElement, LogoProps>(\n ({ className, variant = \"full\", color = \"fullColour\", size, ...props }, ref) => {\n const colors = getLogoColors(color, variant);\n const showIcon = variant === \"full\" || variant === \"icon\" || variant === \"portrait\";\n const showWordmark = variant === \"full\" || variant === \"wordmark\" || variant === \"portrait\";\n const sizeClass = sizeClasses[size ?? (variant === \"icon\" ? \"40\" : \"32\")];\n\n // When aria-label is provided, add role=\"img\" for proper accessibility\n const ariaProps = props[\"aria-label\"] ? { role: \"img\" as const } : {};\n\n return (\n <div\n ref={ref}\n data-testid=\"logo\"\n className={cn(\n \"inline-flex items-center text-content-primary\",\n variant === \"portrait\" ? \"flex-col gap-2\" : \"flex-row\",\n variant === \"full\" && \"gap-2\",\n className,\n )}\n {...ariaProps}\n {...props}\n >\n {showIcon && (\n <svg\n viewBox=\"0 0 39 39\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={cn(\"w-auto shrink-0\", sizeClass)}\n aria-hidden=\"true\"\n data-testid=\"logo-icon\"\n >\n <path\n d=\"M0 11.2339C0 5.02957 5.02957 0 11.2339 0H27.7661C33.9704 0 39 5.02957 39 11.2339V27.7661C39 33.9704 33.9704 39 27.7661 39H11.2339C5.02957 39 0 33.9704 0 27.7661V11.2339Z\"\n {...(color === \"decolour\" ? { className: colors.iconClass } : { fill: colors.icon })}\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M12.277 30.5825C11.4418 30.5825 11.0355 29.8659 11.2059 29.1153C11.4275 28.0916 12.5838 25.0548 11.7145 23.6899C10.4361 21.6938 7.25562 21.9838 6.5397 20.9602C6.02371 20.2089 6.48355 19.478 7.19738 19.0493C8.79967 18.0257 11.902 18.3157 14.9191 16.3025C16.5895 15.2106 18.1237 12.9927 18.993 11.662C20.2203 9.78527 20.7487 9.39287 23.3226 9.39287H32.3376C33.7574 9.39287 34.202 11.8036 31.8852 12.0686C31.2886 12.1368 29.6977 12.3757 27.4306 12.6487C25.2658 12.9216 20.4589 13.5728 22.351 16.6608C23.7658 18.2816 26.7488 18.0769 27.4306 19.0493C27.9238 19.7225 27.4875 20.4384 26.9505 20.7824C25.3311 21.8061 21.8737 21.6938 18.8566 23.6899C16.8111 25.0548 15.1478 28.0916 14.4659 29.1153C13.9716 29.8659 13.1293 30.5825 12.294 30.5825H12.277Z\"\n {...(color === \"decolour\"\n ? { className: colors.iconInnerClass }\n : { fill: colors.iconInner })}\n />\n </svg>\n )}\n {showWordmark && <WordmarkSVG className={cn(\"w-auto\", sizeClass, colors.textClass)} />}\n </div>\n );\n },\n);\n\nLogo.displayName = \"Logo\";\n"],"names":[],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"Logo.mjs","sources":["../../../src/components/Logo/Logo.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { AGENCIES_ICON_SVG } from \"./agenciesIcon\";\n\nconst getLogoColors = (color: LogoColor, variant: LogoVariant) => {\n if (color === \"fullColour\") {\n return {\n icon: \"var(--color-brand-primary-default)\",\n iconInner: \"var(--primitives-color-gray-black)\",\n textClass: \"\",\n };\n }\n\n if (color === \"decolour\") {\n return {\n iconClass: \"fill-[#151515] dark:fill-[#ffffff]\",\n iconInnerClass: \"fill-[#ffffff] dark:fill-[#151515]\",\n textClass: \"\",\n };\n }\n\n if (color === \"whiteAlways\") {\n return {\n icon:\n variant === \"icon\"\n ? \"var(--primitives-color-gray-white)\"\n : \"var(--color-brand-primary-default)\",\n iconInner: \"var(--primitives-color-gray-black)\",\n textClass: \"text-content-always-white\",\n };\n }\n\n if (color === \"blackAlways\") {\n return {\n icon:\n variant === \"icon\"\n ? \"var(--primitives-color-gray-black)\"\n : \"var(--color-brand-primary-default)\",\n iconInner:\n variant === \"icon\"\n ? \"var(--primitives-color-gray-white)\"\n : \"var(--primitives-color-gray-black)\",\n textClass: \"text-content-always-black\",\n };\n }\n\n return {\n icon: \"var(--color-brand-primary-default)\",\n iconInner: \"var(--primitives-color-gray-black)\",\n textClass: \"\",\n };\n};\n\n/** Layout variant of the logo. */\nexport type LogoVariant = \"full\" | \"icon\" | \"wordmark\" | \"portrait\";\n/** Colour scheme of the logo. */\nexport type LogoColor = \"fullColour\" | \"decolour\" | \"whiteAlways\" | \"blackAlways\";\n/** Sub-brand version of the logo. */\nexport type LogoVersion = \"default\" | \"agencies\";\n/** Height of the logo in pixels. Both icon and wordmark scale proportionally. */\nexport type LogoSize = \"16\" | \"20\" | \"24\" | \"32\" | \"40\" | \"48\" | \"64\";\n\nconst sizeClasses: Record<LogoSize, string> = {\n \"16\": \"h-4\",\n \"20\": \"h-5\",\n \"24\": \"h-6\",\n \"32\": \"h-8\",\n \"40\": \"h-10\",\n \"48\": \"h-12\",\n \"64\": \"h-16\",\n};\n\nexport interface LogoProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Layout variant of the logo. @default \"full\" */\n variant?: LogoVariant;\n /** Colour scheme of the logo. @default \"fullColour\" */\n color?: LogoColor;\n /** Sub-brand version of the logo. @default \"default\" */\n version?: LogoVersion;\n /** Height of the logo in pixels. @default \"32\" (or \"40\" when `variant=\"icon\"`) */\n size?: LogoSize;\n /**\n * Accessible label for the logo. Required when `variant` is `\"icon\"` and\n * the logo is used inside interactive contexts (links, buttons).\n *\n * @example \"Fanvue home\"\n */\n \"aria-label\"?: string;\n}\n\nconst ICON_BG_PATH =\n \"M0 11.2339C0 5.02957 5.02957 0 11.2339 0H27.7661C33.9704 0 39 5.02957 39 11.2339V27.7661C39 33.9704 33.9704 39 27.7661 39H11.2339C5.02957 39 0 33.9704 0 27.7661V11.2339Z\";\nconst ICON_F_PATH =\n \"M12.277 30.5825C11.4418 30.5825 11.0355 29.8659 11.2059 29.1153C11.4275 28.0916 12.5838 25.0548 11.7145 23.6899C10.4361 21.6938 7.25562 21.9838 6.5397 20.9602C6.02371 20.2089 6.48355 19.478 7.19738 19.0493C8.79967 18.0257 11.902 18.3157 14.9191 16.3025C16.5895 15.2106 18.1237 12.9927 18.993 11.662C20.2203 9.78527 20.7487 9.39287 23.3226 9.39287H32.3376C33.7574 9.39287 34.202 11.8036 31.8852 12.0686C31.2886 12.1368 29.6977 12.3757 27.4306 12.6487C25.2658 12.9216 20.4589 13.5728 22.351 16.6608C23.7658 18.2816 26.7488 18.0769 27.4306 19.0493C27.9238 19.7225 27.4875 20.4384 26.9505 20.7824C25.3311 21.8061 21.8737 21.6938 18.8566 23.6899C16.8111 25.0548 15.1478 28.0916 14.4659 29.1153C13.9716 29.8659 13.1293 30.5825 12.294 30.5825H12.277Z\";\n\n/** The flat brand icon (rounded square + \"F\" knockout), coloured per scheme. */\nconst FlatIconSVG = ({\n className,\n color,\n variant,\n}: {\n className?: string;\n color: LogoColor;\n variant: LogoVariant;\n}) => {\n const colors = getLogoColors(color, variant);\n return (\n <svg\n viewBox=\"0 0 39 39\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n aria-hidden=\"true\"\n data-testid=\"logo-icon\"\n >\n <path\n d={ICON_BG_PATH}\n {...(color === \"decolour\" ? { className: colors.iconClass } : { fill: colors.icon })}\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d={ICON_F_PATH}\n {...(color === \"decolour\"\n ? { className: colors.iconInnerClass }\n : { fill: colors.iconInner })}\n />\n </svg>\n );\n};\n\n/**\n * The glossy \"Fanvue Agencies\" gradient icon. Injected as markup so its gradients and\n * blend-mode gloss render intact; `isolate` keeps the blend from reaching the page, and\n * ids are namespaced per instance so multiple logos on a page don't collide.\n */\nconst AgenciesIconSVG = ({ className }: { className?: string }) => {\n const ns = React.useId().replace(/:/g, \"\");\n const html = React.useMemo(\n () =>\n AGENCIES_ICON_SVG.replace(/id=\"([a-z]+)\"/g, `id=\"$1${ns}\"`)\n .replace(/url\\(#([a-z]+)\\)/g, `url(#$1${ns})`)\n .replace(/href=\"#([a-z]+)\"/g, `href=\"#$1${ns}\"`),\n [ns],\n );\n return (\n <span\n className={cn(\"inline-block aspect-square isolate\", className)}\n aria-hidden=\"true\"\n data-testid=\"logo-icon\"\n // biome-ignore lint/security/noDangerouslySetInnerHtml: static asset, ids namespaced per instance\n dangerouslySetInnerHTML={{ __html: html }}\n />\n );\n};\n\nconst WordmarkSVG = ({ className }: { className?: string }) => {\n return (\n <svg\n viewBox=\"0 0 128 30\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n className={className}\n data-testid=\"logo-wordmark\"\n >\n <path\n d=\"M89.0679 20.1823C89.0679 23.4373 90.1256 25.553 93.0961 25.553C95.9847 25.553 98.1815 23.0304 98.1815 17.7818V8.01701H102.902V29.0523H98.2629V25.3495C97.1238 27.75 95.2114 29.6218 91.9566 29.6218C86.464 29.6218 84.3888 26.0006 84.3888 21.1589V8.01701H89.0679V20.1823ZM116.586 7.44485C123.787 7.44485 126.717 12.9782 126.757 18.9592C126.757 19.1627 126.757 19.4883 126.716 19.8544H110.523C110.889 23.5569 113.249 25.8353 116.586 25.8353C118.986 25.8353 121.02 24.8995 121.752 22.8245H126.432C125.211 27.0966 121.59 29.6192 116.586 29.6192C110.279 29.6192 106.007 25.1028 106.007 18.4707C106.007 12.0829 110.483 7.44485 116.586 7.44485ZM29.0135 7.40527C35.971 7.40527 37.8834 11.5958 37.8834 16.112V24.2089C37.8834 25.7957 37.965 27.8301 38.2091 29.0508H33.408C33.3266 28.237 33.2858 27.4232 33.2858 26.5688V25.5922H33.2451C32.5534 27.301 30.7633 29.5795 26.5726 29.5796C21.8122 29.5796 19.1673 26.6501 19.1673 23.3137C19.1674 17.4955 26.2876 17.0073 29.3391 16.5191C32.0245 16.1122 33.2451 15.5831 33.2451 13.7929C33.2451 12.1248 31.6581 11.067 29.0949 11.067C26.8165 11.067 25.1484 12.3691 24.6601 14.4441H20.1846C20.7135 11.1078 23.5208 7.40535 29.0135 7.40527ZM66.6676 8.01701C68.4577 13.5504 70.2072 18.8399 71.9568 24.3326H71.9973C73.5435 19.2874 75.4559 13.5911 77.2055 8.01701H82.2099C79.606 15.0559 77.0835 22.0134 74.5202 29.0523H69.312L61.6223 8.01701H66.6676ZM18.3094 4.15021H4.92328V12.2878H17.2107V16.3973H4.92328V29.0508H0V0H18.3094V4.15021ZM52.6473 7.44485C58.099 7.44493 60.2147 11.066 60.2147 15.9077V29.0497H55.536V16.8839C55.536 13.629 54.437 11.5133 51.5078 11.5133C48.5783 11.5133 46.4216 14.036 46.4216 19.2845V29.0497H41.7024V8.01436H46.3406V11.7168C47.4392 9.31627 49.3921 7.44485 52.6473 7.44485ZM33.3265 17.0886C32.879 18.2685 31.7802 19.2856 28.1997 19.9773C25.3111 20.5062 23.8464 21.4015 23.8464 23.1509C23.8464 24.8191 25.2704 26.04 27.7523 26.04C30.5597 26.04 33.3265 24.2902 33.3265 19.2857V17.0886ZM116.586 11.1066C113.249 11.1066 111.011 13.263 110.564 16.5179H122.119C121.834 13.5071 120.085 11.1066 116.586 11.1066Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n\n/**\n * The \"Fanvue Agencies\" lockup: the wordmark with a right-aligned AGENCIES sub-label.\n * Anchoring the column's font-size to the icon height (1em) sizes the wordmark (0.75em)\n * and label (0.25em) in `em`, so both scale with `size`. `padTop` adds the 0.125em that\n * centres the 0.75em wordmark against the full-height icon in the horizontal lockup.\n */\nconst AgenciesWordmark = ({\n size,\n color,\n textClass,\n padTop,\n}: {\n size: LogoSize;\n color: LogoColor;\n textClass: string;\n padTop: boolean;\n}) => (\n <div\n className={cn(\"inline-flex flex-col items-end\", padTop && \"pt-[0.125em]\")}\n style={{ fontSize: `${size}px` }}\n >\n <WordmarkSVG className={cn(\"h-[0.75em] w-auto\", textClass)} />\n <span\n className=\"font-bold uppercase leading-none\"\n style={{\n color: color === \"decolour\" ? \"currentColor\" : \"var(--primitives-color-purple-300)\",\n fontSize: \"0.25em\",\n letterSpacing: \"0.05em\",\n marginTop: \"0.06em\",\n }}\n >\n AGENCIES\n </span>\n </div>\n);\n\n/**\n * The Fanvue brand logo. Supports full (icon + wordmark), icon-only, wordmark-only, and\n * portrait (stacked) layouts with multiple colour schemes. `version=\"agencies\"` renders the\n * sub-brand lockup: a glossy purple icon and an \"AGENCIES\" label beneath the wordmark.\n *\n * @example\n * ```tsx\n * <Logo variant=\"full\" color=\"fullColour\" />\n * <Logo variant=\"full\" version=\"agencies\" />\n * ```\n */\nexport const Logo = React.forwardRef<HTMLDivElement, LogoProps>(\n (\n { className, variant = \"full\", color = \"fullColour\", version = \"default\", size, ...props },\n ref,\n ) => {\n const colors = getLogoColors(color, variant);\n const isAgencies = version === \"agencies\";\n const isAgenciesFull = isAgencies && variant === \"full\";\n const showIcon = variant === \"full\" || variant === \"icon\" || variant === \"portrait\";\n const showWordmark = variant === \"full\" || variant === \"wordmark\" || variant === \"portrait\";\n const resolvedSize = size ?? (variant === \"icon\" ? \"40\" : \"32\");\n const sizeClass = sizeClasses[resolvedSize];\n\n const ariaProps = props[\"aria-label\"] ? { role: \"img\" as const } : {};\n // The glossy icon only has a purple treatment; decolour falls back to the flat mono icon.\n const useGlossyIcon = isAgencies && color !== \"decolour\";\n\n return (\n <div\n ref={ref}\n data-testid=\"logo\"\n className={cn(\n \"inline-flex text-content-primary\",\n // Agencies full lockup aligns the icon and wordmark by their centres while the\n // AGENCIES label hangs below; every other case centres the row.\n isAgenciesFull ? \"items-start\" : \"items-center\",\n variant === \"portrait\" ? \"flex-col gap-2\" : \"flex-row\",\n variant === \"full\" && \"gap-2\",\n className,\n )}\n {...ariaProps}\n {...props}\n >\n {showIcon &&\n (useGlossyIcon ? (\n <AgenciesIconSVG className={cn(\"w-auto shrink-0\", sizeClass)} />\n ) : (\n <FlatIconSVG\n className={cn(\"w-auto shrink-0\", sizeClass)}\n color={color}\n variant={variant}\n />\n ))}\n {showWordmark &&\n (isAgencies ? (\n <AgenciesWordmark\n size={resolvedSize}\n color={color}\n textClass={colors.textClass}\n padTop={isAgenciesFull}\n />\n ) : (\n <WordmarkSVG className={cn(\"w-auto\", sizeClass, colors.textClass)} />\n ))}\n </div>\n );\n },\n);\n\nLogo.displayName = \"Logo\";\n"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const AGENCIES_ICON_SVG = '<svg width="100%" height="100%" style="display:block" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g clip-path="url(#a)"><path fill="#49f264" d="M0 9.21753C0 4.12683 4.12683 0 9.21753 0H22.7825C27.8732 0 32 4.12683 32 9.21753V22.7825C32 27.8732 27.8732 32 22.7825 32H9.21753C4.12683 32 0 27.8732 0 22.7825z"/><path fill="url(#b)" d="M0 9.21753C0 4.12683 4.12683 0 9.21753 0H22.7825C27.8732 0 32 4.12683 32 9.21753V22.7825C32 27.8732 27.8732 32 22.7825 32H9.21753C4.12683 32 0 27.8732 0 22.7825z" style="mix-blend-mode:lighten"/><path fill="url(#c)" d="M0 9.21753C0 4.12683 4.12683 0 9.21753 0H22.7825C27.8732 0 32 4.12683 32 9.21753V22.7825C32 27.8732 27.8732 32 22.7825 32H9.21753C4.12683 32 0 27.8732 0 22.7825z"/><g style="mix-blend-mode:color-dodge"><mask id="e" width="32" height="32" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="url(#d)" d="M0 0h32v32H0z"/></mask><g mask="url(#e)"><path fill="url(#f)" d="M0 9.21753C0 4.12683 4.12683 0 9.21753 0H22.7825C27.8732 0 32 4.12683 32 9.21753V22.7825C32 27.8732 27.8732 32 22.7825 32H9.21753C4.12683 32 0 27.8732 0 22.7825z"/></g></g><path stroke="url(#g)" stroke-width=".384064" d="M9.21777.192383H22.7822c4.9847 0 9.0254 4.040747 9.0254 9.025387V22.7822c0 4.9847-4.0407 9.0254-9.0254 9.0254H9.21777c-4.98464 0-9.025387-4.0407-9.025387-9.0254V9.21777c0-4.98464 4.040747-9.025387 9.025387-9.025387Z"/><path stroke="url(#h)" stroke-width=".384064" d="M9.21777.192383H22.7822c4.9847 0 9.0254 4.040747 9.0254 9.025387V22.7822c0 4.9847-4.0407 9.0254-9.0254 9.0254H9.21777c-4.98464 0-9.025387-4.0407-9.025387-9.0254V9.21777c0-4.98464 4.040747-9.025387 9.025387-9.025387Z"/><path stroke="url(#i)" stroke-width=".384064" d="M9.21777.192383H22.7822c4.9847 0 9.0254 4.040747 9.0254 9.025387V22.7822c0 4.9847-4.0407 9.0254-9.0254 9.0254H9.21777c-4.98464 0-9.025387-4.0407-9.025387-9.0254V9.21777c0-4.98464 4.040747-9.025387 9.025387-9.025387Z"/><path stroke="url(#j)" stroke-width=".384064" d="M9.21777.192383H22.7822c4.9847 0 9.0254 4.040747 9.0254 9.025387V22.7822c0 4.9847-4.0407 9.0254-9.0254 9.0254H9.21777c-4.98464 0-9.025387-4.0407-9.025387-9.0254V9.21777c0-4.98464 4.040747-9.025387 9.025387-9.025387Z"/><g fill-rule="evenodd" clip-rule="evenodd" filter="url(#k)"><path fill="url(#l)" d="M10.0735 25.0934c-.68532 0-1.01866-.588-.8788-1.2039.18182-.8399 1.1306-3.3317.41726-4.4516-1.04897-1.6378-3.65855-1.3998-4.24597-2.2398-.42339-.6163-.04608-1.2161.53963-1.5678 1.3147-.8399 3.86019-.602 6.33578-2.2538 1.3706-.8959 2.6294-2.7157 3.3427-3.80764 1.007-1.53986 1.4405-1.86183 3.5525-1.86183h7.3969c1.1649 0 1.5298 1.97802-.3712 2.19546-.4895.056-1.7949.25201-3.6551.47591-1.7762.224-5.7203.7583-4.1679 3.2921 1.1609 1.3298 3.6085 1.1619 4.1679 1.9598.4047.5523.0467 1.1398-.3939 1.422-1.3287.8399-4.1656.7478-6.6411 2.3856-1.6784 1.1199-3.0432 3.6117-3.6026 4.4516-.4056.6159-1.0968 1.2039-1.7821 1.2039z"/><path fill="url(#m)" d="M10.0735 25.0934c-.68532 0-1.01866-.588-.8788-1.2039.18182-.8399 1.1306-3.3317.41726-4.4516-1.04897-1.6378-3.65855-1.3998-4.24597-2.2398-.42339-.6163-.04608-1.2161.53963-1.5678 1.3147-.8399 3.86019-.602 6.33578-2.2538 1.3706-.8959 2.6294-2.7157 3.3427-3.80764 1.007-1.53986 1.4405-1.86183 3.5525-1.86183h7.3969c1.1649 0 1.5298 1.97802-.3712 2.19546-.4895.056-1.7949.25201-3.6551.47591-1.7762.224-5.7203.7583-4.1679 3.2921 1.1609 1.3298 3.6085 1.1619 4.1679 1.9598.4047.5523.0467 1.1398-.3939 1.422-1.3287.8399-4.1656.7478-6.6411 2.3856-1.6784 1.1199-3.0432 3.6117-3.6026 4.4516-.4056.6159-1.0968 1.2039-1.7821 1.2039z" style="mix-blend-mode:lighten"/></g><path fill="#000" fill-opacity=".01" fill-rule="evenodd" clip-rule="evenodd" d="M10.0735 25.0934c-.68532 0-1.01866-.588-.8788-1.2039.18182-.8399 1.1306-3.3317.41726-4.4516-1.04897-1.6378-3.65855-1.3998-4.24597-2.2398-.42339-.6163-.04608-1.2161.53963-1.5678 1.3147-.8399 3.86019-.602 6.33578-2.2538 1.3706-.8959 2.6294-2.7157 3.3427-3.80764 1.007-1.53986 1.4405-1.86183 3.5525-1.86183h7.3969c1.1649 0 1.5298 1.97802-.3712 2.19546-.4895.056-1.7949.25201-3.6551.47591-1.7762.224-5.7203.7583-4.1679 3.2921 1.1609 1.3298 3.6085 1.1619 4.1679 1.9598.4047.5523.0467 1.1398-.3939 1.422-1.3287.8399-4.1656.7478-6.6411 2.3856-1.6784 1.1199-3.0432 3.6117-3.6026 4.4516-.4056.6159-1.0968 1.2039-1.7821 1.2039z" clip-rule="evenodd"/><path stroke="url(#n)" stroke-width=".2" d="M19.1363 7.80664h7.3975c.5165.00015.8647.43888.8642.91602-.0004.2358-.0878.47842-.2832.6748-.1956.19642-.5063.35292-.9639.40527-.2461.02816-.6967.09198-1.3154.17579-.6197.08398-1.4106.18888-2.3398.30078h-.001c-.8847.1115-2.3314.3019-3.3623.7881-.5151.2429-.944.5683-1.1377 1.0107-.1965.4495-.1391.9935.2598 1.6446l.0039.0068.0058.0068c.6027.6904 1.5336.9866 2.3584 1.21.4178.1131.8057.2068 1.127.3223.3232.1161.5549.2466.6758.4189l.0009.002c.1808.2467.1905.4956.1075.7177-.0849.2269-.2685.4285-.4747.5606-.3192.2017-.7339.351-1.2226.4853-.4895.1345-1.0406.2513-1.6367.3955-1.1874.2873-2.5304.677-3.7832 1.5059-.8547.5703-1.6243 1.4859-2.2471 2.3564-.6205.8674-1.1094 1.7126-1.3828 2.1231l-.001.001c-.197.299-.4627.5907-.7607.8066-.2989.2166-.623.3516-.9375.3516h-.0137c-.31124 0-.53407-.1321-.66602-.3272-.13357-.1975-.1799-.4687-.11524-.7539v-.001c.0446-.206.13595-.5142.24024-.8867.10355-.3699.21853-.7984.30468-1.2363.08607-.4375.14448-.8885.13575-1.3027-.00875-.413-.08519-.7999-.27735-1.1016-.54613-.8525-1.49407-1.2105-2.35156-1.4609-.43536-.1272-.84117-.2245-1.18164-.3448-.34146-.1206-.58746-.2553-.71485-.4375-.19178-.2797-.19985-.5478-.09863-.7871.10381-.2452.32707-.4687.6084-.6377l.00195-.001c.31549-.2015.70908-.3411 1.16797-.4619.46026-.1211.97354-.2206 1.53321-.3476 1.04421-.2371 2.22539-.565 3.40139-1.294l.2343-.1513c1.3906-.9091 2.6595-2.7466 3.3711-3.83598.5042-.7709.8527-1.21602 1.3262-1.47558.4739-.25964 1.0875-.34179 2.1426-.3418Z"/><path stroke="url(#o)" stroke-width=".2" d="M19.1363 7.80664h7.3975c.5165.00015.8647.43888.8642.91602-.0004.2358-.0878.47842-.2832.6748-.1956.19642-.5063.35292-.9639.40527-.2461.02816-.6967.09198-1.3154.17579-.6197.08398-1.4106.18888-2.3398.30078h-.001c-.8847.1115-2.3314.3019-3.3623.7881-.5151.2429-.944.5683-1.1377 1.0107-.1965.4495-.1391.9935.2598 1.6446l.0039.0068.0058.0068c.6027.6904 1.5336.9866 2.3584 1.21.4178.1131.8057.2068 1.127.3223.3232.1161.5549.2466.6758.4189l.0009.002c.1808.2467.1905.4956.1075.7177-.0849.2269-.2685.4285-.4747.5606-.3192.2017-.7339.351-1.2226.4853-.4895.1345-1.0406.2513-1.6367.3955-1.1874.2873-2.5304.677-3.7832 1.5059-.8547.5703-1.6243 1.4859-2.2471 2.3564-.6205.8674-1.1094 1.7126-1.3828 2.1231l-.001.001c-.197.299-.4627.5907-.7607.8066-.2989.2166-.623.3516-.9375.3516h-.0137c-.31124 0-.53407-.1321-.66602-.3272-.13357-.1975-.1799-.4687-.11524-.7539v-.001c.0446-.206.13595-.5142.24024-.8867.10355-.3699.21853-.7984.30468-1.2363.08607-.4375.14448-.8885.13575-1.3027-.00875-.413-.08519-.7999-.27735-1.1016-.54613-.8525-1.49407-1.2105-2.35156-1.4609-.43536-.1272-.84117-.2245-1.18164-.3448-.34146-.1206-.58746-.2553-.71485-.4375-.19178-.2797-.19985-.5478-.09863-.7871.10381-.2452.32707-.4687.6084-.6377l.00195-.001c.31549-.2015.70908-.3411 1.16797-.4619.46026-.1211.97354-.2206 1.53321-.3476 1.04421-.2371 2.22539-.565 3.40139-1.294l.2343-.1513c1.3906-.9091 2.6595-2.7466 3.3711-3.83598.5042-.7709.8527-1.21602 1.3262-1.47558.4739-.25964 1.0875-.34179 2.1426-.3418Z"/><mask id="q" width="32" height="32" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="url(#p)" d="M0 0h32v32H0z"/></mask><g mask="url(#q)"><path fill="url(#r)" fill-rule="evenodd" clip-rule="evenodd" d="M10.0735 25.0934c-.68532 0-1.01866-.588-.8788-1.2039.18182-.8399 1.1306-3.3317.41726-4.4516-1.04897-1.6378-3.65855-1.3998-4.24597-2.2398-.42339-.6163-.04608-1.2161.53963-1.5678 1.3147-.8399 3.86019-.602 6.33578-2.2538 1.3706-.8959 2.6294-2.7157 3.3427-3.80764 1.007-1.53986 1.4405-1.86183 3.5525-1.86183h7.3969c1.1649 0 1.5298 1.97802-.3712 2.19546-.4895.056-1.7949.25201-3.6551.47591-1.7762.224-5.7203.7583-4.1679 3.2921 1.1609 1.3298 3.6085 1.1619 4.1679 1.9598.4047.5523.0467 1.1398-.3939 1.422-1.3287.8399-4.1656.7478-6.6411 2.3856-1.6784 1.1199-3.0432 3.6117-3.6026 4.4516-.4056.6159-1.0968 1.2039-1.7821 1.2039z" clip-rule="evenodd"/></g><rect width="32" height="32" fill="#9772ff" rx="9" style="mix-blend-mode:hue"/></g><defs><radialGradient id="b" cx="0" cy="0" r="1" gradientTransform="matrix(0 23.9175 -30.8218 0 16.1649 0)" gradientUnits="userSpaceOnUse"><stop stop-color="#80f593"/><stop offset="1" stop-color="#49f264"/></radialGradient><radialGradient id="c" cx="0" cy="0" r="1" gradientTransform="matrix(0 -8.2 26.3263 0 16 32)" gradientUnits="userSpaceOnUse"><stop stop-color="#0ec833"/><stop offset="1" stop-color="#49f264" stop-opacity="0"/></radialGradient><radialGradient id="g" cx="0" cy="0" r="1" gradientTransform="rotate(90 8 8)scale(16 216.921)" gradientUnits="userSpaceOnUse"><stop stop-color="#acf6b9"/><stop offset="1" stop-color="#49f264"/></radialGradient><radialGradient id="h" cx="0" cy="0" r="1" gradientTransform="matrix(0 -16 194.49 0 16 32)" gradientUnits="userSpaceOnUse"><stop stop-color="#80f593"/><stop offset="1" stop-color="#49f264" stop-opacity="0"/></radialGradient><radialGradient id="m" cx="0" cy="0" r="1" gradientTransform="matrix(-.05865 17.4934 -29.59743 -.09923 16.4 7.6)" gradientUnits="userSpaceOnUse"><stop stop-color="#fff" stop-opacity=".05"/><stop offset=".746382" stop-color="#fff" stop-opacity=".2"/></radialGradient><radialGradient id="n" cx="0" cy="0" r="1" gradientTransform="matrix(0 3.4 -19.5245 0 16.4 7.6)" gradientUnits="userSpaceOnUse"><stop stop-color="#fff" stop-opacity=".4"/><stop offset="1" stop-color="#fff" stop-opacity="0"/></radialGradient><radialGradient id="o" cx="0" cy="0" r="1" gradientTransform="matrix(.4 -12.20004 70.05845 2.29703 16 25.2)" gradientUnits="userSpaceOnUse"><stop stop-color="#fff" stop-opacity=".1"/><stop offset="1" stop-color="#fff" stop-opacity="0"/></radialGradient><linearGradient id="f" x1="16" x2="16" y1="0" y2="32" gradientUnits="userSpaceOnUse"><stop stop-color="#fff" stop-opacity=".95"/><stop offset=".317308" stop-color="#fff" stop-opacity=".5"/><stop offset="1" stop-color="#fff" stop-opacity=".95"/></linearGradient><linearGradient id="i" x1="16" x2="16" y1="32" y2="31.6" gradientUnits="userSpaceOnUse"><stop stop-color="#acf6b9"/><stop offset="1" stop-color="#49f264" stop-opacity="0"/></linearGradient><linearGradient id="j" x1="16" x2="16" y1=".4" y2="0" gradientUnits="userSpaceOnUse"><stop stop-color="#49f264" stop-opacity="0"/><stop offset="1" stop-color="#d4f7da"/></linearGradient><linearGradient id="l" x1="16.4" x2="16.4" y1="7.6" y2="20.2" gradientUnits="userSpaceOnUse"><stop stop-color="#2e2e2e"/><stop offset="1" stop-color="#151515"/></linearGradient><linearGradient id="r" x1="16.4" x2="16.4" y1="2.4" y2="25.2" gradientUnits="userSpaceOnUse"><stop stop-color="#737373"/><stop offset="1" stop-color="#333"/></linearGradient><pattern id="d" width="1" height="1" patternContentUnits="objectBoundingBox"><use xlink:href="#s" transform="scale(.00156)"/></pattern><pattern id="p" width="1" height="1" patternContentUnits="objectBoundingBox"><use xlink:href="#s" transform="scale(.00156)"/></pattern><clipPath id="a"><path fill="#fff" d="M0 0h32v32H0z"/></clipPath><filter id="k" width="29.9125" height="27.7864" x="4.38512" y="7.30703" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy=".4"/><feGaussianBlur stdDeviation=".4"/><feColorMatrix values="0 0 0 0 0.12549 0 0 0 0 0.352941 0 0 0 0 0.172549 0 0 0 0.48 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_7301_30525"/><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dx=".8" dy="1.2"/><feGaussianBlur stdDeviation=".8"/><feColorMatrix values="0 0 0 0 0.12549 0 0 0 0 0.352941 0 0 0 0 0.172549 0 0 0 0.42 0"/><feBlend in2="effect1_dropShadow_7301_30525" result="effect2_dropShadow_7301_30525"/><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dx="1.6" dy="2.8"/><feGaussianBlur stdDeviation="1"/><feColorMatrix values="0 0 0 0 0.12549 0 0 0 0 0.352941 0 0 0 0 0.172549 0 0 0 0.24 0"/><feBlend in2="effect2_dropShadow_7301_30525" result="effect3_dropShadow_7301_30525"/><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dx="2.8" dy="4.8"/><feGaussianBlur stdDeviation="1.2"/><feColorMatrix values="0 0 0 0 0.12549 0 0 0 0 0.352941 0 0 0 0 0.172549 0 0 0 0.07 0"/><feBlend in2="effect3_dropShadow_7301_30525" result="effect4_dropShadow_7301_30525"/><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dx="4.4" dy="7.6"/><feGaussianBlur stdDeviation="1.2"/><feColorMatrix values="0 0 0 0 0.12549 0 0 0 0 0.352941 0 0 0 0 0.172549 0 0 0 0.01 0"/><feBlend in2="effect4_dropShadow_7301_30525" result="effect5_dropShadow_7301_30525"/><feBlend in="SourceGraphic" in2="effect5_dropShadow_7301_30525" result="shape"/></filter></defs></svg>';
|
|
3
|
+
export {
|
|
4
|
+
AGENCIES_ICON_SVG
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=agenciesIcon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agenciesIcon.mjs","sources":["../../../src/components/Logo/agenciesIcon.ts"],"sourcesContent":["// Fanvue Agencies gradient icon, exported from Figma (vector, raster stripped). The purple\n// is produced by a `mix-blend-mode:hue` layer over the green base, matching the brand spec.\nexport const AGENCIES_ICON_SVG =\n '<svg width=\"100%\" height=\"100%\" style=\"display:block\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><g clip-path=\"url(#a)\"><path fill=\"#49f264\" d=\"M0 9.21753C0 4.12683 4.12683 0 9.21753 0H22.7825C27.8732 0 32 4.12683 32 9.21753V22.7825C32 27.8732 27.8732 32 22.7825 32H9.21753C4.12683 32 0 27.8732 0 22.7825z\"/><path fill=\"url(#b)\" d=\"M0 9.21753C0 4.12683 4.12683 0 9.21753 0H22.7825C27.8732 0 32 4.12683 32 9.21753V22.7825C32 27.8732 27.8732 32 22.7825 32H9.21753C4.12683 32 0 27.8732 0 22.7825z\" style=\"mix-blend-mode:lighten\"/><path fill=\"url(#c)\" d=\"M0 9.21753C0 4.12683 4.12683 0 9.21753 0H22.7825C27.8732 0 32 4.12683 32 9.21753V22.7825C32 27.8732 27.8732 32 22.7825 32H9.21753C4.12683 32 0 27.8732 0 22.7825z\"/><g style=\"mix-blend-mode:color-dodge\"><mask id=\"e\" width=\"32\" height=\"32\" x=\"0\" y=\"0\" maskUnits=\"userSpaceOnUse\" style=\"mask-type:alpha\"><path fill=\"url(#d)\" d=\"M0 0h32v32H0z\"/></mask><g mask=\"url(#e)\"><path fill=\"url(#f)\" d=\"M0 9.21753C0 4.12683 4.12683 0 9.21753 0H22.7825C27.8732 0 32 4.12683 32 9.21753V22.7825C32 27.8732 27.8732 32 22.7825 32H9.21753C4.12683 32 0 27.8732 0 22.7825z\"/></g></g><path stroke=\"url(#g)\" stroke-width=\".384064\" d=\"M9.21777.192383H22.7822c4.9847 0 9.0254 4.040747 9.0254 9.025387V22.7822c0 4.9847-4.0407 9.0254-9.0254 9.0254H9.21777c-4.98464 0-9.025387-4.0407-9.025387-9.0254V9.21777c0-4.98464 4.040747-9.025387 9.025387-9.025387Z\"/><path stroke=\"url(#h)\" stroke-width=\".384064\" d=\"M9.21777.192383H22.7822c4.9847 0 9.0254 4.040747 9.0254 9.025387V22.7822c0 4.9847-4.0407 9.0254-9.0254 9.0254H9.21777c-4.98464 0-9.025387-4.0407-9.025387-9.0254V9.21777c0-4.98464 4.040747-9.025387 9.025387-9.025387Z\"/><path stroke=\"url(#i)\" stroke-width=\".384064\" d=\"M9.21777.192383H22.7822c4.9847 0 9.0254 4.040747 9.0254 9.025387V22.7822c0 4.9847-4.0407 9.0254-9.0254 9.0254H9.21777c-4.98464 0-9.025387-4.0407-9.025387-9.0254V9.21777c0-4.98464 4.040747-9.025387 9.025387-9.025387Z\"/><path stroke=\"url(#j)\" stroke-width=\".384064\" d=\"M9.21777.192383H22.7822c4.9847 0 9.0254 4.040747 9.0254 9.025387V22.7822c0 4.9847-4.0407 9.0254-9.0254 9.0254H9.21777c-4.98464 0-9.025387-4.0407-9.025387-9.0254V9.21777c0-4.98464 4.040747-9.025387 9.025387-9.025387Z\"/><g fill-rule=\"evenodd\" clip-rule=\"evenodd\" filter=\"url(#k)\"><path fill=\"url(#l)\" d=\"M10.0735 25.0934c-.68532 0-1.01866-.588-.8788-1.2039.18182-.8399 1.1306-3.3317.41726-4.4516-1.04897-1.6378-3.65855-1.3998-4.24597-2.2398-.42339-.6163-.04608-1.2161.53963-1.5678 1.3147-.8399 3.86019-.602 6.33578-2.2538 1.3706-.8959 2.6294-2.7157 3.3427-3.80764 1.007-1.53986 1.4405-1.86183 3.5525-1.86183h7.3969c1.1649 0 1.5298 1.97802-.3712 2.19546-.4895.056-1.7949.25201-3.6551.47591-1.7762.224-5.7203.7583-4.1679 3.2921 1.1609 1.3298 3.6085 1.1619 4.1679 1.9598.4047.5523.0467 1.1398-.3939 1.422-1.3287.8399-4.1656.7478-6.6411 2.3856-1.6784 1.1199-3.0432 3.6117-3.6026 4.4516-.4056.6159-1.0968 1.2039-1.7821 1.2039z\"/><path fill=\"url(#m)\" d=\"M10.0735 25.0934c-.68532 0-1.01866-.588-.8788-1.2039.18182-.8399 1.1306-3.3317.41726-4.4516-1.04897-1.6378-3.65855-1.3998-4.24597-2.2398-.42339-.6163-.04608-1.2161.53963-1.5678 1.3147-.8399 3.86019-.602 6.33578-2.2538 1.3706-.8959 2.6294-2.7157 3.3427-3.80764 1.007-1.53986 1.4405-1.86183 3.5525-1.86183h7.3969c1.1649 0 1.5298 1.97802-.3712 2.19546-.4895.056-1.7949.25201-3.6551.47591-1.7762.224-5.7203.7583-4.1679 3.2921 1.1609 1.3298 3.6085 1.1619 4.1679 1.9598.4047.5523.0467 1.1398-.3939 1.422-1.3287.8399-4.1656.7478-6.6411 2.3856-1.6784 1.1199-3.0432 3.6117-3.6026 4.4516-.4056.6159-1.0968 1.2039-1.7821 1.2039z\" style=\"mix-blend-mode:lighten\"/></g><path fill=\"#000\" fill-opacity=\".01\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M10.0735 25.0934c-.68532 0-1.01866-.588-.8788-1.2039.18182-.8399 1.1306-3.3317.41726-4.4516-1.04897-1.6378-3.65855-1.3998-4.24597-2.2398-.42339-.6163-.04608-1.2161.53963-1.5678 1.3147-.8399 3.86019-.602 6.33578-2.2538 1.3706-.8959 2.6294-2.7157 3.3427-3.80764 1.007-1.53986 1.4405-1.86183 3.5525-1.86183h7.3969c1.1649 0 1.5298 1.97802-.3712 2.19546-.4895.056-1.7949.25201-3.6551.47591-1.7762.224-5.7203.7583-4.1679 3.2921 1.1609 1.3298 3.6085 1.1619 4.1679 1.9598.4047.5523.0467 1.1398-.3939 1.422-1.3287.8399-4.1656.7478-6.6411 2.3856-1.6784 1.1199-3.0432 3.6117-3.6026 4.4516-.4056.6159-1.0968 1.2039-1.7821 1.2039z\" clip-rule=\"evenodd\"/><path stroke=\"url(#n)\" stroke-width=\".2\" d=\"M19.1363 7.80664h7.3975c.5165.00015.8647.43888.8642.91602-.0004.2358-.0878.47842-.2832.6748-.1956.19642-.5063.35292-.9639.40527-.2461.02816-.6967.09198-1.3154.17579-.6197.08398-1.4106.18888-2.3398.30078h-.001c-.8847.1115-2.3314.3019-3.3623.7881-.5151.2429-.944.5683-1.1377 1.0107-.1965.4495-.1391.9935.2598 1.6446l.0039.0068.0058.0068c.6027.6904 1.5336.9866 2.3584 1.21.4178.1131.8057.2068 1.127.3223.3232.1161.5549.2466.6758.4189l.0009.002c.1808.2467.1905.4956.1075.7177-.0849.2269-.2685.4285-.4747.5606-.3192.2017-.7339.351-1.2226.4853-.4895.1345-1.0406.2513-1.6367.3955-1.1874.2873-2.5304.677-3.7832 1.5059-.8547.5703-1.6243 1.4859-2.2471 2.3564-.6205.8674-1.1094 1.7126-1.3828 2.1231l-.001.001c-.197.299-.4627.5907-.7607.8066-.2989.2166-.623.3516-.9375.3516h-.0137c-.31124 0-.53407-.1321-.66602-.3272-.13357-.1975-.1799-.4687-.11524-.7539v-.001c.0446-.206.13595-.5142.24024-.8867.10355-.3699.21853-.7984.30468-1.2363.08607-.4375.14448-.8885.13575-1.3027-.00875-.413-.08519-.7999-.27735-1.1016-.54613-.8525-1.49407-1.2105-2.35156-1.4609-.43536-.1272-.84117-.2245-1.18164-.3448-.34146-.1206-.58746-.2553-.71485-.4375-.19178-.2797-.19985-.5478-.09863-.7871.10381-.2452.32707-.4687.6084-.6377l.00195-.001c.31549-.2015.70908-.3411 1.16797-.4619.46026-.1211.97354-.2206 1.53321-.3476 1.04421-.2371 2.22539-.565 3.40139-1.294l.2343-.1513c1.3906-.9091 2.6595-2.7466 3.3711-3.83598.5042-.7709.8527-1.21602 1.3262-1.47558.4739-.25964 1.0875-.34179 2.1426-.3418Z\"/><path stroke=\"url(#o)\" stroke-width=\".2\" d=\"M19.1363 7.80664h7.3975c.5165.00015.8647.43888.8642.91602-.0004.2358-.0878.47842-.2832.6748-.1956.19642-.5063.35292-.9639.40527-.2461.02816-.6967.09198-1.3154.17579-.6197.08398-1.4106.18888-2.3398.30078h-.001c-.8847.1115-2.3314.3019-3.3623.7881-.5151.2429-.944.5683-1.1377 1.0107-.1965.4495-.1391.9935.2598 1.6446l.0039.0068.0058.0068c.6027.6904 1.5336.9866 2.3584 1.21.4178.1131.8057.2068 1.127.3223.3232.1161.5549.2466.6758.4189l.0009.002c.1808.2467.1905.4956.1075.7177-.0849.2269-.2685.4285-.4747.5606-.3192.2017-.7339.351-1.2226.4853-.4895.1345-1.0406.2513-1.6367.3955-1.1874.2873-2.5304.677-3.7832 1.5059-.8547.5703-1.6243 1.4859-2.2471 2.3564-.6205.8674-1.1094 1.7126-1.3828 2.1231l-.001.001c-.197.299-.4627.5907-.7607.8066-.2989.2166-.623.3516-.9375.3516h-.0137c-.31124 0-.53407-.1321-.66602-.3272-.13357-.1975-.1799-.4687-.11524-.7539v-.001c.0446-.206.13595-.5142.24024-.8867.10355-.3699.21853-.7984.30468-1.2363.08607-.4375.14448-.8885.13575-1.3027-.00875-.413-.08519-.7999-.27735-1.1016-.54613-.8525-1.49407-1.2105-2.35156-1.4609-.43536-.1272-.84117-.2245-1.18164-.3448-.34146-.1206-.58746-.2553-.71485-.4375-.19178-.2797-.19985-.5478-.09863-.7871.10381-.2452.32707-.4687.6084-.6377l.00195-.001c.31549-.2015.70908-.3411 1.16797-.4619.46026-.1211.97354-.2206 1.53321-.3476 1.04421-.2371 2.22539-.565 3.40139-1.294l.2343-.1513c1.3906-.9091 2.6595-2.7466 3.3711-3.83598.5042-.7709.8527-1.21602 1.3262-1.47558.4739-.25964 1.0875-.34179 2.1426-.3418Z\"/><mask id=\"q\" width=\"32\" height=\"32\" x=\"0\" y=\"0\" maskUnits=\"userSpaceOnUse\" style=\"mask-type:alpha\"><path fill=\"url(#p)\" d=\"M0 0h32v32H0z\"/></mask><g mask=\"url(#q)\"><path fill=\"url(#r)\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M10.0735 25.0934c-.68532 0-1.01866-.588-.8788-1.2039.18182-.8399 1.1306-3.3317.41726-4.4516-1.04897-1.6378-3.65855-1.3998-4.24597-2.2398-.42339-.6163-.04608-1.2161.53963-1.5678 1.3147-.8399 3.86019-.602 6.33578-2.2538 1.3706-.8959 2.6294-2.7157 3.3427-3.80764 1.007-1.53986 1.4405-1.86183 3.5525-1.86183h7.3969c1.1649 0 1.5298 1.97802-.3712 2.19546-.4895.056-1.7949.25201-3.6551.47591-1.7762.224-5.7203.7583-4.1679 3.2921 1.1609 1.3298 3.6085 1.1619 4.1679 1.9598.4047.5523.0467 1.1398-.3939 1.422-1.3287.8399-4.1656.7478-6.6411 2.3856-1.6784 1.1199-3.0432 3.6117-3.6026 4.4516-.4056.6159-1.0968 1.2039-1.7821 1.2039z\" clip-rule=\"evenodd\"/></g><rect width=\"32\" height=\"32\" fill=\"#9772ff\" rx=\"9\" style=\"mix-blend-mode:hue\"/></g><defs><radialGradient id=\"b\" cx=\"0\" cy=\"0\" r=\"1\" gradientTransform=\"matrix(0 23.9175 -30.8218 0 16.1649 0)\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#80f593\"/><stop offset=\"1\" stop-color=\"#49f264\"/></radialGradient><radialGradient id=\"c\" cx=\"0\" cy=\"0\" r=\"1\" gradientTransform=\"matrix(0 -8.2 26.3263 0 16 32)\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#0ec833\"/><stop offset=\"1\" stop-color=\"#49f264\" stop-opacity=\"0\"/></radialGradient><radialGradient id=\"g\" cx=\"0\" cy=\"0\" r=\"1\" gradientTransform=\"rotate(90 8 8)scale(16 216.921)\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#acf6b9\"/><stop offset=\"1\" stop-color=\"#49f264\"/></radialGradient><radialGradient id=\"h\" cx=\"0\" cy=\"0\" r=\"1\" gradientTransform=\"matrix(0 -16 194.49 0 16 32)\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#80f593\"/><stop offset=\"1\" stop-color=\"#49f264\" stop-opacity=\"0\"/></radialGradient><radialGradient id=\"m\" cx=\"0\" cy=\"0\" r=\"1\" gradientTransform=\"matrix(-.05865 17.4934 -29.59743 -.09923 16.4 7.6)\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#fff\" stop-opacity=\".05\"/><stop offset=\".746382\" stop-color=\"#fff\" stop-opacity=\".2\"/></radialGradient><radialGradient id=\"n\" cx=\"0\" cy=\"0\" r=\"1\" gradientTransform=\"matrix(0 3.4 -19.5245 0 16.4 7.6)\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#fff\" stop-opacity=\".4\"/><stop offset=\"1\" stop-color=\"#fff\" stop-opacity=\"0\"/></radialGradient><radialGradient id=\"o\" cx=\"0\" cy=\"0\" r=\"1\" gradientTransform=\"matrix(.4 -12.20004 70.05845 2.29703 16 25.2)\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#fff\" stop-opacity=\".1\"/><stop offset=\"1\" stop-color=\"#fff\" stop-opacity=\"0\"/></radialGradient><linearGradient id=\"f\" x1=\"16\" x2=\"16\" y1=\"0\" y2=\"32\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#fff\" stop-opacity=\".95\"/><stop offset=\".317308\" stop-color=\"#fff\" stop-opacity=\".5\"/><stop offset=\"1\" stop-color=\"#fff\" stop-opacity=\".95\"/></linearGradient><linearGradient id=\"i\" x1=\"16\" x2=\"16\" y1=\"32\" y2=\"31.6\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#acf6b9\"/><stop offset=\"1\" stop-color=\"#49f264\" stop-opacity=\"0\"/></linearGradient><linearGradient id=\"j\" x1=\"16\" x2=\"16\" y1=\".4\" y2=\"0\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#49f264\" stop-opacity=\"0\"/><stop offset=\"1\" stop-color=\"#d4f7da\"/></linearGradient><linearGradient id=\"l\" x1=\"16.4\" x2=\"16.4\" y1=\"7.6\" y2=\"20.2\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#2e2e2e\"/><stop offset=\"1\" stop-color=\"#151515\"/></linearGradient><linearGradient id=\"r\" x1=\"16.4\" x2=\"16.4\" y1=\"2.4\" y2=\"25.2\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#737373\"/><stop offset=\"1\" stop-color=\"#333\"/></linearGradient><pattern id=\"d\" width=\"1\" height=\"1\" patternContentUnits=\"objectBoundingBox\"><use xlink:href=\"#s\" transform=\"scale(.00156)\"/></pattern><pattern id=\"p\" width=\"1\" height=\"1\" patternContentUnits=\"objectBoundingBox\"><use xlink:href=\"#s\" transform=\"scale(.00156)\"/></pattern><clipPath id=\"a\"><path fill=\"#fff\" d=\"M0 0h32v32H0z\"/></clipPath><filter id=\"k\" width=\"29.9125\" height=\"27.7864\" x=\"4.38512\" y=\"7.30703\" color-interpolation-filters=\"sRGB\" filterUnits=\"userSpaceOnUse\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" result=\"hardAlpha\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"/><feOffset dy=\".4\"/><feGaussianBlur stdDeviation=\".4\"/><feColorMatrix values=\"0 0 0 0 0.12549 0 0 0 0 0.352941 0 0 0 0 0.172549 0 0 0 0.48 0\"/><feBlend in2=\"BackgroundImageFix\" result=\"effect1_dropShadow_7301_30525\"/><feColorMatrix in=\"SourceAlpha\" result=\"hardAlpha\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"/><feOffset dx=\".8\" dy=\"1.2\"/><feGaussianBlur stdDeviation=\".8\"/><feColorMatrix values=\"0 0 0 0 0.12549 0 0 0 0 0.352941 0 0 0 0 0.172549 0 0 0 0.42 0\"/><feBlend in2=\"effect1_dropShadow_7301_30525\" result=\"effect2_dropShadow_7301_30525\"/><feColorMatrix in=\"SourceAlpha\" result=\"hardAlpha\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"/><feOffset dx=\"1.6\" dy=\"2.8\"/><feGaussianBlur stdDeviation=\"1\"/><feColorMatrix values=\"0 0 0 0 0.12549 0 0 0 0 0.352941 0 0 0 0 0.172549 0 0 0 0.24 0\"/><feBlend in2=\"effect2_dropShadow_7301_30525\" result=\"effect3_dropShadow_7301_30525\"/><feColorMatrix in=\"SourceAlpha\" result=\"hardAlpha\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"/><feOffset dx=\"2.8\" dy=\"4.8\"/><feGaussianBlur stdDeviation=\"1.2\"/><feColorMatrix values=\"0 0 0 0 0.12549 0 0 0 0 0.352941 0 0 0 0 0.172549 0 0 0 0.07 0\"/><feBlend in2=\"effect3_dropShadow_7301_30525\" result=\"effect4_dropShadow_7301_30525\"/><feColorMatrix in=\"SourceAlpha\" result=\"hardAlpha\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"/><feOffset dx=\"4.4\" dy=\"7.6\"/><feGaussianBlur stdDeviation=\"1.2\"/><feColorMatrix values=\"0 0 0 0 0.12549 0 0 0 0 0.352941 0 0 0 0 0.172549 0 0 0 0.01 0\"/><feBlend in2=\"effect4_dropShadow_7301_30525\" result=\"effect5_dropShadow_7301_30525\"/><feBlend in=\"SourceGraphic\" in2=\"effect5_dropShadow_7301_30525\" result=\"shape\"/></filter></defs></svg>';\n"],"names":[],"mappings":";AAEO,MAAM,oBACX;"}
|
|
@@ -14,7 +14,8 @@ const pillVariants = {
|
|
|
14
14
|
brand: "bg-brand-primary-default text-content-always-black",
|
|
15
15
|
brandLight: "bg-brand-primary-muted text-content-primary",
|
|
16
16
|
beta: "bg-brand-secondary-default text-content-always-black",
|
|
17
|
-
error: "bg-error-content text-error-surface"
|
|
17
|
+
error: "bg-error-content text-error-surface",
|
|
18
|
+
red: "bg-error-surface text-error-content"
|
|
18
19
|
}
|
|
19
20
|
};
|
|
20
21
|
const Pill = React.forwardRef(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pill.mjs","sources":["../../../src/components/Pill/Pill.tsx"],"sourcesContent":["import { Slot, Slottable } from \"@radix-ui/react-slot\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\nconst pillVariants = {\n variant: {\n green: \"bg-success-surface text-success-content\",\n grey: \"bg-neutral-alphas-50 text-content-secondary\",\n blue: \"bg-info-surface text-info-content\",\n gold: \"bg-warning-surface text-warning-content\",\n pinkLight: \"bg-brand-secondary-muted text-content-primary\",\n base: \"bg-surface-primary-inverted text-content-primary-inverted\",\n brand: \"bg-brand-primary-default text-content-always-black\",\n brandLight: \"bg-brand-primary-muted text-content-primary\",\n beta: \"bg-brand-secondary-default text-content-always-black\",\n error: \"bg-error-content text-error-surface\",\n },\n} as const;\n\n/** Colour variant of the pill. */\nexport type PillVariant =\n | \"green\"\n | \"grey\"\n | \"blue\"\n | \"gold\"\n | \"pinkLight\"\n | \"base\"\n | \"brand\"\n | \"brandLight\"\n | \"beta\"\n | \"error\";\n\nexport interface PillProps extends React.HTMLAttributes<HTMLSpanElement> {\n /** Colour variant of the pill. @default \"green\" */\n variant?: PillVariant;\n /** Icon element displayed before the label. */\n leftIcon?: React.ReactNode;\n /** Icon element displayed after the label. */\n rightIcon?: React.ReactNode;\n /** Merge props onto a child element instead of rendering a `<span>`. @default false */\n asChild?: boolean;\n}\n\n/**\n * A small rounded label for categorisation, status, or tagging.\n *\n * @example\n * ```tsx\n * <Pill variant=\"brand\">New</Pill>\n * ```\n */\nexport const Pill = React.forwardRef<HTMLSpanElement, PillProps>(\n (\n {\n className,\n variant = \"green\",\n leftIcon,\n rightIcon,\n asChild = false,\n onClick,\n children,\n ...props\n },\n ref,\n ) => {\n const Comp = asChild ? Slot : \"span\";\n\n return (\n <Comp\n ref={ref}\n data-testid=\"pill\"\n className={cn(\n // Base styles\n \"inline-flex min-w-0 items-center justify-center gap-2 rounded-full px-3 py-1\",\n // Typography\n \"typography-description-12px-semibold\",\n // Variant styles\n pillVariants.variant[variant],\n // Interactive\n onClick && \"cursor-pointer\",\n // Manual CSS overrides\n className,\n )}\n onClick={onClick}\n {...props}\n >\n {leftIcon && (\n <span className=\"flex [&>svg]:size-3\" aria-hidden=\"true\">\n {leftIcon}\n </span>\n )}\n {asChild ? (\n <Slottable>{children}</Slottable>\n ) : (\n <span className=\"min-w-0 truncate\">{children}</span>\n )}\n {rightIcon && (\n <span className=\"flex [&>svg]:size-3\" aria-hidden=\"true\">\n {rightIcon}\n </span>\n )}\n </Comp>\n );\n },\n);\n\nPill.displayName = \"Pill\";\n"],"names":[],"mappings":";;;;;AAIA,MAAM,eAAe;AAAA,EACnB,SAAS;AAAA,IACP,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,WAAW;AAAA,IACX,MAAM;AAAA,IACN,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;
|
|
1
|
+
{"version":3,"file":"Pill.mjs","sources":["../../../src/components/Pill/Pill.tsx"],"sourcesContent":["import { Slot, Slottable } from \"@radix-ui/react-slot\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\nconst pillVariants = {\n variant: {\n green: \"bg-success-surface text-success-content\",\n grey: \"bg-neutral-alphas-50 text-content-secondary\",\n blue: \"bg-info-surface text-info-content\",\n gold: \"bg-warning-surface text-warning-content\",\n pinkLight: \"bg-brand-secondary-muted text-content-primary\",\n base: \"bg-surface-primary-inverted text-content-primary-inverted\",\n brand: \"bg-brand-primary-default text-content-always-black\",\n brandLight: \"bg-brand-primary-muted text-content-primary\",\n beta: \"bg-brand-secondary-default text-content-always-black\",\n error: \"bg-error-content text-error-surface\",\n red: \"bg-error-surface text-error-content\",\n },\n} as const;\n\n/** Colour variant of the pill. */\nexport type PillVariant =\n | \"green\"\n | \"grey\"\n | \"blue\"\n | \"gold\"\n | \"pinkLight\"\n | \"base\"\n | \"brand\"\n | \"brandLight\"\n | \"beta\"\n | \"error\"\n | \"red\";\n\nexport interface PillProps extends React.HTMLAttributes<HTMLSpanElement> {\n /** Colour variant of the pill. @default \"green\" */\n variant?: PillVariant;\n /** Icon element displayed before the label. */\n leftIcon?: React.ReactNode;\n /** Icon element displayed after the label. */\n rightIcon?: React.ReactNode;\n /** Merge props onto a child element instead of rendering a `<span>`. @default false */\n asChild?: boolean;\n}\n\n/**\n * A small rounded label for categorisation, status, or tagging.\n *\n * @example\n * ```tsx\n * <Pill variant=\"brand\">New</Pill>\n * ```\n */\nexport const Pill = React.forwardRef<HTMLSpanElement, PillProps>(\n (\n {\n className,\n variant = \"green\",\n leftIcon,\n rightIcon,\n asChild = false,\n onClick,\n children,\n ...props\n },\n ref,\n ) => {\n const Comp = asChild ? Slot : \"span\";\n\n return (\n <Comp\n ref={ref}\n data-testid=\"pill\"\n className={cn(\n // Base styles\n \"inline-flex min-w-0 items-center justify-center gap-2 rounded-full px-3 py-1\",\n // Typography\n \"typography-description-12px-semibold\",\n // Variant styles\n pillVariants.variant[variant],\n // Interactive\n onClick && \"cursor-pointer\",\n // Manual CSS overrides\n className,\n )}\n onClick={onClick}\n {...props}\n >\n {leftIcon && (\n <span className=\"flex [&>svg]:size-3\" aria-hidden=\"true\">\n {leftIcon}\n </span>\n )}\n {asChild ? (\n <Slottable>{children}</Slottable>\n ) : (\n <span className=\"min-w-0 truncate\">{children}</span>\n )}\n {rightIcon && (\n <span className=\"flex [&>svg]:size-3\" aria-hidden=\"true\">\n {rightIcon}\n </span>\n )}\n </Comp>\n );\n },\n);\n\nPill.displayName = \"Pill\";\n"],"names":[],"mappings":";;;;;AAIA,MAAM,eAAe;AAAA,EACnB,SAAS;AAAA,IACP,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,WAAW;AAAA,IACX,MAAM;AAAA,IACN,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,OAAO;AAAA,IACP,KAAK;AAAA,EAAA;AAET;AAmCO,MAAM,OAAO,MAAM;AAAA,EACxB,CACE;AAAA,IACE;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,OAAO,UAAU,OAAO;AAE9B,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAY;AAAA,QACZ,WAAW;AAAA;AAAA,UAET;AAAA;AAAA,UAEA;AAAA;AAAA,UAEA,aAAa,QAAQ,OAAO;AAAA;AAAA,UAE5B,WAAW;AAAA;AAAA,UAEX;AAAA,QAAA;AAAA,QAEF;AAAA,QACC,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA,gCACE,QAAA,EAAK,WAAU,uBAAsB,eAAY,QAC/C,UAAA,UACH;AAAA,UAED,8BACE,WAAA,EAAW,SAAA,CAAS,IAErB,oBAAC,QAAA,EAAK,WAAU,oBAAoB,SAAA,CAAS;AAAA,UAE9C,aACC,oBAAC,QAAA,EAAK,WAAU,uBAAsB,eAAY,QAC/C,UAAA,UAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,KAAK,cAAc;"}
|
|
@@ -39,14 +39,23 @@ const TableToolbar = React.forwardRef(
|
|
|
39
39
|
);
|
|
40
40
|
TableToolbar.displayName = "TableToolbar";
|
|
41
41
|
const TableScrollArea = React.forwardRef(
|
|
42
|
-
({ className, children, roundTop: _roundTop, ...props }, ref) => {
|
|
42
|
+
({ className, children, roundTop: _roundTop, showScrollbar = false, ...props }, ref) => {
|
|
43
43
|
return /* @__PURE__ */ jsx(
|
|
44
44
|
"div",
|
|
45
45
|
{
|
|
46
46
|
ref,
|
|
47
47
|
className: cn("relative w-full min-w-0 overflow-hidden", className),
|
|
48
48
|
...props,
|
|
49
|
-
children: /* @__PURE__ */ jsx(
|
|
49
|
+
children: /* @__PURE__ */ jsx(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
className: cn(
|
|
53
|
+
"overflow-x-auto",
|
|
54
|
+
showScrollbar && "pb-3 [scrollbar-color:var(--color-border-strong)_transparent] [scrollbar-width:thin]"
|
|
55
|
+
),
|
|
56
|
+
children
|
|
57
|
+
}
|
|
58
|
+
)
|
|
50
59
|
}
|
|
51
60
|
);
|
|
52
61
|
}
|
|
@@ -100,13 +109,15 @@ const HEAD_INTENT_CLASSES = {
|
|
|
100
109
|
};
|
|
101
110
|
const TableHead = React.forwardRef(
|
|
102
111
|
({ className, intent = "default", scope = "col", ...props }, ref) => {
|
|
112
|
+
const size = useTableSize();
|
|
103
113
|
return /* @__PURE__ */ jsx(
|
|
104
114
|
"th",
|
|
105
115
|
{
|
|
106
116
|
ref,
|
|
107
117
|
scope,
|
|
108
118
|
className: cn(
|
|
109
|
-
"
|
|
119
|
+
size === "condensed" ? "typography-body-small-14px-semibold" : "typography-body-default-16px-semibold",
|
|
120
|
+
"box-border h-12 min-h-12 border-b border-border-primary px-4 py-3 align-middle text-content-tertiary",
|
|
110
121
|
HEAD_INTENT_CLASSES[intent],
|
|
111
122
|
className
|
|
112
123
|
),
|
|
@@ -119,6 +130,7 @@ TableHead.displayName = "TableHead";
|
|
|
119
130
|
const CELL_MIN_HEIGHT = {
|
|
120
131
|
md: "h-16 min-h-16",
|
|
121
132
|
default: "h-16 min-h-16",
|
|
133
|
+
condensed: "h-12 min-h-12 py-1",
|
|
122
134
|
lg: "h-20 min-h-20"
|
|
123
135
|
};
|
|
124
136
|
const CELL_VARIANT_CLASSES = {
|
|
@@ -136,7 +148,7 @@ const CELL_INTENT_CLASSES = {
|
|
|
136
148
|
const TableCell = React.forwardRef(
|
|
137
149
|
({ className, cellVariant = "default", intent = "default", ...props }, ref) => {
|
|
138
150
|
const size = useTableSize();
|
|
139
|
-
const typo = intent === "sideLabel" ? "typography-
|
|
151
|
+
const typo = intent === "sideLabel" ? "typography-body-small-14px-semibold" : "typography-body-small-14px-regular";
|
|
140
152
|
return /* @__PURE__ */ jsx(
|
|
141
153
|
"td",
|
|
142
154
|
{
|
|
@@ -170,19 +182,23 @@ function TableCellContent({
|
|
|
170
182
|
}) {
|
|
171
183
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-0.5", className), children: [
|
|
172
184
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
173
|
-
/* @__PURE__ */ jsx("span", { className: "typography-
|
|
185
|
+
/* @__PURE__ */ jsx("span", { className: "typography-body-small-14px-semibold text-content-primary", children: primary }),
|
|
174
186
|
primaryAdornment
|
|
175
187
|
] }),
|
|
176
188
|
(secondary != null || secondaryAdornment != null) && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
177
|
-
secondary != null && /* @__PURE__ */ jsx("span", { className: "typography-
|
|
189
|
+
secondary != null && /* @__PURE__ */ jsx("span", { className: "typography-body-small-14px-regular text-content-secondary", children: secondary }),
|
|
178
190
|
secondaryAdornment
|
|
179
191
|
] })
|
|
180
192
|
] });
|
|
181
193
|
}
|
|
182
194
|
TableCellContent.displayName = "TableCellContent";
|
|
183
195
|
const TableMediaThumbnail = React.forwardRef(
|
|
184
|
-
({ className, src, alt = "", blurred, align = "start", ...props }, ref) => {
|
|
185
|
-
const frame =
|
|
196
|
+
({ className, src, alt = "", blurred, align = "start", size = "48", ...props }, ref) => {
|
|
197
|
+
const frame = cn(
|
|
198
|
+
"overflow-hidden bg-neutral-alphas-200",
|
|
199
|
+
size === "48" && "size-12 rounded-sm",
|
|
200
|
+
size === "32" && "size-8 rounded-xs"
|
|
201
|
+
);
|
|
186
202
|
return /* @__PURE__ */ jsx(
|
|
187
203
|
"div",
|
|
188
204
|
{
|
|
@@ -262,16 +278,7 @@ const TableSortLabel = React.forwardRef(
|
|
|
262
278
|
className: cn("inline-flex items-center gap-1 text-content-primary", className),
|
|
263
279
|
...props,
|
|
264
280
|
children: [
|
|
265
|
-
/* @__PURE__ */ jsx(
|
|
266
|
-
"span",
|
|
267
|
-
{
|
|
268
|
-
className: cn(
|
|
269
|
-
"typography-description-12px-semibold",
|
|
270
|
-
direction != null && "border-b border-content-primary pb-px"
|
|
271
|
-
),
|
|
272
|
-
children
|
|
273
|
-
}
|
|
274
|
-
),
|
|
281
|
+
/* @__PURE__ */ jsx("span", { className: cn(direction != null && "border-b border-content-primary pb-px"), children }),
|
|
275
282
|
direction != null && /* @__PURE__ */ jsx(Icon, { className: "size-4 shrink-0", "aria-hidden": true })
|
|
276
283
|
]
|
|
277
284
|
}
|