@abumble/design-system 0.0.45 → 0.0.46
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BeeLogo.d.ts","sourceRoot":"","sources":["../../../src/components/BeeLogo/BeeLogo.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC;IAC9D,kGAAkG;IAClG,OAAO,CAAC,EAAE,OAAO,CAAA;CACjB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,OAAO,CAAC,EACvB,OAAe,EACf,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"BeeLogo.d.ts","sourceRoot":"","sources":["../../../src/components/BeeLogo/BeeLogo.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC;IAC9D,kGAAkG;IAClG,OAAO,CAAC,EAAE,OAAO,CAAA;CACjB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,OAAO,CAAC,EACvB,OAAe,EACf,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,YAAY,2CAyCd"}
|
|
@@ -1,44 +1,47 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c
|
|
3
|
-
import * as
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
asChild:
|
|
7
|
-
className:
|
|
8
|
-
children:
|
|
9
|
-
...
|
|
1
|
+
import { jsxs as s, Fragment as p, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "../shared/utils.js";
|
|
3
|
+
import * as i from "react";
|
|
4
|
+
const h = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20style='background-color:transparent'%20viewBox='0%200%2095%2095'%3e%3cdefs%3e%3cradialGradient%20id='b'%20cx='64.8'%20cy='43.2'%20r='11.3'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23fff'/%3e%3cstop%20offset='1'%20stop-opacity='0'/%3e%3c/radialGradient%3e%3cradialGradient%20id='d'%20cx='64.8'%20cy='43.2'%20r='11.3'%20gradientTransform='matrix(.81137%20-.09169%20-.01114%20.86802%2012.704%2011.643)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23fff'/%3e%3cstop%20offset='1'%20stop-color='%23fff'%20stop-opacity='0'/%3e%3c/radialGradient%3e%3clinearGradient%20id='a'%20x1='45.1'%20x2='84.952'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23fff'/%3e%3cstop%20offset='1'%20stop-color='%23a2ffff'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20fill='none'%20d='M4.177%204.177h86.646v86.646H4.177z'/%3e%3cpath%20stroke='%23000'%20stroke-width='2.19816'%20d='M28.134%2034.891c0%207.015%205.686%2012.7%2012.7%2012.7s12.7-5.685%2012.7-12.7-5.685-12.7-12.7-12.7-12.7%205.686-12.7%2012.7z'/%3e%3cpath%20fill='%23ff0'%20stroke='%23000'%20stroke-width='1.8'%20d='M39.599%2058.252c2.651%2012.903%2014.854%2024.58%2027.255%2026.078s20.305-7.744%2017.653-20.648-14.854-24.579-27.255-26.078-20.305%207.745-17.653%2020.648z'/%3e%3cpath%20fill='url(%23a)'%20stroke='%23000'%20stroke-width='1.8'%20d='M46%2045.8c18.6%201.6%2046.132%2011.217%2035.8%2026s-31-8.4-35.8-26z'%20transform='matrix(-1%200%200%201%2094.032%20-1.307)'/%3e%3cpath%20d='M70.188%2042.818a36.7%2036.7%200%200%201%206.062%205.313c-1.638.126-3.55.298-5.718.594-5.408.738-11.766%202.26-14.781%204.312l-.125.094c-2.96%202.085-6.866%207.662-9.72%2012.688-.64%201.13-1.209%202.192-1.75%203.219-1.428-2.194-2.608-4.524-3.468-6.938%202.045-6.09%204.547-12.949%209.031-16%204.525-3.079%2012.42-3.326%2019.062-3.281.815.006.652-.004%201.406%200zm10.281%2010.906a33%2033%200%200%201%202.813%205.72c-1.18.114-2.444.254-3.782.437-5.662.773-12.312%202.352-15.469%204.5l-.156.093c-3.099%202.183-7.17%208.02-10.156%2013.281-.173.305-.302.575-.469.875a37%2037%200%200%201-5.093-4.5c2.155-6.434%204.808-13.766%209.562-17%204.738-3.223%2012.982-3.453%2019.938-3.406%201.626.011%201.433-.005%202.813%200zm4.281%2011.344c.254%201.69.321%203.311.219%204.844-4.396.613-9.496%201.839-11.938%203.5l-.094.094c-2.425%201.708-5.63%206.258-7.969%2010.375-.024.043-.038.082-.062.125a27%2027%200%200%201-4.781-1.469c.162-.465.304-.885.468-1.375%201.693-5.057%203.757-10.859%207.5-13.406%203.708-2.523%2010.182-2.724%2015.625-2.687z'/%3e%3cpath%20fill='url(%23a)'%20stroke='%23000'%20stroke-width='1.8'%20d='M45.302%2046.719c11.846%209.186%2026.222%2027.672%2012.811%2033.138S40.868%2060.681%2045.302%2046.719z'%20transform='matrix(-1%200%200%201%2094.032%20-1.307)'/%3e%3cpath%20fill='url(%23b)'%20d='M75.2%2043.2c0%205.744-4.656%2010.4-10.4%2010.4s-10.4-4.656-10.4-10.4%204.656-10.4%2010.4-10.4%2010.4%204.656%2010.4%2010.4'%20transform='matrix(-.80583%200%20-.55717%20.8634%20114.605%20-4.804)'/%3e%3cpath%20stroke='%23000'%20d='M29.332%2030.093c-9.875-.2-11.102-1.052-13.15%201.675s-3.15%207.287-.6%207.3%202.405-4.507%203.143-6.362%205.507-2.3%2010.607-2.613zM39.894%2023.452c0-9.877-.828-11.12%201.94-13.113s7.35-3.001%207.311-.452-4.555%202.313-6.424%203.014-2.411%205.46-2.827%2010.552z'/%3e%3cg%20fill='url(%23a)'%20stroke='%23000'%20stroke-width='1.8'%20transform='rotate(-90%2046.148%2027.801)'%3e%3cpath%20d='M29.702%2030.083c18.6%201.6%2046.132%2011.217%2035.8%2026s-31-8.4-35.8-26z'/%3e%3cpath%20d='M29.005%2031.002c11.846%209.186%2026.222%2027.672%2012.811%2033.138S24.571%2044.964%2029.005%2031.002z'/%3e%3c/g%3e%3cpath%20d='m80.12%2080.244%205.328%209.46-8.155-7.394z'/%3e%3cpath%20fill='url(%23d)'%20d='M75.2%2043.2c0%205.744-4.656%2010.4-10.4%2010.4s-10.4-4.656-10.4-10.4%204.656-10.4%2010.4-10.4%2010.4%204.656%2010.4%2010.4'%20transform='matrix(0%20.96103%201.0698%20.66449%2016.057%20-31.013)'/%3e%3c/svg%3e";
|
|
5
|
+
function x({
|
|
6
|
+
asChild: l = !1,
|
|
7
|
+
className: n,
|
|
8
|
+
children: t,
|
|
9
|
+
...f
|
|
10
10
|
}) {
|
|
11
|
-
const
|
|
11
|
+
const r = c("flex items-center outline-none group", n), a = /* @__PURE__ */ m(
|
|
12
12
|
"img",
|
|
13
13
|
{
|
|
14
|
-
src:
|
|
14
|
+
src: h,
|
|
15
15
|
alt: "",
|
|
16
16
|
"aria-hidden": "true",
|
|
17
17
|
className: "h-8 w-8 transition-transform duration-300 group-hover:rotate-12 group-hover:scale-110"
|
|
18
18
|
}
|
|
19
19
|
);
|
|
20
|
-
if (
|
|
20
|
+
if (l) {
|
|
21
21
|
let e;
|
|
22
22
|
try {
|
|
23
|
-
e =
|
|
23
|
+
e = i.Children.only(t);
|
|
24
24
|
} catch {
|
|
25
25
|
throw new Error(
|
|
26
26
|
"BeeLogo with asChild requires exactly one child element."
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
|
-
const
|
|
29
|
+
const o = e.props, d = {
|
|
30
30
|
"aria-label": "Home",
|
|
31
|
-
className: o
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
className: c(r, o.className),
|
|
32
|
+
children: /* @__PURE__ */ s(p, { children: [
|
|
33
|
+
a,
|
|
34
|
+
o.children
|
|
35
|
+
] })
|
|
36
36
|
};
|
|
37
|
-
return
|
|
37
|
+
return i.cloneElement(e, d);
|
|
38
38
|
}
|
|
39
|
-
return /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ s("a", { "aria-label": "Home", className: r, ...f, children: [
|
|
40
|
+
a,
|
|
41
|
+
t
|
|
42
|
+
] });
|
|
40
43
|
}
|
|
41
44
|
export {
|
|
42
|
-
|
|
45
|
+
x as BeeLogo
|
|
43
46
|
};
|
|
44
47
|
//# sourceMappingURL=BeeLogo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BeeLogo.js","sources":["../../src/assets/bee.svg","../../src/components/BeeLogo/BeeLogo.tsx"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20style='background-color:transparent'%20viewBox='0%200%2095%2095'%3e%3cdefs%3e%3cradialGradient%20id='b'%20cx='64.8'%20cy='43.2'%20r='11.3'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23fff'/%3e%3cstop%20offset='1'%20stop-opacity='0'/%3e%3c/radialGradient%3e%3cradialGradient%20id='d'%20cx='64.8'%20cy='43.2'%20r='11.3'%20gradientTransform='matrix(.81137%20-.09169%20-.01114%20.86802%2012.704%2011.643)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23fff'/%3e%3cstop%20offset='1'%20stop-color='%23fff'%20stop-opacity='0'/%3e%3c/radialGradient%3e%3clinearGradient%20id='a'%20x1='45.1'%20x2='84.952'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23fff'/%3e%3cstop%20offset='1'%20stop-color='%23a2ffff'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20fill='none'%20d='M4.177%204.177h86.646v86.646H4.177z'/%3e%3cpath%20stroke='%23000'%20stroke-width='2.19816'%20d='M28.134%2034.891c0%207.015%205.686%2012.7%2012.7%2012.7s12.7-5.685%2012.7-12.7-5.685-12.7-12.7-12.7-12.7%205.686-12.7%2012.7z'/%3e%3cpath%20fill='%23ff0'%20stroke='%23000'%20stroke-width='1.8'%20d='M39.599%2058.252c2.651%2012.903%2014.854%2024.58%2027.255%2026.078s20.305-7.744%2017.653-20.648-14.854-24.579-27.255-26.078-20.305%207.745-17.653%2020.648z'/%3e%3cpath%20fill='url(%23a)'%20stroke='%23000'%20stroke-width='1.8'%20d='M46%2045.8c18.6%201.6%2046.132%2011.217%2035.8%2026s-31-8.4-35.8-26z'%20transform='matrix(-1%200%200%201%2094.032%20-1.307)'/%3e%3cpath%20d='M70.188%2042.818a36.7%2036.7%200%200%201%206.062%205.313c-1.638.126-3.55.298-5.718.594-5.408.738-11.766%202.26-14.781%204.312l-.125.094c-2.96%202.085-6.866%207.662-9.72%2012.688-.64%201.13-1.209%202.192-1.75%203.219-1.428-2.194-2.608-4.524-3.468-6.938%202.045-6.09%204.547-12.949%209.031-16%204.525-3.079%2012.42-3.326%2019.062-3.281.815.006.652-.004%201.406%200zm10.281%2010.906a33%2033%200%200%201%202.813%205.72c-1.18.114-2.444.254-3.782.437-5.662.773-12.312%202.352-15.469%204.5l-.156.093c-3.099%202.183-7.17%208.02-10.156%2013.281-.173.305-.302.575-.469.875a37%2037%200%200%201-5.093-4.5c2.155-6.434%204.808-13.766%209.562-17%204.738-3.223%2012.982-3.453%2019.938-3.406%201.626.011%201.433-.005%202.813%200zm4.281%2011.344c.254%201.69.321%203.311.219%204.844-4.396.613-9.496%201.839-11.938%203.5l-.094.094c-2.425%201.708-5.63%206.258-7.969%2010.375-.024.043-.038.082-.062.125a27%2027%200%200%201-4.781-1.469c.162-.465.304-.885.468-1.375%201.693-5.057%203.757-10.859%207.5-13.406%203.708-2.523%2010.182-2.724%2015.625-2.687z'/%3e%3cpath%20fill='url(%23a)'%20stroke='%23000'%20stroke-width='1.8'%20d='M45.302%2046.719c11.846%209.186%2026.222%2027.672%2012.811%2033.138S40.868%2060.681%2045.302%2046.719z'%20transform='matrix(-1%200%200%201%2094.032%20-1.307)'/%3e%3cpath%20fill='url(%23b)'%20d='M75.2%2043.2c0%205.744-4.656%2010.4-10.4%2010.4s-10.4-4.656-10.4-10.4%204.656-10.4%2010.4-10.4%2010.4%204.656%2010.4%2010.4'%20transform='matrix(-.80583%200%20-.55717%20.8634%20114.605%20-4.804)'/%3e%3cpath%20stroke='%23000'%20d='M29.332%2030.093c-9.875-.2-11.102-1.052-13.15%201.675s-3.15%207.287-.6%207.3%202.405-4.507%203.143-6.362%205.507-2.3%2010.607-2.613zM39.894%2023.452c0-9.877-.828-11.12%201.94-13.113s7.35-3.001%207.311-.452-4.555%202.313-6.424%203.014-2.411%205.46-2.827%2010.552z'/%3e%3cg%20fill='url(%23a)'%20stroke='%23000'%20stroke-width='1.8'%20transform='rotate(-90%2046.148%2027.801)'%3e%3cpath%20d='M29.702%2030.083c18.6%201.6%2046.132%2011.217%2035.8%2026s-31-8.4-35.8-26z'/%3e%3cpath%20d='M29.005%2031.002c11.846%209.186%2026.222%2027.672%2012.811%2033.138S24.571%2044.964%2029.005%2031.002z'/%3e%3c/g%3e%3cpath%20d='m80.12%2080.244%205.328%209.46-8.155-7.394z'/%3e%3cpath%20fill='url(%23d)'%20d='M75.2%2043.2c0%205.744-4.656%2010.4-10.4%2010.4s-10.4-4.656-10.4-10.4%204.656-10.4%2010.4-10.4%2010.4%204.656%2010.4%2010.4'%20transform='matrix(0%20.96103%201.0698%20.66449%2016.057%20-31.013)'/%3e%3c/svg%3e\"","import bee from '@/assets/bee.svg'\nimport { cn } from '@/utils'\nimport * as React from 'react'\n\nexport interface BeeLogoProps extends React.ComponentProps<'a'> {\n\t/** If true, renders the provided child element as the anchor. Use with router Link components. */\n\tasChild?: boolean\n}\n\n/**\n * Bee logo link. Router-agnostic via asChild pattern.\n *\n * @example\n * // With TanStack Router:\n * <BeeLogo asChild>\n * <Link to=\"/\" />\n * </BeeLogo>\n *\n * @example\n * // Plain link:\n * <BeeLogo href=\"/\" />\n */\nexport function BeeLogo({\n\tasChild = false,\n\tclassName,\n\tchildren,\n\t...props\n}: BeeLogoProps) {\n\tconst linkClassName = cn('flex items-center outline-none group', className)\n\n\tconst logoContent = (\n\t\t<img\n\t\t\tsrc={bee}\n\t\t\talt=\"\"\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName=\"h-8 w-8 transition-transform duration-300 group-hover:rotate-12 group-hover:scale-110\"\n\t\t/>\n\t)\n\n\tif (asChild) {\n\t\tlet child: React.ReactElement\n\t\ttry {\n\t\t\tchild = React.Children.only(children) as React.ReactElement\n\t\t} catch {\n\t\t\tthrow new Error(\n\t\t\t\t'BeeLogo with asChild requires exactly one child element.',\n\t\t\t)\n\t\t}\n\t\tconst mergedProps: object = {\n\t\t\t'aria-label': 'Home',\n\t\t\tclassName: cn(\n\t\t\t\
|
|
1
|
+
{"version":3,"file":"BeeLogo.js","sources":["../../src/assets/bee.svg","../../src/components/BeeLogo/BeeLogo.tsx"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20style='background-color:transparent'%20viewBox='0%200%2095%2095'%3e%3cdefs%3e%3cradialGradient%20id='b'%20cx='64.8'%20cy='43.2'%20r='11.3'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23fff'/%3e%3cstop%20offset='1'%20stop-opacity='0'/%3e%3c/radialGradient%3e%3cradialGradient%20id='d'%20cx='64.8'%20cy='43.2'%20r='11.3'%20gradientTransform='matrix(.81137%20-.09169%20-.01114%20.86802%2012.704%2011.643)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23fff'/%3e%3cstop%20offset='1'%20stop-color='%23fff'%20stop-opacity='0'/%3e%3c/radialGradient%3e%3clinearGradient%20id='a'%20x1='45.1'%20x2='84.952'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23fff'/%3e%3cstop%20offset='1'%20stop-color='%23a2ffff'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20fill='none'%20d='M4.177%204.177h86.646v86.646H4.177z'/%3e%3cpath%20stroke='%23000'%20stroke-width='2.19816'%20d='M28.134%2034.891c0%207.015%205.686%2012.7%2012.7%2012.7s12.7-5.685%2012.7-12.7-5.685-12.7-12.7-12.7-12.7%205.686-12.7%2012.7z'/%3e%3cpath%20fill='%23ff0'%20stroke='%23000'%20stroke-width='1.8'%20d='M39.599%2058.252c2.651%2012.903%2014.854%2024.58%2027.255%2026.078s20.305-7.744%2017.653-20.648-14.854-24.579-27.255-26.078-20.305%207.745-17.653%2020.648z'/%3e%3cpath%20fill='url(%23a)'%20stroke='%23000'%20stroke-width='1.8'%20d='M46%2045.8c18.6%201.6%2046.132%2011.217%2035.8%2026s-31-8.4-35.8-26z'%20transform='matrix(-1%200%200%201%2094.032%20-1.307)'/%3e%3cpath%20d='M70.188%2042.818a36.7%2036.7%200%200%201%206.062%205.313c-1.638.126-3.55.298-5.718.594-5.408.738-11.766%202.26-14.781%204.312l-.125.094c-2.96%202.085-6.866%207.662-9.72%2012.688-.64%201.13-1.209%202.192-1.75%203.219-1.428-2.194-2.608-4.524-3.468-6.938%202.045-6.09%204.547-12.949%209.031-16%204.525-3.079%2012.42-3.326%2019.062-3.281.815.006.652-.004%201.406%200zm10.281%2010.906a33%2033%200%200%201%202.813%205.72c-1.18.114-2.444.254-3.782.437-5.662.773-12.312%202.352-15.469%204.5l-.156.093c-3.099%202.183-7.17%208.02-10.156%2013.281-.173.305-.302.575-.469.875a37%2037%200%200%201-5.093-4.5c2.155-6.434%204.808-13.766%209.562-17%204.738-3.223%2012.982-3.453%2019.938-3.406%201.626.011%201.433-.005%202.813%200zm4.281%2011.344c.254%201.69.321%203.311.219%204.844-4.396.613-9.496%201.839-11.938%203.5l-.094.094c-2.425%201.708-5.63%206.258-7.969%2010.375-.024.043-.038.082-.062.125a27%2027%200%200%201-4.781-1.469c.162-.465.304-.885.468-1.375%201.693-5.057%203.757-10.859%207.5-13.406%203.708-2.523%2010.182-2.724%2015.625-2.687z'/%3e%3cpath%20fill='url(%23a)'%20stroke='%23000'%20stroke-width='1.8'%20d='M45.302%2046.719c11.846%209.186%2026.222%2027.672%2012.811%2033.138S40.868%2060.681%2045.302%2046.719z'%20transform='matrix(-1%200%200%201%2094.032%20-1.307)'/%3e%3cpath%20fill='url(%23b)'%20d='M75.2%2043.2c0%205.744-4.656%2010.4-10.4%2010.4s-10.4-4.656-10.4-10.4%204.656-10.4%2010.4-10.4%2010.4%204.656%2010.4%2010.4'%20transform='matrix(-.80583%200%20-.55717%20.8634%20114.605%20-4.804)'/%3e%3cpath%20stroke='%23000'%20d='M29.332%2030.093c-9.875-.2-11.102-1.052-13.15%201.675s-3.15%207.287-.6%207.3%202.405-4.507%203.143-6.362%205.507-2.3%2010.607-2.613zM39.894%2023.452c0-9.877-.828-11.12%201.94-13.113s7.35-3.001%207.311-.452-4.555%202.313-6.424%203.014-2.411%205.46-2.827%2010.552z'/%3e%3cg%20fill='url(%23a)'%20stroke='%23000'%20stroke-width='1.8'%20transform='rotate(-90%2046.148%2027.801)'%3e%3cpath%20d='M29.702%2030.083c18.6%201.6%2046.132%2011.217%2035.8%2026s-31-8.4-35.8-26z'/%3e%3cpath%20d='M29.005%2031.002c11.846%209.186%2026.222%2027.672%2012.811%2033.138S24.571%2044.964%2029.005%2031.002z'/%3e%3c/g%3e%3cpath%20d='m80.12%2080.244%205.328%209.46-8.155-7.394z'/%3e%3cpath%20fill='url(%23d)'%20d='M75.2%2043.2c0%205.744-4.656%2010.4-10.4%2010.4s-10.4-4.656-10.4-10.4%204.656-10.4%2010.4-10.4%2010.4%204.656%2010.4%2010.4'%20transform='matrix(0%20.96103%201.0698%20.66449%2016.057%20-31.013)'/%3e%3c/svg%3e\"","import bee from '@/assets/bee.svg'\nimport { cn } from '@/utils'\nimport * as React from 'react'\n\nexport interface BeeLogoProps extends React.ComponentProps<'a'> {\n\t/** If true, renders the provided child element as the anchor. Use with router Link components. */\n\tasChild?: boolean\n}\n\n/**\n * Bee logo link. Router-agnostic via asChild pattern.\n *\n * @example\n * // With TanStack Router:\n * <BeeLogo asChild>\n * <Link to=\"/\" />\n * </BeeLogo>\n *\n * @example\n * // Plain link:\n * <BeeLogo href=\"/\" />\n */\nexport function BeeLogo({\n\tasChild = false,\n\tclassName,\n\tchildren,\n\t...props\n}: BeeLogoProps) {\n\tconst linkClassName = cn('flex items-center outline-none group', className)\n\n\tconst logoContent = (\n\t\t<img\n\t\t\tsrc={bee}\n\t\t\talt=\"\"\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName=\"h-8 w-8 transition-transform duration-300 group-hover:rotate-12 group-hover:scale-110\"\n\t\t/>\n\t)\n\n\tif (asChild) {\n\t\tlet child: React.ReactElement\n\t\ttry {\n\t\t\tchild = React.Children.only(children) as React.ReactElement\n\t\t} catch {\n\t\t\tthrow new Error(\n\t\t\t\t'BeeLogo with asChild requires exactly one child element.',\n\t\t\t)\n\t\t}\n\t\tconst childProps = child.props as React.HTMLAttributes<HTMLElement>\n\t\tconst mergedProps: object = {\n\t\t\t'aria-label': 'Home',\n\t\t\tclassName: cn(linkClassName, childProps.className),\n\t\t\tchildren: (\n\t\t\t\t<>\n\t\t\t\t\t{logoContent}\n\t\t\t\t\t{childProps.children}\n\t\t\t\t</>\n\t\t\t),\n\t\t}\n\t\treturn React.cloneElement(child, mergedProps)\n\t}\n\n\treturn (\n\t\t<a aria-label=\"Home\" className={linkClassName} {...props}>\n\t\t\t{logoContent}\n\t\t\t{children}\n\t\t</a>\n\t)\n}\n"],"names":["bee","BeeLogo","asChild","className","children","props","linkClassName","cn","logoContent","jsx","child","React","childProps","mergedProps","jsxs","Fragment"],"mappings":";;;AAAA,MAAAA,IAAe;ACsBR,SAASC,EAAQ;AAAA,EACvB,SAAAC,IAAU;AAAA,EACV,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACJ,GAAiB;AAChB,QAAMC,IAAgBC,EAAG,wCAAwCJ,CAAS,GAEpEK,IACL,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,KAAKT;AAAA,MACL,KAAI;AAAA,MACJ,eAAY;AAAA,MACZ,WAAU;AAAA,IAAA;AAAA,EAAA;AAIZ,MAAIE,GAAS;AACZ,QAAIQ;AACJ,QAAI;AACH,MAAAA,IAAQC,EAAM,SAAS,KAAKP,CAAQ;AAAA,IACrC,QAAQ;AACP,YAAM,IAAI;AAAA,QACT;AAAA,MAAA;AAAA,IAEF;AACA,UAAMQ,IAAaF,EAAM,OACnBG,IAAsB;AAAA,MAC3B,cAAc;AAAA,MACd,WAAWN,EAAGD,GAAeM,EAAW,SAAS;AAAA,MACjD,UACC,gBAAAE,EAAAC,GAAA,EACE,UAAA;AAAA,QAAAP;AAAA,QACAI,EAAW;AAAA,MAAA,EAAA,CACb;AAAA,IAAA;AAGF,WAAOD,EAAM,aAAaD,GAAOG,CAAW;AAAA,EAC7C;AAEA,2BACE,KAAA,EAAE,cAAW,QAAO,WAAWP,GAAgB,GAAGD,GACjD,UAAA;AAAA,IAAAG;AAAA,IACAJ;AAAA,EAAA,GACF;AAEF;"}
|