@otl-core/next-navigation 1.1.19 → 1.1.20
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/icons/chevron-icon.d.ts +10 -0
- package/dist/components/icons/chevron-icon.js +30 -0
- package/dist/components/icons/chevron-icon.js.map +1 -0
- package/dist/components/icons/grid-icon.d.ts +12 -0
- package/dist/components/icons/grid-icon.js +95 -0
- package/dist/components/icons/grid-icon.js.map +1 -0
- package/dist/components/icons/hamburger-icon.d.ts +12 -0
- package/dist/components/icons/hamburger-icon.js +78 -0
- package/dist/components/icons/hamburger-icon.js.map +1 -0
- package/dist/components/icons/kebab-icon.d.ts +12 -0
- package/dist/components/icons/kebab-icon.js +81 -0
- package/dist/components/icons/kebab-icon.js.map +1 -0
- package/dist/components/icons/meatballs-icon.d.ts +12 -0
- package/dist/components/icons/meatballs-icon.js +81 -0
- package/dist/components/icons/meatballs-icon.js.map +1 -0
- package/dist/components/icons/plus-icon.d.ts +12 -0
- package/dist/components/icons/plus-icon.js +64 -0
- package/dist/components/icons/plus-icon.js.map +1 -0
- package/dist/components/icons/toggle-icon-map.d.ts +14 -0
- package/dist/components/icons/toggle-icon-map.js +22 -0
- package/dist/components/icons/toggle-icon-map.js.map +1 -0
- package/dist/components/icons/toggle-icon.d.ts +14 -0
- package/dist/components/icons/toggle-icon.js +39 -0
- package/dist/components/icons/toggle-icon.js.map +1 -0
- package/dist/components/items/animated-toggle-icon.d.ts +15 -0
- package/dist/components/items/animated-toggle-icon.js +39 -0
- package/dist/components/items/animated-toggle-icon.js.map +1 -0
- package/dist/components/items/dropdown-content-item.d.ts +12 -0
- package/dist/components/items/dropdown-content-item.js +223 -0
- package/dist/components/items/dropdown-content-item.js.map +1 -0
- package/dist/components/items/logo.d.ts +11 -0
- package/dist/components/items/logo.js +42 -0
- package/dist/components/items/logo.js.map +1 -0
- package/dist/components/mobile/mobile-menu-toggle.d.ts +12 -0
- package/dist/components/mobile/mobile-menu-toggle.js +53 -0
- package/dist/components/mobile/mobile-menu-toggle.js.map +1 -0
- package/dist/components/mobile/navigation-header-wrapper.d.ts +11 -0
- package/dist/components/mobile/navigation-header-wrapper.js +15 -0
- package/dist/components/mobile/navigation-header-wrapper.js.map +1 -0
- package/dist/components/navigation/dropdown.d.ts +19 -0
- package/dist/components/navigation/dropdown.js +258 -0
- package/dist/components/navigation/dropdown.js.map +1 -0
- package/dist/components/navigation/header.d.ts +13 -0
- package/dist/components/navigation/header.js +305 -0
- package/dist/components/navigation/header.js.map +1 -0
- package/dist/components/navigation/navbar.d.ts +21 -0
- package/dist/components/navigation/navbar.js +66 -0
- package/dist/components/navigation/navbar.js.map +1 -0
- package/dist/components/sections/navbar-sections.d.ts +23 -0
- package/dist/components/sections/navbar-sections.js +103 -0
- package/dist/components/sections/navbar-sections.js.map +1 -0
- package/dist/components/sections/navigation-item.d.ts +13 -0
- package/dist/components/sections/navigation-item.js +171 -0
- package/dist/components/sections/navigation-item.js.map +1 -0
- package/dist/components/ui/button.d.ts +14 -0
- package/dist/components/ui/button.js +51 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/context/navigation-context.d.ts +17 -0
- package/dist/context/navigation-context.js +93 -0
- package/dist/context/navigation-context.js.map +1 -0
- package/dist/index.d.ts +12 -86
- package/dist/index.js +19 -2077
- package/dist/index.js.map +1 -1
- package/dist/lib/footer.utils.d.ts +20 -0
- package/dist/lib/footer.utils.js +84 -0
- package/dist/lib/footer.utils.js.map +1 -0
- package/dist/lib/navigation.utils.d.ts +34 -0
- package/dist/lib/navigation.utils.js +387 -0
- package/dist/lib/navigation.utils.js.map +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface ChevronIconProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
size?: number;
|
|
7
|
+
}
|
|
8
|
+
declare function ChevronIcon({ isOpen, className, size, }: ChevronIconProps): react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { ChevronIcon };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
function ChevronIcon({
|
|
3
|
+
isOpen,
|
|
4
|
+
className = "",
|
|
5
|
+
size = 24
|
|
6
|
+
}) {
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
"svg",
|
|
9
|
+
{
|
|
10
|
+
width: size,
|
|
11
|
+
height: size,
|
|
12
|
+
viewBox: "0 0 24 24",
|
|
13
|
+
fill: "none",
|
|
14
|
+
stroke: "currentColor",
|
|
15
|
+
strokeWidth: "2",
|
|
16
|
+
strokeLinecap: "round",
|
|
17
|
+
strokeLinejoin: "round",
|
|
18
|
+
className,
|
|
19
|
+
style: {
|
|
20
|
+
transform: isOpen ? "rotate(180deg)" : "rotate(0deg)",
|
|
21
|
+
transition: "transform 200ms ease-in-out"
|
|
22
|
+
},
|
|
23
|
+
children: /* @__PURE__ */ jsx("polyline", { points: "6 9 12 15 18 9" })
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
ChevronIcon
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=chevron-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/icons/chevron-icon.tsx"],"sourcesContent":["interface ChevronIconProps {\n isOpen: boolean;\n className?: string;\n size?: number;\n}\n\nexport function ChevronIcon({\n isOpen,\n className = \"\",\n size = 24,\n}: ChevronIconProps) {\n return (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n style={{\n transform: isOpen ? \"rotate(180deg)\" : \"rotate(0deg)\",\n transition: \"transform 200ms ease-in-out\",\n }}\n >\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n );\n}\n"],"mappings":"AA2BM;AArBC,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA,YAAY;AAAA,EACZ,OAAO;AACT,GAAqB;AACnB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,QAAO;AAAA,MACP,aAAY;AAAA,MACZ,eAAc;AAAA,MACd,gBAAe;AAAA,MACf;AAAA,MACA,OAAO;AAAA,QACL,WAAW,SAAS,mBAAmB;AAAA,QACvC,YAAY;AAAA,MACd;AAAA,MAEA,8BAAC,cAAS,QAAO,kBAAiB;AAAA;AAAA,EACpC;AAEJ;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface GridIconProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
size?: number;
|
|
7
|
+
animationDuration?: number;
|
|
8
|
+
animationTiming?: string;
|
|
9
|
+
}
|
|
10
|
+
declare function GridIcon({ isOpen, className, size, animationDuration, animationTiming, }: GridIconProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { GridIcon };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useRef } from "react";
|
|
4
|
+
function GridIcon({
|
|
5
|
+
isOpen,
|
|
6
|
+
className = "",
|
|
7
|
+
size = 24,
|
|
8
|
+
animationDuration = 300,
|
|
9
|
+
animationTiming = "ease-in-out"
|
|
10
|
+
}) {
|
|
11
|
+
const duration = `${animationDuration}ms`;
|
|
12
|
+
const hasMountedRef = useRef(false);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
hasMountedRef.current = true;
|
|
15
|
+
}, []);
|
|
16
|
+
return /* @__PURE__ */ jsxs(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
className,
|
|
20
|
+
style: {
|
|
21
|
+
width: size,
|
|
22
|
+
height: size,
|
|
23
|
+
position: "relative",
|
|
24
|
+
// @ts-expect-error - CSS custom property
|
|
25
|
+
"--square-size": "40%"
|
|
26
|
+
},
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ jsx(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
style: {
|
|
32
|
+
position: "absolute",
|
|
33
|
+
left: "25%",
|
|
34
|
+
top: "25%",
|
|
35
|
+
width: "40%",
|
|
36
|
+
height: "40%",
|
|
37
|
+
backgroundColor: "currentColor",
|
|
38
|
+
transform: "translate(-50%, -50%)",
|
|
39
|
+
animation: hasMountedRef.current ? `${isOpen ? "grid-tl-open" : "grid-tl-close"} ${duration} ${animationTiming} forwards` : "none"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ jsx(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
style: {
|
|
47
|
+
position: "absolute",
|
|
48
|
+
left: "75%",
|
|
49
|
+
top: "25%",
|
|
50
|
+
width: "40%",
|
|
51
|
+
height: "40%",
|
|
52
|
+
backgroundColor: "currentColor",
|
|
53
|
+
transform: "translate(-50%, -50%)",
|
|
54
|
+
animation: hasMountedRef.current ? `${isOpen ? "grid-tr-hide" : "grid-tr-show"} ${duration} ${animationTiming} forwards` : "none"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
/* @__PURE__ */ jsx(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
style: {
|
|
62
|
+
position: "absolute",
|
|
63
|
+
left: "25%",
|
|
64
|
+
top: "75%",
|
|
65
|
+
width: "40%",
|
|
66
|
+
height: "40%",
|
|
67
|
+
backgroundColor: "currentColor",
|
|
68
|
+
transform: "translate(-50%, -50%)",
|
|
69
|
+
animation: hasMountedRef.current ? `${isOpen ? "grid-bl-hide" : "grid-bl-show"} ${duration} ${animationTiming} forwards` : "none"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
/* @__PURE__ */ jsx(
|
|
74
|
+
"div",
|
|
75
|
+
{
|
|
76
|
+
style: {
|
|
77
|
+
position: "absolute",
|
|
78
|
+
left: "75%",
|
|
79
|
+
top: "75%",
|
|
80
|
+
width: "40%",
|
|
81
|
+
height: "40%",
|
|
82
|
+
backgroundColor: "currentColor",
|
|
83
|
+
transform: "translate(-50%, -50%)",
|
|
84
|
+
animation: hasMountedRef.current ? `${isOpen ? "grid-br-open" : "grid-br-close"} ${duration} ${animationTiming} forwards` : "none"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
export {
|
|
93
|
+
GridIcon
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=grid-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/icons/grid-icon.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef } from \"react\";\n\ninterface GridIconProps {\n isOpen: boolean;\n className?: string;\n size?: number;\n animationDuration?: number;\n animationTiming?: string;\n}\n\nexport function GridIcon({\n isOpen,\n className = \"\",\n size = 24,\n animationDuration = 300,\n animationTiming = \"ease-in-out\",\n}: GridIconProps) {\n const duration = `${animationDuration}ms`;\n const hasMountedRef = useRef(false);\n\n useEffect(() => {\n hasMountedRef.current = true;\n }, []);\n\n return (\n <div\n className={className}\n style={{\n width: size,\n height: size,\n position: \"relative\",\n // @ts-expect-error - CSS custom property\n \"--square-size\": \"40%\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: \"25%\",\n top: \"25%\",\n width: \"40%\",\n height: \"40%\",\n backgroundColor: \"currentColor\",\n transform: \"translate(-50%, -50%)\",\n animation: hasMountedRef.current\n ? `${isOpen ? \"grid-tl-open\" : \"grid-tl-close\"} ${duration} ${animationTiming} forwards`\n : \"none\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n left: \"75%\",\n top: \"25%\",\n width: \"40%\",\n height: \"40%\",\n backgroundColor: \"currentColor\",\n transform: \"translate(-50%, -50%)\",\n animation: hasMountedRef.current\n ? `${isOpen ? \"grid-tr-hide\" : \"grid-tr-show\"} ${duration} ${animationTiming} forwards`\n : \"none\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n left: \"25%\",\n top: \"75%\",\n width: \"40%\",\n height: \"40%\",\n backgroundColor: \"currentColor\",\n transform: \"translate(-50%, -50%)\",\n animation: hasMountedRef.current\n ? `${isOpen ? \"grid-bl-hide\" : \"grid-bl-show\"} ${duration} ${animationTiming} forwards`\n : \"none\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n left: \"75%\",\n top: \"75%\",\n width: \"40%\",\n height: \"40%\",\n backgroundColor: \"currentColor\",\n transform: \"translate(-50%, -50%)\",\n animation: hasMountedRef.current\n ? `${isOpen ? \"grid-br-open\" : \"grid-br-close\"} ${duration} ${animationTiming} forwards`\n : \"none\",\n }}\n />\n </div>\n );\n}\n"],"mappings":";AA2BI,SAUE,KAVF;AAzBJ,SAAS,WAAW,cAAc;AAU3B,SAAS,SAAS;AAAA,EACvB;AAAA,EACA,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,oBAAoB;AAAA,EACpB,kBAAkB;AACpB,GAAkB;AAChB,QAAM,WAAW,GAAG,iBAAiB;AACrC,QAAM,gBAAgB,OAAO,KAAK;AAElC,YAAU,MAAM;AACd,kBAAc,UAAU;AAAA,EAC1B,GAAG,CAAC,CAAC;AAEL,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,OAAO;AAAA,QACL,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,UAAU;AAAA;AAAA,QAEV,iBAAiB;AAAA,MACnB;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,UAAU;AAAA,cACV,MAAM;AAAA,cACN,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,iBAAiB;AAAA,cACjB,WAAW;AAAA,cACX,WAAW,cAAc,UACrB,GAAG,SAAS,iBAAiB,eAAe,IAAI,QAAQ,IAAI,eAAe,cAC3E;AAAA,YACN;AAAA;AAAA,QACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,UAAU;AAAA,cACV,MAAM;AAAA,cACN,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,iBAAiB;AAAA,cACjB,WAAW;AAAA,cACX,WAAW,cAAc,UACrB,GAAG,SAAS,iBAAiB,cAAc,IAAI,QAAQ,IAAI,eAAe,cAC1E;AAAA,YACN;AAAA;AAAA,QACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,UAAU;AAAA,cACV,MAAM;AAAA,cACN,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,iBAAiB;AAAA,cACjB,WAAW;AAAA,cACX,WAAW,cAAc,UACrB,GAAG,SAAS,iBAAiB,cAAc,IAAI,QAAQ,IAAI,eAAe,cAC1E;AAAA,YACN;AAAA;AAAA,QACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,UAAU;AAAA,cACV,MAAM;AAAA,cACN,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,iBAAiB;AAAA,cACjB,WAAW;AAAA,cACX,WAAW,cAAc,UACrB,GAAG,SAAS,iBAAiB,eAAe,IAAI,QAAQ,IAAI,eAAe,cAC3E;AAAA,YACN;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface HamburgerIconProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
size?: number;
|
|
7
|
+
animationDuration?: number;
|
|
8
|
+
animationTiming?: string;
|
|
9
|
+
}
|
|
10
|
+
declare function HamburgerIcon({ isOpen, className, size, animationDuration, animationTiming, }: HamburgerIconProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { HamburgerIcon };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useRef } from "react";
|
|
4
|
+
function HamburgerIcon({
|
|
5
|
+
isOpen,
|
|
6
|
+
className = "",
|
|
7
|
+
size = 24,
|
|
8
|
+
animationDuration = 300,
|
|
9
|
+
animationTiming = "ease-in-out"
|
|
10
|
+
}) {
|
|
11
|
+
const duration = `${animationDuration}ms`;
|
|
12
|
+
const hasMountedRef = useRef(false);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
hasMountedRef.current = true;
|
|
15
|
+
}, []);
|
|
16
|
+
return /* @__PURE__ */ jsxs(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
className,
|
|
20
|
+
style: {
|
|
21
|
+
width: size,
|
|
22
|
+
height: size,
|
|
23
|
+
position: "relative"
|
|
24
|
+
},
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ jsx(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
style: {
|
|
30
|
+
position: "absolute",
|
|
31
|
+
left: 0,
|
|
32
|
+
top: "25%",
|
|
33
|
+
width: size,
|
|
34
|
+
height: "12.5%",
|
|
35
|
+
backgroundColor: "currentColor",
|
|
36
|
+
transform: "translateY(-50%)",
|
|
37
|
+
animation: hasMountedRef.current ? `${isOpen ? "hamburger-top-open" : "hamburger-top-close"} ${duration} ${animationTiming} forwards` : "none"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ jsx(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
style: {
|
|
45
|
+
position: "absolute",
|
|
46
|
+
left: 0,
|
|
47
|
+
top: "50%",
|
|
48
|
+
width: size,
|
|
49
|
+
height: "12.5%",
|
|
50
|
+
backgroundColor: "currentColor",
|
|
51
|
+
transform: "translateY(-50%)",
|
|
52
|
+
animation: hasMountedRef.current ? `${isOpen ? "hamburger-middle-hide" : "hamburger-middle-show"} ${duration} ${animationTiming} forwards` : "none"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
/* @__PURE__ */ jsx(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
style: {
|
|
60
|
+
position: "absolute",
|
|
61
|
+
left: 0,
|
|
62
|
+
top: "75%",
|
|
63
|
+
width: size,
|
|
64
|
+
height: "12.5%",
|
|
65
|
+
backgroundColor: "currentColor",
|
|
66
|
+
transform: "translateY(-50%)",
|
|
67
|
+
animation: hasMountedRef.current ? `${isOpen ? "hamburger-bottom-open" : "hamburger-bottom-close"} ${duration} ${animationTiming} forwards` : "none"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
export {
|
|
76
|
+
HamburgerIcon
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=hamburger-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/icons/hamburger-icon.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef } from \"react\";\n\ninterface HamburgerIconProps {\n isOpen: boolean;\n className?: string;\n size?: number;\n animationDuration?: number;\n animationTiming?: string;\n}\n\nexport function HamburgerIcon({\n isOpen,\n className = \"\",\n size = 24,\n animationDuration = 300,\n animationTiming = \"ease-in-out\",\n}: HamburgerIconProps) {\n const duration = `${animationDuration}ms`;\n const hasMountedRef = useRef(false);\n\n useEffect(() => {\n hasMountedRef.current = true;\n }, []);\n\n return (\n <div\n className={className}\n style={{\n width: size,\n height: size,\n position: \"relative\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: \"25%\",\n width: size,\n height: \"12.5%\",\n backgroundColor: \"currentColor\",\n transform: \"translateY(-50%)\",\n animation: hasMountedRef.current\n ? `${isOpen ? \"hamburger-top-open\" : \"hamburger-top-close\"} ${duration} ${animationTiming} forwards`\n : \"none\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: \"50%\",\n width: size,\n height: \"12.5%\",\n backgroundColor: \"currentColor\",\n transform: \"translateY(-50%)\",\n animation: hasMountedRef.current\n ? `${isOpen ? \"hamburger-middle-hide\" : \"hamburger-middle-show\"} ${duration} ${animationTiming} forwards`\n : \"none\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: \"75%\",\n width: size,\n height: \"12.5%\",\n backgroundColor: \"currentColor\",\n transform: \"translateY(-50%)\",\n animation: hasMountedRef.current\n ? `${isOpen ? \"hamburger-bottom-open\" : \"hamburger-bottom-close\"} ${duration} ${animationTiming} forwards`\n : \"none\",\n }}\n />\n </div>\n );\n}\n"],"mappings":";AA2BI,SAQE,KARF;AAzBJ,SAAS,WAAW,cAAc;AAU3B,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,oBAAoB;AAAA,EACpB,kBAAkB;AACpB,GAAuB;AACrB,QAAM,WAAW,GAAG,iBAAiB;AACrC,QAAM,gBAAgB,OAAO,KAAK;AAElC,YAAU,MAAM;AACd,kBAAc,UAAU;AAAA,EAC1B,GAAG,CAAC,CAAC;AAEL,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,OAAO;AAAA,QACL,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,UAAU;AAAA,cACV,MAAM;AAAA,cACN,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,iBAAiB;AAAA,cACjB,WAAW;AAAA,cACX,WAAW,cAAc,UACrB,GAAG,SAAS,uBAAuB,qBAAqB,IAAI,QAAQ,IAAI,eAAe,cACvF;AAAA,YACN;AAAA;AAAA,QACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,UAAU;AAAA,cACV,MAAM;AAAA,cACN,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,iBAAiB;AAAA,cACjB,WAAW;AAAA,cACX,WAAW,cAAc,UACrB,GAAG,SAAS,0BAA0B,uBAAuB,IAAI,QAAQ,IAAI,eAAe,cAC5F;AAAA,YACN;AAAA;AAAA,QACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,UAAU;AAAA,cACV,MAAM;AAAA,cACN,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,iBAAiB;AAAA,cACjB,WAAW;AAAA,cACX,WAAW,cAAc,UACrB,GAAG,SAAS,0BAA0B,wBAAwB,IAAI,QAAQ,IAAI,eAAe,cAC7F;AAAA,YACN;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface KebabIconProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
size?: number;
|
|
7
|
+
animationDuration?: number;
|
|
8
|
+
animationTiming?: string;
|
|
9
|
+
}
|
|
10
|
+
declare function KebabIcon({ isOpen, className, size, animationDuration, animationTiming, }: KebabIconProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { KebabIcon };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useRef } from "react";
|
|
4
|
+
function KebabIcon({
|
|
5
|
+
isOpen,
|
|
6
|
+
className = "",
|
|
7
|
+
size = 24,
|
|
8
|
+
animationDuration = 300,
|
|
9
|
+
animationTiming = "ease-in-out"
|
|
10
|
+
}) {
|
|
11
|
+
const duration = `${animationDuration}ms`;
|
|
12
|
+
const hasMountedRef = useRef(false);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
hasMountedRef.current = true;
|
|
15
|
+
}, []);
|
|
16
|
+
const dotSize = size * 0.125;
|
|
17
|
+
return /* @__PURE__ */ jsxs(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
className,
|
|
21
|
+
style: {
|
|
22
|
+
width: size,
|
|
23
|
+
height: size,
|
|
24
|
+
position: "relative",
|
|
25
|
+
// @ts-expect-error - CSS custom property
|
|
26
|
+
"--dot-width": "12.5%"
|
|
27
|
+
},
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
style: {
|
|
33
|
+
position: "absolute",
|
|
34
|
+
left: "50%",
|
|
35
|
+
top: "25%",
|
|
36
|
+
width: "12.5%",
|
|
37
|
+
height: dotSize,
|
|
38
|
+
backgroundColor: "currentColor",
|
|
39
|
+
transform: "translate(-50%, -50%)",
|
|
40
|
+
animation: hasMountedRef.current ? `${isOpen ? "kebab-top-open" : "kebab-top-close"} ${duration} ${animationTiming} forwards` : "none"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
style: {
|
|
48
|
+
position: "absolute",
|
|
49
|
+
left: "50%",
|
|
50
|
+
top: "50%",
|
|
51
|
+
width: "12.5%",
|
|
52
|
+
height: dotSize,
|
|
53
|
+
backgroundColor: "currentColor",
|
|
54
|
+
transform: "translate(-50%, -50%)",
|
|
55
|
+
animation: hasMountedRef.current ? `${isOpen ? "kebab-middle-hide" : "kebab-middle-show"} ${duration} ${animationTiming} forwards` : "none"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
/* @__PURE__ */ jsx(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
style: {
|
|
63
|
+
position: "absolute",
|
|
64
|
+
left: "50%",
|
|
65
|
+
top: "75%",
|
|
66
|
+
width: "12.5%",
|
|
67
|
+
height: dotSize,
|
|
68
|
+
backgroundColor: "currentColor",
|
|
69
|
+
transform: "translate(-50%, -50%)",
|
|
70
|
+
animation: hasMountedRef.current ? `${isOpen ? "kebab-bottom-open" : "kebab-bottom-close"} ${duration} ${animationTiming} forwards` : "none"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
export {
|
|
79
|
+
KebabIcon
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=kebab-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/icons/kebab-icon.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef } from \"react\";\n\ninterface KebabIconProps {\n isOpen: boolean;\n className?: string;\n size?: number;\n animationDuration?: number;\n animationTiming?: string;\n}\n\nexport function KebabIcon({\n isOpen,\n className = \"\",\n size = 24,\n animationDuration = 300,\n animationTiming = \"ease-in-out\",\n}: KebabIconProps) {\n const duration = `${animationDuration}ms`;\n const hasMountedRef = useRef(false);\n\n useEffect(() => {\n hasMountedRef.current = true;\n }, []);\n\n const dotSize = size * 0.125;\n\n return (\n <div\n className={className}\n style={{\n width: size,\n height: size,\n position: \"relative\",\n // @ts-expect-error - CSS custom property\n \"--dot-width\": \"12.5%\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"25%\",\n width: \"12.5%\",\n height: dotSize,\n backgroundColor: \"currentColor\",\n transform: \"translate(-50%, -50%)\",\n animation: hasMountedRef.current\n ? `${isOpen ? \"kebab-top-open\" : \"kebab-top-close\"} ${duration} ${animationTiming} forwards`\n : \"none\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: \"12.5%\",\n height: dotSize,\n backgroundColor: \"currentColor\",\n transform: \"translate(-50%, -50%)\",\n animation: hasMountedRef.current\n ? `${isOpen ? \"kebab-middle-hide\" : \"kebab-middle-show\"} ${duration} ${animationTiming} forwards`\n : \"none\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"75%\",\n width: \"12.5%\",\n height: dotSize,\n backgroundColor: \"currentColor\",\n transform: \"translate(-50%, -50%)\",\n animation: hasMountedRef.current\n ? `${isOpen ? \"kebab-bottom-open\" : \"kebab-bottom-close\"} ${duration} ${animationTiming} forwards`\n : \"none\",\n }}\n />\n </div>\n );\n}\n"],"mappings":";AA6BI,SAUE,KAVF;AA3BJ,SAAS,WAAW,cAAc;AAU3B,SAAS,UAAU;AAAA,EACxB;AAAA,EACA,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,oBAAoB;AAAA,EACpB,kBAAkB;AACpB,GAAmB;AACjB,QAAM,WAAW,GAAG,iBAAiB;AACrC,QAAM,gBAAgB,OAAO,KAAK;AAElC,YAAU,MAAM;AACd,kBAAc,UAAU;AAAA,EAC1B,GAAG,CAAC,CAAC;AAEL,QAAM,UAAU,OAAO;AAEvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,OAAO;AAAA,QACL,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,UAAU;AAAA;AAAA,QAEV,eAAe;AAAA,MACjB;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,UAAU;AAAA,cACV,MAAM;AAAA,cACN,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,iBAAiB;AAAA,cACjB,WAAW;AAAA,cACX,WAAW,cAAc,UACrB,GAAG,SAAS,mBAAmB,iBAAiB,IAAI,QAAQ,IAAI,eAAe,cAC/E;AAAA,YACN;AAAA;AAAA,QACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,UAAU;AAAA,cACV,MAAM;AAAA,cACN,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,iBAAiB;AAAA,cACjB,WAAW;AAAA,cACX,WAAW,cAAc,UACrB,GAAG,SAAS,sBAAsB,mBAAmB,IAAI,QAAQ,IAAI,eAAe,cACpF;AAAA,YACN;AAAA;AAAA,QACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,UAAU;AAAA,cACV,MAAM;AAAA,cACN,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,iBAAiB;AAAA,cACjB,WAAW;AAAA,cACX,WAAW,cAAc,UACrB,GAAG,SAAS,sBAAsB,oBAAoB,IAAI,QAAQ,IAAI,eAAe,cACrF;AAAA,YACN;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface MeatballsIconProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
size?: number;
|
|
7
|
+
animationDuration?: number;
|
|
8
|
+
animationTiming?: string;
|
|
9
|
+
}
|
|
10
|
+
declare function MeatballsIcon({ isOpen, className, size, animationDuration, animationTiming, }: MeatballsIconProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { MeatballsIcon };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useRef } from "react";
|
|
4
|
+
function MeatballsIcon({
|
|
5
|
+
isOpen,
|
|
6
|
+
className = "",
|
|
7
|
+
size = 24,
|
|
8
|
+
animationDuration = 300,
|
|
9
|
+
animationTiming = "ease-in-out"
|
|
10
|
+
}) {
|
|
11
|
+
const duration = `${animationDuration}ms`;
|
|
12
|
+
const hasMountedRef = useRef(false);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
hasMountedRef.current = true;
|
|
15
|
+
}, []);
|
|
16
|
+
const dotSize = size * 0.125;
|
|
17
|
+
return /* @__PURE__ */ jsxs(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
className,
|
|
21
|
+
style: {
|
|
22
|
+
width: size,
|
|
23
|
+
height: size,
|
|
24
|
+
position: "relative",
|
|
25
|
+
// @ts-expect-error - CSS custom property
|
|
26
|
+
"--dot-height": "12.5%"
|
|
27
|
+
},
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
style: {
|
|
33
|
+
position: "absolute",
|
|
34
|
+
left: "25%",
|
|
35
|
+
top: "50%",
|
|
36
|
+
width: dotSize,
|
|
37
|
+
height: "12.5%",
|
|
38
|
+
backgroundColor: "currentColor",
|
|
39
|
+
transform: "translate(-50%, -50%)",
|
|
40
|
+
animation: hasMountedRef.current ? `${isOpen ? "meatballs-left-open" : "meatballs-left-close"} ${duration} ${animationTiming} forwards` : "none"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
style: {
|
|
48
|
+
position: "absolute",
|
|
49
|
+
left: "50%",
|
|
50
|
+
top: "50%",
|
|
51
|
+
width: dotSize,
|
|
52
|
+
height: "12.5%",
|
|
53
|
+
backgroundColor: "currentColor",
|
|
54
|
+
transform: "translate(-50%, -50%)",
|
|
55
|
+
animation: hasMountedRef.current ? `${isOpen ? "meatballs-middle-hide" : "meatballs-middle-show"} ${duration} ${animationTiming} forwards` : "none"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
/* @__PURE__ */ jsx(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
style: {
|
|
63
|
+
position: "absolute",
|
|
64
|
+
left: "75%",
|
|
65
|
+
top: "50%",
|
|
66
|
+
width: dotSize,
|
|
67
|
+
height: "12.5%",
|
|
68
|
+
backgroundColor: "currentColor",
|
|
69
|
+
transform: "translate(-50%, -50%)",
|
|
70
|
+
animation: hasMountedRef.current ? `${isOpen ? "meatballs-right-open" : "meatballs-right-close"} ${duration} ${animationTiming} forwards` : "none"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
export {
|
|
79
|
+
MeatballsIcon
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=meatballs-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/icons/meatballs-icon.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef } from \"react\";\n\ninterface MeatballsIconProps {\n isOpen: boolean;\n className?: string;\n size?: number;\n animationDuration?: number;\n animationTiming?: string;\n}\n\nexport function MeatballsIcon({\n isOpen,\n className = \"\",\n size = 24,\n animationDuration = 300,\n animationTiming = \"ease-in-out\",\n}: MeatballsIconProps) {\n const duration = `${animationDuration}ms`;\n const hasMountedRef = useRef(false);\n\n useEffect(() => {\n hasMountedRef.current = true;\n }, []);\n\n const dotSize = size * 0.125;\n\n return (\n <div\n className={className}\n style={{\n width: size,\n height: size,\n position: \"relative\",\n // @ts-expect-error - CSS custom property\n \"--dot-height\": \"12.5%\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: \"25%\",\n top: \"50%\",\n width: dotSize,\n height: \"12.5%\",\n backgroundColor: \"currentColor\",\n transform: \"translate(-50%, -50%)\",\n animation: hasMountedRef.current\n ? `${isOpen ? \"meatballs-left-open\" : \"meatballs-left-close\"} ${duration} ${animationTiming} forwards`\n : \"none\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: dotSize,\n height: \"12.5%\",\n backgroundColor: \"currentColor\",\n transform: \"translate(-50%, -50%)\",\n animation: hasMountedRef.current\n ? `${isOpen ? \"meatballs-middle-hide\" : \"meatballs-middle-show\"} ${duration} ${animationTiming} forwards`\n : \"none\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n left: \"75%\",\n top: \"50%\",\n width: dotSize,\n height: \"12.5%\",\n backgroundColor: \"currentColor\",\n transform: \"translate(-50%, -50%)\",\n animation: hasMountedRef.current\n ? `${isOpen ? \"meatballs-right-open\" : \"meatballs-right-close\"} ${duration} ${animationTiming} forwards`\n : \"none\",\n }}\n />\n </div>\n );\n}\n"],"mappings":";AA6BI,SAUE,KAVF;AA3BJ,SAAS,WAAW,cAAc;AAU3B,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,oBAAoB;AAAA,EACpB,kBAAkB;AACpB,GAAuB;AACrB,QAAM,WAAW,GAAG,iBAAiB;AACrC,QAAM,gBAAgB,OAAO,KAAK;AAElC,YAAU,MAAM;AACd,kBAAc,UAAU;AAAA,EAC1B,GAAG,CAAC,CAAC;AAEL,QAAM,UAAU,OAAO;AAEvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,OAAO;AAAA,QACL,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,UAAU;AAAA;AAAA,QAEV,gBAAgB;AAAA,MAClB;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,UAAU;AAAA,cACV,MAAM;AAAA,cACN,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,iBAAiB;AAAA,cACjB,WAAW;AAAA,cACX,WAAW,cAAc,UACrB,GAAG,SAAS,wBAAwB,sBAAsB,IAAI,QAAQ,IAAI,eAAe,cACzF;AAAA,YACN;AAAA;AAAA,QACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,UAAU;AAAA,cACV,MAAM;AAAA,cACN,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,iBAAiB;AAAA,cACjB,WAAW;AAAA,cACX,WAAW,cAAc,UACrB,GAAG,SAAS,0BAA0B,uBAAuB,IAAI,QAAQ,IAAI,eAAe,cAC5F;AAAA,YACN;AAAA;AAAA,QACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,UAAU;AAAA,cACV,MAAM;AAAA,cACN,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,iBAAiB;AAAA,cACjB,WAAW;AAAA,cACX,WAAW,cAAc,UACrB,GAAG,SAAS,yBAAyB,uBAAuB,IAAI,QAAQ,IAAI,eAAe,cAC3F;AAAA,YACN;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface PlusIconProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
size?: number;
|
|
7
|
+
animationDuration?: number;
|
|
8
|
+
animationTiming?: string;
|
|
9
|
+
}
|
|
10
|
+
declare function PlusIcon({ isOpen, className, size, animationDuration, animationTiming, }: PlusIconProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { PlusIcon };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useRef } from "react";
|
|
4
|
+
function PlusIcon({
|
|
5
|
+
isOpen,
|
|
6
|
+
className = "",
|
|
7
|
+
size = 24,
|
|
8
|
+
animationDuration = 300,
|
|
9
|
+
animationTiming = "ease-in-out"
|
|
10
|
+
}) {
|
|
11
|
+
const duration = `${animationDuration}ms`;
|
|
12
|
+
const hasMountedRef = useRef(false);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
hasMountedRef.current = true;
|
|
15
|
+
}, []);
|
|
16
|
+
const lineThickness = size * 0.125;
|
|
17
|
+
const lineLength = size;
|
|
18
|
+
return /* @__PURE__ */ jsxs(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
className,
|
|
22
|
+
style: {
|
|
23
|
+
width: size,
|
|
24
|
+
height: size,
|
|
25
|
+
position: "relative"
|
|
26
|
+
},
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ jsx(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
style: {
|
|
32
|
+
position: "absolute",
|
|
33
|
+
left: "50%",
|
|
34
|
+
top: "50%",
|
|
35
|
+
width: lineThickness,
|
|
36
|
+
height: lineLength,
|
|
37
|
+
backgroundColor: "currentColor",
|
|
38
|
+
transform: isOpen ? "translate(-50%, -50%) rotate(90deg)" : "translate(-50%, -50%) rotate(0deg)",
|
|
39
|
+
transition: hasMountedRef.current ? `transform ${duration} ${animationTiming}` : "none"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ jsx(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
style: {
|
|
47
|
+
position: "absolute",
|
|
48
|
+
left: "50%",
|
|
49
|
+
top: "50%",
|
|
50
|
+
width: lineLength,
|
|
51
|
+
height: lineThickness,
|
|
52
|
+
backgroundColor: "currentColor",
|
|
53
|
+
transform: "translate(-50%, -50%)"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
PlusIcon
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=plus-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/icons/plus-icon.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef } from \"react\";\n\ninterface PlusIconProps {\n isOpen: boolean;\n className?: string;\n size?: number;\n animationDuration?: number;\n animationTiming?: string;\n}\n\nexport function PlusIcon({\n isOpen,\n className = \"\",\n size = 24,\n animationDuration = 300,\n animationTiming = \"ease-in-out\",\n}: PlusIconProps) {\n const duration = `${animationDuration}ms`;\n const hasMountedRef = useRef(false);\n\n useEffect(() => {\n hasMountedRef.current = true;\n }, []);\n\n const lineThickness = size * 0.125;\n const lineLength = size;\n\n return (\n <div\n className={className}\n style={{\n width: size,\n height: size,\n position: \"relative\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: lineThickness,\n height: lineLength,\n backgroundColor: \"currentColor\",\n transform: isOpen\n ? \"translate(-50%, -50%) rotate(90deg)\"\n : \"translate(-50%, -50%) rotate(0deg)\",\n transition: hasMountedRef.current\n ? `transform ${duration} ${animationTiming}`\n : \"none\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: lineLength,\n height: lineThickness,\n backgroundColor: \"currentColor\",\n transform: \"translate(-50%, -50%)\",\n }}\n />\n </div>\n );\n}\n"],"mappings":";AA8BI,SAQE,KARF;AA5BJ,SAAS,WAAW,cAAc;AAU3B,SAAS,SAAS;AAAA,EACvB;AAAA,EACA,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,oBAAoB;AAAA,EACpB,kBAAkB;AACpB,GAAkB;AAChB,QAAM,WAAW,GAAG,iBAAiB;AACrC,QAAM,gBAAgB,OAAO,KAAK;AAElC,YAAU,MAAM;AACd,kBAAc,UAAU;AAAA,EAC1B,GAAG,CAAC,CAAC;AAEL,QAAM,gBAAgB,OAAO;AAC7B,QAAM,aAAa;AAEnB,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,OAAO;AAAA,QACL,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,UAAU;AAAA,cACV,MAAM;AAAA,cACN,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,iBAAiB;AAAA,cACjB,WAAW,SACP,wCACA;AAAA,cACJ,YAAY,cAAc,UACtB,aAAa,QAAQ,IAAI,eAAe,KACxC;AAAA,YACN;AAAA;AAAA,QACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,UAAU;AAAA,cACV,MAAM;AAAA,cACN,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,iBAAiB;AAAA,cACjB,WAAW;AAAA,YACb;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import { ToggleIconType } from '@otl-core/cms-types';
|
|
3
|
+
|
|
4
|
+
interface ToggleIconProps {
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
size?: number;
|
|
8
|
+
animationDuration?: number;
|
|
9
|
+
animationTiming?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const toggleIconMap: Map<ToggleIconType, React$1.ComponentType<ToggleIconProps>>;
|
|
12
|
+
declare function getToggleIcon(type: ToggleIconType): React.ComponentType<ToggleIconProps> | undefined;
|
|
13
|
+
|
|
14
|
+
export { getToggleIcon, toggleIconMap };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ChevronIcon } from "./chevron-icon";
|
|
2
|
+
import { GridIcon } from "./grid-icon";
|
|
3
|
+
import { HamburgerIcon } from "./hamburger-icon";
|
|
4
|
+
import { KebabIcon } from "./kebab-icon";
|
|
5
|
+
import { MeatballsIcon } from "./meatballs-icon";
|
|
6
|
+
import { PlusIcon } from "./plus-icon";
|
|
7
|
+
const toggleIconMap = /* @__PURE__ */ new Map([
|
|
8
|
+
["hamburger", HamburgerIcon],
|
|
9
|
+
["kebab", KebabIcon],
|
|
10
|
+
["meatballs", MeatballsIcon],
|
|
11
|
+
["grid", GridIcon],
|
|
12
|
+
["chevron", ChevronIcon],
|
|
13
|
+
["plus", PlusIcon]
|
|
14
|
+
]);
|
|
15
|
+
function getToggleIcon(type) {
|
|
16
|
+
return toggleIconMap.get(type);
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
getToggleIcon,
|
|
20
|
+
toggleIconMap
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=toggle-icon-map.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/icons/toggle-icon-map.tsx"],"sourcesContent":["import type { ToggleIconType } from \"@otl-core/cms-types\";\nimport { ChevronIcon } from \"./chevron-icon\";\nimport { GridIcon } from \"./grid-icon\";\nimport { HamburgerIcon } from \"./hamburger-icon\";\nimport { KebabIcon } from \"./kebab-icon\";\nimport { MeatballsIcon } from \"./meatballs-icon\";\nimport { PlusIcon } from \"./plus-icon\";\n\ninterface ToggleIconProps {\n isOpen: boolean;\n className?: string;\n size?: number;\n animationDuration?: number;\n animationTiming?: string;\n}\n\nexport const toggleIconMap = new Map<\n ToggleIconType,\n React.ComponentType<ToggleIconProps>\n>([\n [\"hamburger\", HamburgerIcon],\n [\"kebab\", KebabIcon],\n [\"meatballs\", MeatballsIcon],\n [\"grid\", GridIcon],\n [\"chevron\", ChevronIcon],\n [\"plus\", PlusIcon],\n]);\n\nexport function getToggleIcon(\n type: ToggleIconType,\n): React.ComponentType<ToggleIconProps> | undefined {\n return toggleIconMap.get(type);\n}\n"],"mappings":"AACA,SAAS,mBAAmB;AAC5B,SAAS,gBAAgB;AACzB,SAAS,qBAAqB;AAC9B,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB;AAUlB,MAAM,gBAAgB,oBAAI,IAG/B;AAAA,EACA,CAAC,aAAa,aAAa;AAAA,EAC3B,CAAC,SAAS,SAAS;AAAA,EACnB,CAAC,aAAa,aAAa;AAAA,EAC3B,CAAC,QAAQ,QAAQ;AAAA,EACjB,CAAC,WAAW,WAAW;AAAA,EACvB,CAAC,QAAQ,QAAQ;AACnB,CAAC;AAEM,SAAS,cACd,MACkD;AAClD,SAAO,cAAc,IAAI,IAAI;AAC/B;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ToggleIconType } from '@otl-core/cms-types';
|
|
3
|
+
|
|
4
|
+
interface ToggleIconProps {
|
|
5
|
+
type: ToggleIconType;
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
size?: number;
|
|
9
|
+
animationDuration?: number;
|
|
10
|
+
animationTiming?: string;
|
|
11
|
+
}
|
|
12
|
+
declare function ToggleIcon({ type, isOpen, className, size, animationDuration, animationTiming, }: ToggleIconProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
export { ToggleIcon };
|