@n3wth/ui 0.8.0 → 0.9.1
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/atoms/AnimatedText/AnimatedText.js +65 -0
- package/dist/atoms/AnimatedText/AnimatedText.js.map +1 -0
- package/dist/atoms/Avatar/Avatar.js +55 -0
- package/dist/atoms/Avatar/Avatar.js.map +1 -0
- package/dist/atoms/Badge/Badge.js +57 -0
- package/dist/atoms/Badge/Badge.js.map +1 -0
- package/dist/atoms/Button/Button.js +92 -0
- package/dist/atoms/Button/Button.js.map +1 -0
- package/dist/atoms/Character/Character.js +155 -0
- package/dist/atoms/Character/Character.js.map +1 -0
- package/dist/atoms/CodeBlock/CodeBlock.js +75 -0
- package/dist/atoms/CodeBlock/CodeBlock.js.map +1 -0
- package/dist/atoms/HamburgerIcon/HamburgerIcon.js +50 -0
- package/dist/atoms/HamburgerIcon/HamburgerIcon.js.map +1 -0
- package/dist/atoms/Icon/Icon.js +199 -0
- package/dist/atoms/Icon/Icon.js.map +1 -0
- package/dist/atoms/Input/Input.js +80 -0
- package/dist/atoms/Input/Input.js.map +1 -0
- package/dist/atoms/Label/Label.js +32 -0
- package/dist/atoms/Label/Label.js.map +1 -0
- package/dist/atoms/NoiseOverlay/NoiseOverlay.js +32 -0
- package/dist/atoms/NoiseOverlay/NoiseOverlay.js.map +1 -0
- package/dist/atoms/Progress/Progress.js +63 -0
- package/dist/atoms/Progress/Progress.js.map +1 -0
- package/dist/atoms/ScrollIndicator/ScrollIndicator.js +51 -0
- package/dist/atoms/ScrollIndicator/ScrollIndicator.js.map +1 -0
- package/dist/atoms/Separator/Separator.js +28 -0
- package/dist/atoms/Separator/Separator.js.map +1 -0
- package/dist/atoms/Shape/Shape.js +110 -0
- package/dist/atoms/Shape/Shape.js.map +1 -0
- package/dist/atoms/Shape/patterns.js +66 -0
- package/dist/atoms/Shape/patterns.js.map +1 -0
- package/dist/atoms/Skeleton/Skeleton.js +77 -0
- package/dist/atoms/Skeleton/Skeleton.js.map +1 -0
- package/dist/atoms/SpeechBubble/SpeechBubble.js +98 -0
- package/dist/atoms/SpeechBubble/SpeechBubble.js.map +1 -0
- package/dist/atoms/Switch/Switch.js +78 -0
- package/dist/atoms/Switch/Switch.js.map +1 -0
- package/dist/atoms/Textarea/Textarea.js +40 -0
- package/dist/atoms/Textarea/Textarea.js.map +1 -0
- package/dist/atoms/Tooltip/Tooltip.js +153 -0
- package/dist/atoms/Tooltip/Tooltip.js.map +1 -0
- package/dist/hooks/useButtonPulse.js +43 -0
- package/dist/hooks/useButtonPulse.js.map +1 -0
- package/dist/hooks/useCountUp.js +52 -0
- package/dist/hooks/useCountUp.js.map +1 -0
- package/dist/hooks/useKeyboardShortcuts.js +37 -0
- package/dist/hooks/useKeyboardShortcuts.js.map +1 -0
- package/dist/hooks/useMediaQuery.js +59 -0
- package/dist/hooks/useMediaQuery.js.map +1 -0
- package/dist/hooks/usePageTransition.js +39 -0
- package/dist/hooks/usePageTransition.js.map +1 -0
- package/dist/hooks/useReducedMotion.js +57 -0
- package/dist/hooks/useReducedMotion.js.map +1 -0
- package/dist/hooks/useScrollReveal.js +61 -0
- package/dist/hooks/useScrollReveal.js.map +1 -0
- package/dist/hooks/useStaggerList.js +54 -0
- package/dist/hooks/useStaggerList.js.map +1 -0
- package/dist/hooks/useTextReveal.js +59 -0
- package/dist/hooks/useTextReveal.js.map +1 -0
- package/dist/hooks/useTheme.js +37 -0
- package/dist/hooks/useTheme.js.map +1 -0
- package/dist/hooks/useToast.js +84 -0
- package/dist/hooks/useToast.js.map +1 -0
- package/dist/index.js +147 -7925
- package/dist/index.js.map +1 -1
- package/dist/molecules/Accordion/Accordion.js +178 -0
- package/dist/molecules/Accordion/Accordion.js.map +1 -0
- package/dist/molecules/Card/Card.js +104 -0
- package/dist/molecules/Card/Card.js.map +1 -0
- package/dist/molecules/CommandBox/CommandBox.js +65 -0
- package/dist/molecules/CommandBox/CommandBox.js.map +1 -0
- package/dist/molecules/CompositeShape/CompositeShape.js +69 -0
- package/dist/molecules/CompositeShape/CompositeShape.js.map +1 -0
- package/dist/molecules/CompositeShape/presets.js +71 -0
- package/dist/molecules/CompositeShape/presets.js.map +1 -0
- package/dist/molecules/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/molecules/Dropdown/Dropdown.js +530 -0
- package/dist/molecules/Dropdown/Dropdown.js.map +1 -0
- package/dist/molecules/ErrorBoundary/ErrorBoundary.js +128 -0
- package/dist/molecules/ErrorBoundary/ErrorBoundary.js.map +1 -0
- package/dist/molecules/MobileDrawer/MobileDrawer.js +78 -0
- package/dist/molecules/MobileDrawer/MobileDrawer.js.map +1 -0
- package/dist/molecules/Modal/Modal.js +262 -0
- package/dist/molecules/Modal/Modal.js.map +1 -0
- package/dist/molecules/NavLink/NavLink.js +38 -0
- package/dist/molecules/NavLink/NavLink.js.map +1 -0
- package/dist/molecules/Tabs/Tabs.js +188 -0
- package/dist/molecules/Tabs/Tabs.js.map +1 -0
- package/dist/molecules/ThemeToggle/ThemeToggle.js +48 -0
- package/dist/molecules/ThemeToggle/ThemeToggle.js.map +1 -0
- package/dist/molecules/Toast/Toast.js +156 -0
- package/dist/molecules/Toast/Toast.js.map +1 -0
- package/dist/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/IconoirContext.js +6 -0
- package/dist/node_modules/iconoir-react/dist/esm/IconoirContext.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/ArrowDown.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/ArrowDown.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/ArrowLeft.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/ArrowLeft.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/ArrowRight.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/ArrowRight.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/ArrowUp.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/ArrowUp.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/ArrowUpRight.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/ArrowUpRight.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Bell.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Bell.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Calendar.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Calendar.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Check.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Check.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/CheckCircle.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/CheckCircle.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Clock.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Clock.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Code.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Code.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Copy.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Copy.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Download.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Download.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/EditPencil.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/EditPencil.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Eye.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Eye.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/EyeClosed.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/EyeClosed.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Filter.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Filter.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Folder.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Folder.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Github.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Github.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/HalfMoon.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/HalfMoon.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Heart.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Heart.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Home.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Home.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/InfoCircle.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/InfoCircle.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Link.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Link.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/List.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/List.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Lock.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Lock.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/LockSlash.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/LockSlash.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Mail.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Mail.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Menu.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Menu.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Minus.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Minus.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/MoreHoriz.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/MoreHoriz.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/MoreVert.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/MoreVert.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/NavArrowDown.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/NavArrowDown.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/NavArrowLeft.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/NavArrowLeft.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/NavArrowRight.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/NavArrowRight.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/NavArrowUp.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/NavArrowUp.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/OpenInWindow.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/OpenInWindow.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Page.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Page.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Plus.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Plus.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/RefreshDouble.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/RefreshDouble.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Search.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Search.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Settings.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Settings.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/SortDown.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/SortDown.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Sparks.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Sparks.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Star.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Star.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/SunLight.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/SunLight.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Terminal.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Terminal.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Trash.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Trash.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Upload.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Upload.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/User.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/User.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/ViewGrid.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/ViewGrid.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/WarningTriangle.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/WarningTriangle.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Xmark.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/Xmark.js.map +1 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/XmarkCircle.js +17 -0
- package/dist/node_modules/iconoir-react/dist/esm/regular/XmarkCircle.js.map +1 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2996 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
- package/dist/organisms/Footer/Footer.js +108 -0
- package/dist/organisms/Footer/Footer.js.map +1 -0
- package/dist/organisms/Hero/Hero.d.ts.map +1 -1
- package/dist/organisms/Hero/Hero.js +101 -0
- package/dist/organisms/Hero/Hero.js.map +1 -0
- package/dist/organisms/Nav/Nav.js +177 -0
- package/dist/organisms/Nav/Nav.js.map +1 -0
- package/dist/organisms/Section/Section.js +57 -0
- package/dist/organisms/Section/Section.js.map +1 -0
- package/dist/styles.css +6 -0
- package/dist/theme.css +2 -0
- package/dist/tokens/colors.js +105 -0
- package/dist/tokens/colors.js.map +1 -0
- package/dist/tokens/effects.js +26 -0
- package/dist/tokens/effects.js.map +1 -0
- package/dist/tokens/motion.js +25 -0
- package/dist/tokens/motion.js.map +1 -0
- package/dist/tokens/spacing.js +31 -0
- package/dist/tokens/spacing.js.map +1 -0
- package/dist/tokens/typography.js +63 -0
- package/dist/tokens/typography.js.map +1 -0
- package/dist/utils/cn.js +9 -0
- package/dist/utils/cn.js.map +1 -0
- package/package.json +6 -3
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { jsx as d, jsxs as B } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as b, useState as H, useRef as $, useId as K, useCallback as w, createContext as E, useContext as M } from "react";
|
|
3
|
+
import { cn as v } from "../../utils/cn.js";
|
|
4
|
+
import { useReducedMotion as j } from "../../hooks/useReducedMotion.js";
|
|
5
|
+
const O = E(null), D = E(null);
|
|
6
|
+
function N() {
|
|
7
|
+
const t = M(O);
|
|
8
|
+
if (!t)
|
|
9
|
+
throw new Error("Accordion compound components must be used within an <Accordion> parent");
|
|
10
|
+
return t;
|
|
11
|
+
}
|
|
12
|
+
function P() {
|
|
13
|
+
const t = M(D);
|
|
14
|
+
if (!t)
|
|
15
|
+
throw new Error("AccordionTrigger/AccordionContent must be used within an <AccordionItem> parent");
|
|
16
|
+
return t;
|
|
17
|
+
}
|
|
18
|
+
const S = b(
|
|
19
|
+
({
|
|
20
|
+
type: t = "single",
|
|
21
|
+
value: o,
|
|
22
|
+
defaultValue: a = [],
|
|
23
|
+
onChange: l,
|
|
24
|
+
collapsible: r = !1,
|
|
25
|
+
children: u,
|
|
26
|
+
className: s,
|
|
27
|
+
...g
|
|
28
|
+
}, f) => {
|
|
29
|
+
const [n, h] = H(a), m = $(/* @__PURE__ */ new Map()), y = K(), c = o !== void 0 ? o : n, I = w(
|
|
30
|
+
(i) => {
|
|
31
|
+
let e;
|
|
32
|
+
t === "single" ? c.includes(i) ? e = r ? [] : c : e = [i] : c.includes(i) ? e = c.filter((A) => A !== i) : e = [...c, i], o === void 0 && h(e), l?.(e);
|
|
33
|
+
},
|
|
34
|
+
[t, c, r, o, l]
|
|
35
|
+
), k = w((i, e) => {
|
|
36
|
+
e ? m.current.set(i, e) : m.current.delete(i);
|
|
37
|
+
}, []), C = w(() => m.current, []);
|
|
38
|
+
return /* @__PURE__ */ d(
|
|
39
|
+
O.Provider,
|
|
40
|
+
{
|
|
41
|
+
value: { openValues: c, toggle: I, type: t, collapsible: r, baseId: y, registerTrigger: k, getTriggerElements: C },
|
|
42
|
+
children: /* @__PURE__ */ d(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
ref: f,
|
|
46
|
+
className: v("flex flex-col divide-y divide-[var(--glass-border)]", s),
|
|
47
|
+
...g,
|
|
48
|
+
children: u
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
S.displayName = "Accordion";
|
|
56
|
+
const U = b(
|
|
57
|
+
({ value: t, disabled: o = !1, children: a, className: l, ...r }, u) => {
|
|
58
|
+
const { openValues: s } = N(), g = s.includes(t);
|
|
59
|
+
return /* @__PURE__ */ d(D.Provider, { value: { value: t, disabled: o, isOpen: g }, children: /* @__PURE__ */ d("div", { ref: u, className: l, ...r, children: a }) });
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
U.displayName = "AccordionItem";
|
|
63
|
+
const V = b(
|
|
64
|
+
({ children: t, className: o, onKeyDown: a, ...l }, r) => {
|
|
65
|
+
const { toggle: u, baseId: s, registerTrigger: g, getTriggerElements: f } = N(), { value: n, disabled: h, isOpen: m } = P(), y = $(null), c = j(), I = `${s}-trigger-${n}`, k = `${s}-content-${n}`, C = w(
|
|
66
|
+
(e) => {
|
|
67
|
+
y.current = e, g(n, e), typeof r == "function" ? r(e) : r && (r.current = e);
|
|
68
|
+
},
|
|
69
|
+
[r, g, n]
|
|
70
|
+
), i = w(
|
|
71
|
+
(e) => {
|
|
72
|
+
if (a?.(e), e.defaultPrevented) return;
|
|
73
|
+
const A = f(), p = Array.from(A.keys()), R = p.indexOf(n);
|
|
74
|
+
let x;
|
|
75
|
+
switch (e.key) {
|
|
76
|
+
case "ArrowDown":
|
|
77
|
+
x = (R + 1) % p.length;
|
|
78
|
+
break;
|
|
79
|
+
case "ArrowUp":
|
|
80
|
+
x = (R - 1 + p.length) % p.length;
|
|
81
|
+
break;
|
|
82
|
+
case "Home":
|
|
83
|
+
x = 0;
|
|
84
|
+
break;
|
|
85
|
+
case "End":
|
|
86
|
+
x = p.length - 1;
|
|
87
|
+
break;
|
|
88
|
+
default:
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
e.preventDefault();
|
|
92
|
+
const L = p[x], T = A.get(L);
|
|
93
|
+
T && T.focus();
|
|
94
|
+
},
|
|
95
|
+
[a, f, n]
|
|
96
|
+
);
|
|
97
|
+
return /* @__PURE__ */ B(
|
|
98
|
+
"button",
|
|
99
|
+
{
|
|
100
|
+
ref: C,
|
|
101
|
+
type: "button",
|
|
102
|
+
id: I,
|
|
103
|
+
"aria-expanded": m,
|
|
104
|
+
"aria-controls": k,
|
|
105
|
+
"aria-disabled": h || void 0,
|
|
106
|
+
onClick: () => {
|
|
107
|
+
h || u(n);
|
|
108
|
+
},
|
|
109
|
+
onKeyDown: i,
|
|
110
|
+
className: v(
|
|
111
|
+
"flex w-full items-center justify-between",
|
|
112
|
+
"py-3 text-sm font-medium text-[var(--color-white)]",
|
|
113
|
+
"hover:text-[var(--color-grey-300)]",
|
|
114
|
+
"cursor-pointer",
|
|
115
|
+
h && "opacity-50 cursor-not-allowed hover:text-[var(--color-white)]",
|
|
116
|
+
o
|
|
117
|
+
),
|
|
118
|
+
...l,
|
|
119
|
+
children: [
|
|
120
|
+
t,
|
|
121
|
+
/* @__PURE__ */ d(
|
|
122
|
+
"svg",
|
|
123
|
+
{
|
|
124
|
+
width: "16",
|
|
125
|
+
height: "16",
|
|
126
|
+
viewBox: "0 0 16 16",
|
|
127
|
+
fill: "none",
|
|
128
|
+
stroke: "currentColor",
|
|
129
|
+
strokeWidth: "2",
|
|
130
|
+
strokeLinecap: "round",
|
|
131
|
+
strokeLinejoin: "round",
|
|
132
|
+
"aria-hidden": "true",
|
|
133
|
+
className: v(
|
|
134
|
+
"shrink-0",
|
|
135
|
+
c ? "transition-none" : "transition-transform duration-200",
|
|
136
|
+
m && "rotate-180"
|
|
137
|
+
),
|
|
138
|
+
children: /* @__PURE__ */ d("path", { d: "M4 6l4 4 4-4" })
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
V.displayName = "AccordionTrigger";
|
|
147
|
+
const W = b(
|
|
148
|
+
({ children: t, className: o, ...a }, l) => {
|
|
149
|
+
const { baseId: r } = N(), { value: u, isOpen: s } = P(), g = j(), f = `${r}-trigger-${u}`, n = `${r}-content-${u}`;
|
|
150
|
+
return /* @__PURE__ */ d(
|
|
151
|
+
"div",
|
|
152
|
+
{
|
|
153
|
+
ref: l,
|
|
154
|
+
id: n,
|
|
155
|
+
role: "region",
|
|
156
|
+
"aria-labelledby": f,
|
|
157
|
+
className: v(
|
|
158
|
+
"grid",
|
|
159
|
+
g ? "transition-none" : "transition-[grid-template-rows] duration-200 ease-out",
|
|
160
|
+
s ? "grid-template-rows-open" : "grid-template-rows-closed"
|
|
161
|
+
),
|
|
162
|
+
style: {
|
|
163
|
+
gridTemplateRows: s ? "1fr" : "0fr"
|
|
164
|
+
},
|
|
165
|
+
...a,
|
|
166
|
+
children: /* @__PURE__ */ d("div", { className: "overflow-hidden", children: /* @__PURE__ */ d("div", { className: v("pb-3 text-sm text-[var(--color-grey-400)]", o), children: t }) })
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
W.displayName = "AccordionContent";
|
|
172
|
+
export {
|
|
173
|
+
S as Accordion,
|
|
174
|
+
W as AccordionContent,
|
|
175
|
+
U as AccordionItem,
|
|
176
|
+
V as AccordionTrigger
|
|
177
|
+
};
|
|
178
|
+
//# sourceMappingURL=Accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.js","sources":["../../../src/molecules/Accordion/Accordion.tsx"],"sourcesContent":["import {\n forwardRef,\n createContext,\n useContext,\n useState,\n useCallback,\n useRef,\n useId,\n type HTMLAttributes,\n type ButtonHTMLAttributes,\n type ReactNode,\n type KeyboardEvent,\n} from 'react'\nimport { cn } from '../../utils/cn'\nimport { useReducedMotion } from '../../hooks/useReducedMotion'\n\n// --- Contexts ---\n\ninterface AccordionContextValue {\n openValues: string[]\n toggle: (value: string) => void\n type: 'single' | 'multiple'\n collapsible: boolean\n baseId: string\n registerTrigger: (value: string, element: HTMLButtonElement | null) => void\n getTriggerElements: () => Map<string, HTMLButtonElement>\n}\n\ninterface AccordionItemContextValue {\n value: string\n disabled: boolean\n isOpen: boolean\n}\n\nconst AccordionContext = createContext<AccordionContextValue | null>(null)\nconst AccordionItemContext = createContext<AccordionItemContextValue | null>(null)\n\nfunction useAccordionContext() {\n const context = useContext(AccordionContext)\n if (!context) {\n throw new Error('Accordion compound components must be used within an <Accordion> parent')\n }\n return context\n}\n\nfunction useAccordionItemContext() {\n const context = useContext(AccordionItemContext)\n if (!context) {\n throw new Error('AccordionTrigger/AccordionContent must be used within an <AccordionItem> parent')\n }\n return context\n}\n\n// --- Accordion Root ---\n\nexport interface AccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {\n /** Whether only one or multiple items can be open */\n type?: 'single' | 'multiple'\n /** Controlled open values */\n value?: string[]\n /** Default open values for uncontrolled mode */\n defaultValue?: string[]\n /** Callback when open values change */\n onChange?: (value: string[]) => void\n /** In single mode, allows closing the open item */\n collapsible?: boolean\n children: ReactNode\n}\n\nexport const Accordion = forwardRef<HTMLDivElement, AccordionProps>(\n (\n {\n type = 'single',\n value,\n defaultValue = [],\n onChange,\n collapsible = false,\n children,\n className,\n ...props\n },\n ref\n ) => {\n const [internalValue, setInternalValue] = useState<string[]>(defaultValue)\n const triggerElementsRef = useRef<Map<string, HTMLButtonElement>>(new Map())\n const baseId = useId()\n\n const openValues = value !== undefined ? value : internalValue\n\n const toggle = useCallback(\n (itemValue: string) => {\n let next: string[]\n\n if (type === 'single') {\n if (openValues.includes(itemValue)) {\n next = collapsible ? [] : openValues\n } else {\n next = [itemValue]\n }\n } else {\n if (openValues.includes(itemValue)) {\n next = openValues.filter((v) => v !== itemValue)\n } else {\n next = [...openValues, itemValue]\n }\n }\n\n if (value === undefined) {\n setInternalValue(next)\n }\n onChange?.(next)\n },\n [type, openValues, collapsible, value, onChange]\n )\n\n const registerTrigger = useCallback((triggerValue: string, element: HTMLButtonElement | null) => {\n if (element) {\n triggerElementsRef.current.set(triggerValue, element)\n } else {\n triggerElementsRef.current.delete(triggerValue)\n }\n }, [])\n\n const getTriggerElements = useCallback(() => triggerElementsRef.current, [])\n\n return (\n <AccordionContext.Provider\n value={{ openValues, toggle, type, collapsible, baseId, registerTrigger, getTriggerElements }}\n >\n <div\n ref={ref}\n className={cn('flex flex-col divide-y divide-[var(--glass-border)]', className)}\n {...props}\n >\n {children}\n </div>\n </AccordionContext.Provider>\n )\n }\n)\n\nAccordion.displayName = 'Accordion'\n\n// --- AccordionItem ---\n\nexport interface AccordionItemProps extends HTMLAttributes<HTMLDivElement> {\n /** Unique identifier for this item */\n value: string\n /** Whether this item is disabled */\n disabled?: boolean\n children: ReactNode\n}\n\nexport const AccordionItem = forwardRef<HTMLDivElement, AccordionItemProps>(\n ({ value, disabled = false, children, className, ...props }, ref) => {\n const { openValues } = useAccordionContext()\n const isOpen = openValues.includes(value)\n\n return (\n <AccordionItemContext.Provider value={{ value, disabled, isOpen }}>\n <div ref={ref} className={className} {...props}>\n {children}\n </div>\n </AccordionItemContext.Provider>\n )\n }\n)\n\nAccordionItem.displayName = 'AccordionItem'\n\n// --- AccordionTrigger ---\n\nexport interface AccordionTriggerProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n children: ReactNode\n}\n\nexport const AccordionTrigger = forwardRef<HTMLButtonElement, AccordionTriggerProps>(\n ({ children, className, onKeyDown, ...props }, ref) => {\n const { toggle, baseId, registerTrigger, getTriggerElements } = useAccordionContext()\n const { value, disabled, isOpen } = useAccordionItemContext()\n const internalRef = useRef<HTMLButtonElement | null>(null)\n const prefersReducedMotion = useReducedMotion()\n\n const triggerId = `${baseId}-trigger-${value}`\n const contentId = `${baseId}-content-${value}`\n\n const mergedRef = useCallback(\n (node: HTMLButtonElement | null) => {\n internalRef.current = node\n registerTrigger(value, node)\n if (typeof ref === 'function') ref(node)\n else if (ref) (ref as React.MutableRefObject<HTMLButtonElement | null>).current = node\n },\n [ref, registerTrigger, value]\n )\n\n const handleKeyDown = useCallback(\n (e: KeyboardEvent<HTMLButtonElement>) => {\n onKeyDown?.(e)\n if (e.defaultPrevented) return\n\n const triggers = getTriggerElements()\n const triggerValues = Array.from(triggers.keys())\n const currentIndex = triggerValues.indexOf(value)\n\n let targetIndex: number\n\n switch (e.key) {\n case 'ArrowDown':\n targetIndex = (currentIndex + 1) % triggerValues.length\n break\n case 'ArrowUp':\n targetIndex = (currentIndex - 1 + triggerValues.length) % triggerValues.length\n break\n case 'Home':\n targetIndex = 0\n break\n case 'End':\n targetIndex = triggerValues.length - 1\n break\n default:\n return\n }\n\n e.preventDefault()\n const targetValue = triggerValues[targetIndex]\n const targetElement = triggers.get(targetValue)\n if (targetElement) {\n targetElement.focus()\n }\n },\n [onKeyDown, getTriggerElements, value]\n )\n\n return (\n <button\n ref={mergedRef}\n type=\"button\"\n id={triggerId}\n aria-expanded={isOpen}\n aria-controls={contentId}\n aria-disabled={disabled || undefined}\n onClick={() => {\n if (!disabled) toggle(value)\n }}\n onKeyDown={handleKeyDown}\n className={cn(\n 'flex w-full items-center justify-between',\n 'py-3 text-sm font-medium text-[var(--color-white)]',\n 'hover:text-[var(--color-grey-300)]',\n 'cursor-pointer',\n disabled && 'opacity-50 cursor-not-allowed hover:text-[var(--color-white)]',\n className\n )}\n {...props}\n >\n {children}\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n className={cn(\n 'shrink-0',\n prefersReducedMotion ? 'transition-none' : 'transition-transform duration-200',\n isOpen && 'rotate-180'\n )}\n >\n <path d=\"M4 6l4 4 4-4\" />\n </svg>\n </button>\n )\n }\n)\n\nAccordionTrigger.displayName = 'AccordionTrigger'\n\n// --- AccordionContent ---\n\nexport interface AccordionContentProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode\n}\n\nexport const AccordionContent = forwardRef<HTMLDivElement, AccordionContentProps>(\n ({ children, className, ...props }, ref) => {\n const { baseId } = useAccordionContext()\n const { value, isOpen } = useAccordionItemContext()\n const prefersReducedMotion = useReducedMotion()\n\n const triggerId = `${baseId}-trigger-${value}`\n const contentId = `${baseId}-content-${value}`\n\n return (\n <div\n ref={ref}\n id={contentId}\n role=\"region\"\n aria-labelledby={triggerId}\n className={cn(\n 'grid',\n prefersReducedMotion\n ? 'transition-none'\n : 'transition-[grid-template-rows] duration-200 ease-out',\n isOpen ? 'grid-template-rows-open' : 'grid-template-rows-closed'\n )}\n style={{\n gridTemplateRows: isOpen ? '1fr' : '0fr',\n }}\n {...props}\n >\n <div className=\"overflow-hidden\">\n <div className={cn('pb-3 text-sm text-[var(--color-grey-400)]', className)}>\n {children}\n </div>\n </div>\n </div>\n )\n }\n)\n\nAccordionContent.displayName = 'AccordionContent'\n"],"names":["AccordionContext","createContext","AccordionItemContext","useAccordionContext","context","useContext","useAccordionItemContext","Accordion","forwardRef","type","value","defaultValue","onChange","collapsible","children","className","props","ref","internalValue","setInternalValue","useState","triggerElementsRef","useRef","baseId","useId","openValues","toggle","useCallback","itemValue","next","v","registerTrigger","triggerValue","element","getTriggerElements","jsx","cn","AccordionItem","disabled","isOpen","AccordionTrigger","onKeyDown","internalRef","prefersReducedMotion","useReducedMotion","triggerId","contentId","mergedRef","node","handleKeyDown","triggers","triggerValues","currentIndex","targetIndex","targetValue","targetElement","jsxs","AccordionContent"],"mappings":";;;;AAkCA,MAAMA,IAAmBC,EAA4C,IAAI,GACnEC,IAAuBD,EAAgD,IAAI;AAEjF,SAASE,IAAsB;AAC7B,QAAMC,IAAUC,EAAWL,CAAgB;AAC3C,MAAI,CAACI;AACH,UAAM,IAAI,MAAM,yEAAyE;AAE3F,SAAOA;AACT;AAEA,SAASE,IAA0B;AACjC,QAAMF,IAAUC,EAAWH,CAAoB;AAC/C,MAAI,CAACE;AACH,UAAM,IAAI,MAAM,iFAAiF;AAEnG,SAAOA;AACT;AAkBO,MAAMG,IAAYC;AAAA,EACvB,CACE;AAAA,IACE,MAAAC,IAAO;AAAA,IACP,OAAAC;AAAA,IACA,cAAAC,IAAe,CAAA;AAAA,IACf,UAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAM,CAACC,GAAeC,CAAgB,I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,eAAA,CAAe;AAAA,YAAA;AAAA,UAAA;AAAA,QACzB;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEAK,EAAiB,cAAc;AAQxB,MAAMiB,IAAmBjD;AAAA,EAC9B,CAAC,EAAE,UAAAM,GAAU,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAAQ;AAC1C,UAAM,EAAE,QAAAM,EAAA,IAAWpB,EAAA,GACb,EAAE,OAAAO,GAAO,QAAA6B,EAAA,IAAWjC,EAAA,GACpBqC,IAAuBC,EAAA,GAEvBC,IAAY,GAAGtB,CAAM,YAAYb,CAAK,IACtCoC,IAAY,GAAGvB,CAAM,YAAYb,CAAK;AAE5C,WACE,gBAAAyB;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAlB;AAAA,QACA,IAAI6B;AAAA,QACJ,MAAK;AAAA,QACL,mBAAiBD;AAAA,QACjB,WAAWT;AAAA,UACT;AAAA,UACAO,IACI,oBACA;AAAA,UACJJ,IAAS,4BAA4B;AAAA,QAAA;AAAA,QAEvC,OAAO;AAAA,UACL,kBAAkBA,IAAS,QAAQ;AAAA,QAAA;AAAA,QAEpC,GAAGvB;AAAA,QAEJ,UAAA,gBAAAmB,EAAC,OAAA,EAAI,WAAU,mBACb,UAAA,gBAAAA,EAAC,OAAA,EAAI,WAAWC,EAAG,6CAA6CrB,CAAS,GACtE,UAAAD,EAAA,CACH,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEA2C,EAAiB,cAAc;"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { cn as o } from "../../utils/cn.js";
|
|
3
|
+
function b({
|
|
4
|
+
variant: r = "default",
|
|
5
|
+
padding: e = "md",
|
|
6
|
+
children: a,
|
|
7
|
+
className: s,
|
|
8
|
+
...n
|
|
9
|
+
}) {
|
|
10
|
+
const d = [
|
|
11
|
+
"rounded-2xl",
|
|
12
|
+
"border",
|
|
13
|
+
"transition-[background-color,border-color] duration-300 ease-out"
|
|
14
|
+
], l = {
|
|
15
|
+
default: [
|
|
16
|
+
"bg-transparent",
|
|
17
|
+
"border-[var(--glass-border)]"
|
|
18
|
+
],
|
|
19
|
+
glass: [
|
|
20
|
+
"bg-[var(--glass-bg)]",
|
|
21
|
+
"backdrop-blur-lg",
|
|
22
|
+
"border-[var(--glass-border)]"
|
|
23
|
+
],
|
|
24
|
+
interactive: [
|
|
25
|
+
"bg-transparent",
|
|
26
|
+
"border-[var(--glass-border)]",
|
|
27
|
+
"hover:border-[var(--glass-highlight)]",
|
|
28
|
+
"hover:bg-[var(--glass-bg)]",
|
|
29
|
+
"cursor-pointer",
|
|
30
|
+
"gradient-border shine-sweep"
|
|
31
|
+
]
|
|
32
|
+
}, i = {
|
|
33
|
+
none: "",
|
|
34
|
+
sm: "p-3",
|
|
35
|
+
md: "p-5",
|
|
36
|
+
lg: "p-8"
|
|
37
|
+
};
|
|
38
|
+
return /* @__PURE__ */ t(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
className: o(d, l[r], i[e], s),
|
|
42
|
+
...n,
|
|
43
|
+
children: a
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
function u({ children: r, className: e, ...a }) {
|
|
48
|
+
return /* @__PURE__ */ t("div", { className: o("flex flex-col gap-1.5", e), ...a, children: r });
|
|
49
|
+
}
|
|
50
|
+
function m({ children: r, as: e = "h3", className: a, ...s }) {
|
|
51
|
+
return /* @__PURE__ */ t(
|
|
52
|
+
e,
|
|
53
|
+
{
|
|
54
|
+
className: o(
|
|
55
|
+
"font-display text-base font-semibold text-[var(--color-white)]",
|
|
56
|
+
"tracking-tight",
|
|
57
|
+
a
|
|
58
|
+
),
|
|
59
|
+
...s,
|
|
60
|
+
children: r
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
function p({ children: r, className: e, ...a }) {
|
|
65
|
+
return /* @__PURE__ */ t(
|
|
66
|
+
"p",
|
|
67
|
+
{
|
|
68
|
+
className: o(
|
|
69
|
+
"text-sm text-[var(--color-grey-400)]",
|
|
70
|
+
"line-clamp-2",
|
|
71
|
+
e
|
|
72
|
+
),
|
|
73
|
+
...a,
|
|
74
|
+
children: r
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
function v({ children: r, className: e, ...a }) {
|
|
79
|
+
return /* @__PURE__ */ t("div", { className: o("mt-4", e), ...a, children: r });
|
|
80
|
+
}
|
|
81
|
+
function f({ children: r, className: e, ...a }) {
|
|
82
|
+
return /* @__PURE__ */ t(
|
|
83
|
+
"div",
|
|
84
|
+
{
|
|
85
|
+
className: o(
|
|
86
|
+
"mt-4 pt-4",
|
|
87
|
+
"border-t border-[var(--glass-border)]",
|
|
88
|
+
"flex items-center gap-3",
|
|
89
|
+
e
|
|
90
|
+
),
|
|
91
|
+
...a,
|
|
92
|
+
children: r
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
export {
|
|
97
|
+
b as Card,
|
|
98
|
+
v as CardContent,
|
|
99
|
+
p as CardDescription,
|
|
100
|
+
f as CardFooter,
|
|
101
|
+
u as CardHeader,
|
|
102
|
+
m as CardTitle
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=Card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.js","sources":["../../../src/molecules/Card/Card.tsx"],"sourcesContent":["import { type HTMLAttributes, type ReactNode } from 'react'\nimport { cn } from '../../utils/cn'\n\nexport interface CardProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'default' | 'glass' | 'interactive'\n padding?: 'none' | 'sm' | 'md' | 'lg'\n children: ReactNode\n}\n\nexport function Card({\n variant = 'default',\n padding = 'md',\n children,\n className,\n ...props\n}: CardProps) {\n const baseStyles = [\n 'rounded-2xl',\n 'border',\n 'transition-[background-color,border-color] duration-300 ease-out',\n ]\n\n const variants = {\n default: [\n 'bg-transparent',\n 'border-[var(--glass-border)]',\n ],\n glass: [\n 'bg-[var(--glass-bg)]',\n 'backdrop-blur-lg',\n 'border-[var(--glass-border)]',\n ],\n interactive: [\n 'bg-transparent',\n 'border-[var(--glass-border)]',\n 'hover:border-[var(--glass-highlight)]',\n 'hover:bg-[var(--glass-bg)]',\n 'cursor-pointer',\n 'gradient-border shine-sweep',\n ],\n }\n\n const paddings = {\n none: '',\n sm: 'p-3',\n md: 'p-5',\n lg: 'p-8',\n }\n\n return (\n <div\n className={cn(baseStyles, variants[variant], paddings[padding], className)}\n {...props}\n >\n {children}\n </div>\n )\n}\n\nexport interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode\n}\n\nexport function CardHeader({ children, className, ...props }: CardHeaderProps) {\n return (\n <div className={cn('flex flex-col gap-1.5', className)} {...props}>\n {children}\n </div>\n )\n}\n\nexport interface CardTitleProps extends HTMLAttributes<HTMLHeadingElement> {\n children: ReactNode\n as?: 'h1' | 'h2' | 'h3' | 'h4'\n}\n\nexport function CardTitle({ children, as: Tag = 'h3', className, ...props }: CardTitleProps) {\n return (\n <Tag\n className={cn(\n 'font-display text-base font-semibold text-[var(--color-white)]',\n 'tracking-tight',\n className\n )}\n {...props}\n >\n {children}\n </Tag>\n )\n}\n\nexport interface CardDescriptionProps extends HTMLAttributes<HTMLParagraphElement> {\n children: ReactNode\n}\n\nexport function CardDescription({ children, className, ...props }: CardDescriptionProps) {\n return (\n <p\n className={cn(\n 'text-sm text-[var(--color-grey-400)]',\n 'line-clamp-2',\n className\n )}\n {...props}\n >\n {children}\n </p>\n )\n}\n\nexport interface CardContentProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode\n}\n\nexport function CardContent({ children, className, ...props }: CardContentProps) {\n return (\n <div className={cn('mt-4', className)} {...props}>\n {children}\n </div>\n )\n}\n\nexport interface CardFooterProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode\n}\n\nexport function CardFooter({ children, className, ...props }: CardFooterProps) {\n return (\n <div\n className={cn(\n 'mt-4 pt-4',\n 'border-t border-[var(--glass-border)]',\n 'flex items-center gap-3',\n className\n )}\n {...props}\n >\n {children}\n </div>\n )\n}\n"],"names":["Card","variant","padding","children","className","props","baseStyles","variants","paddings","jsx","cn","CardHeader","CardTitle","Tag","CardDescription","CardContent","CardFooter"],"mappings":";;AASO,SAASA,EAAK;AAAA,EACnB,SAAAC,IAAU;AAAA,EACV,SAAAC,IAAU;AAAA,EACV,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,GAAc;AACZ,QAAMC,IAAa;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,EAAA,GAGIC,IAAW;AAAA,IACf,SAAS;AAAA,MACP;AAAA,MACA;AAAA,IAAA;AAAA,IAEF,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,IAEF,aAAa;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EACF,GAGIC,IAAW;AAAA,IACf,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA;AAGN,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAGJ,GAAYC,EAASN,CAAO,GAAGO,EAASN,CAAO,GAAGE,CAAS;AAAA,MACxE,GAAGC;AAAA,MAEH,UAAAF;AAAA,IAAA;AAAA,EAAA;AAGP;AAMO,SAASQ,EAAW,EAAE,UAAAR,GAAU,WAAAC,GAAW,GAAGC,KAA0B;AAC7E,SACE,gBAAAI,EAAC,SAAI,WAAWC,EAAG,yBAAyBN,CAAS,GAAI,GAAGC,GACzD,UAAAF,GACH;AAEJ;AAOO,SAASS,EAAU,EAAE,UAAAT,GAAU,IAAIU,IAAM,MAAM,WAAAT,GAAW,GAAGC,KAAyB;AAC3F,SACE,gBAAAI;AAAA,IAACI;AAAA,IAAA;AAAA,MACC,WAAWH;AAAA,QACT;AAAA,QACA;AAAA,QACAN;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,MAEH,UAAAF;AAAA,IAAA;AAAA,EAAA;AAGP;AAMO,SAASW,EAAgB,EAAE,UAAAX,GAAU,WAAAC,GAAW,GAAGC,KAA+B;AACvF,SACE,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACA;AAAA,QACAN;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,MAEH,UAAAF;AAAA,IAAA;AAAA,EAAA;AAGP;AAMO,SAASY,EAAY,EAAE,UAAAZ,GAAU,WAAAC,GAAW,GAAGC,KAA2B;AAC/E,SACE,gBAAAI,EAAC,SAAI,WAAWC,EAAG,QAAQN,CAAS,GAAI,GAAGC,GACxC,UAAAF,GACH;AAEJ;AAMO,SAASa,EAAW,EAAE,UAAAb,GAAU,WAAAC,GAAW,GAAGC,KAA0B;AAC7E,SACE,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACAN;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,MAEH,UAAAF;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsxs as l, jsx as e, Fragment as p } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useCallback as u } from "react";
|
|
3
|
+
import { cn as s } from "../../utils/cn.js";
|
|
4
|
+
import { Icon as v } from "../../atoms/Icon/Icon.js";
|
|
5
|
+
function w({
|
|
6
|
+
command: o,
|
|
7
|
+
variant: i = "default",
|
|
8
|
+
showCopyButton: c = !0,
|
|
9
|
+
onCopy: a,
|
|
10
|
+
className: n,
|
|
11
|
+
...b
|
|
12
|
+
}) {
|
|
13
|
+
const [r, t] = h(!1), d = u(async () => {
|
|
14
|
+
try {
|
|
15
|
+
await navigator.clipboard.writeText(o), t(!0), a?.(), setTimeout(() => t(!1), 2e3);
|
|
16
|
+
} catch (g) {
|
|
17
|
+
console.error("Failed to copy:", g);
|
|
18
|
+
}
|
|
19
|
+
}, [o, a]);
|
|
20
|
+
return /* @__PURE__ */ l("div", { className: s([
|
|
21
|
+
"flex items-center justify-between gap-3",
|
|
22
|
+
"px-4 py-3",
|
|
23
|
+
"rounded-xl",
|
|
24
|
+
"border",
|
|
25
|
+
"backdrop-blur-lg",
|
|
26
|
+
"transition-[background-color,border-color] duration-200"
|
|
27
|
+
], {
|
|
28
|
+
default: [
|
|
29
|
+
"bg-[rgba(255,255,255,0.03)]",
|
|
30
|
+
"border-[var(--glass-border)]",
|
|
31
|
+
"hover:bg-[rgba(255,255,255,0.06)]",
|
|
32
|
+
"hover:border-[var(--glass-highlight)]"
|
|
33
|
+
],
|
|
34
|
+
primary: [
|
|
35
|
+
"bg-[var(--glass-bg)]",
|
|
36
|
+
"border-[var(--glass-highlight)]",
|
|
37
|
+
"hover:bg-[rgba(255,255,255,0.12)]"
|
|
38
|
+
]
|
|
39
|
+
}[i], n), ...b, children: [
|
|
40
|
+
/* @__PURE__ */ e("code", { className: "text-sm font-mono text-[var(--color-grey-300)] truncate", children: o }),
|
|
41
|
+
c && /* @__PURE__ */ l(p, { children: [
|
|
42
|
+
/* @__PURE__ */ e(
|
|
43
|
+
"button",
|
|
44
|
+
{
|
|
45
|
+
type: "button",
|
|
46
|
+
onClick: d,
|
|
47
|
+
className: s(
|
|
48
|
+
"flex-shrink-0",
|
|
49
|
+
"p-2 rounded-lg",
|
|
50
|
+
"transition-[background-color,color,transform] duration-200",
|
|
51
|
+
"hover:scale-105 active:scale-92",
|
|
52
|
+
r ? "bg-[var(--color-sage)] text-[var(--color-bg)]" : "bg-[rgba(255,255,255,0.1)] text-[var(--color-grey-400)] hover:bg-[rgba(255,255,255,0.15)] hover:text-[var(--color-white)]"
|
|
53
|
+
),
|
|
54
|
+
"aria-label": r ? "Copied!" : "Copy to clipboard",
|
|
55
|
+
children: /* @__PURE__ */ e(v, { name: r ? "check" : "copy", size: "sm" })
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
/* @__PURE__ */ e("span", { className: "sr-only", role: "status", "aria-live": "polite", children: r ? "Copied to clipboard" : "" })
|
|
59
|
+
] })
|
|
60
|
+
] });
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
w as CommandBox
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=CommandBox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandBox.js","sources":["../../../src/molecules/CommandBox/CommandBox.tsx"],"sourcesContent":["import { useState, useCallback, type HTMLAttributes } from 'react'\nimport { cn } from '../../utils/cn'\nimport { Icon } from '../../atoms/Icon'\n\nexport interface CommandBoxProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {\n command: string\n variant?: 'default' | 'primary'\n showCopyButton?: boolean\n onCopy?: () => void\n}\n\nexport function CommandBox({\n command,\n variant = 'default',\n showCopyButton = true,\n onCopy,\n className,\n ...props\n}: CommandBoxProps) {\n const [copied, setCopied] = useState(false)\n\n const handleCopy = useCallback(async () => {\n try {\n await navigator.clipboard.writeText(command)\n setCopied(true)\n onCopy?.()\n setTimeout(() => setCopied(false), 2000)\n } catch (err) {\n console.error('Failed to copy:', err)\n }\n }, [command, onCopy])\n\n const baseStyles = [\n 'flex items-center justify-between gap-3',\n 'px-4 py-3',\n 'rounded-xl',\n 'border',\n 'backdrop-blur-lg',\n 'transition-[background-color,border-color] duration-200',\n ]\n\n const variants = {\n default: [\n 'bg-[rgba(255,255,255,0.03)]',\n 'border-[var(--glass-border)]',\n 'hover:bg-[rgba(255,255,255,0.06)]',\n 'hover:border-[var(--glass-highlight)]',\n ],\n primary: [\n 'bg-[var(--glass-bg)]',\n 'border-[var(--glass-highlight)]',\n 'hover:bg-[rgba(255,255,255,0.12)]',\n ],\n }\n\n return (\n <div className={cn(baseStyles, variants[variant], className)} {...props}>\n <code className=\"text-sm font-mono text-[var(--color-grey-300)] truncate\">{command}</code>\n {showCopyButton && (\n <>\n <button\n type=\"button\"\n onClick={handleCopy}\n className={cn(\n 'flex-shrink-0',\n 'p-2 rounded-lg',\n 'transition-[background-color,color,transform] duration-200',\n 'hover:scale-105 active:scale-92',\n copied\n ? 'bg-[var(--color-sage)] text-[var(--color-bg)]'\n : 'bg-[rgba(255,255,255,0.1)] text-[var(--color-grey-400)] hover:bg-[rgba(255,255,255,0.15)] hover:text-[var(--color-white)]'\n )}\n aria-label={copied ? 'Copied!' : 'Copy to clipboard'}\n >\n <Icon name={copied ? 'check' : 'copy'} size=\"sm\" />\n </button>\n {/* Live region for screen reader announcement */}\n <span className=\"sr-only\" role=\"status\" aria-live=\"polite\">\n {copied ? 'Copied to clipboard' : ''}\n </span>\n </>\n )}\n </div>\n )\n}\n"],"names":["CommandBox","command","variant","showCopyButton","onCopy","className","props","copied","setCopied","useState","handleCopy","useCallback","err","jsxs","cn","jsx","Fragment","Icon"],"mappings":";;;;AAWO,SAASA,EAAW;AAAA,EACzB,SAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,gBAAAC,IAAiB;AAAA,EACjB,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,GAAoB;AAClB,QAAM,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAK,GAEpCC,IAAaC,EAAY,YAAY;AACzC,QAAI;AACF,YAAM,UAAU,UAAU,UAAUV,CAAO,GAC3CO,EAAU,EAAI,GACdJ,IAAA,GACA,WAAW,MAAMI,EAAU,EAAK,GAAG,GAAI;AAAA,IACzC,SAASI,GAAK;AACZ,cAAQ,MAAM,mBAAmBA,CAAG;AAAA,IACtC;AAAA,EACF,GAAG,CAACX,GAASG,CAAM,CAAC;AAyBpB,SACE,gBAAAS,EAAC,OAAA,EAAI,WAAWC,EAxBC;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,GAGe;AAAA,IACf,SAAS;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,IAEF,SAAS;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EACF,EAIwCZ,CAAO,GAAGG,CAAS,GAAI,GAAGC,GAChE,UAAA;AAAA,IAAA,gBAAAS,EAAC,QAAA,EAAK,WAAU,2DAA2D,UAAAd,GAAQ;AAAA,IAClFE,KACC,gBAAAU,EAAAG,GAAA,EACE,UAAA;AAAA,MAAA,gBAAAD;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,SAASL;AAAA,UACT,WAAWI;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACAP,IACI,kDACA;AAAA,UAAA;AAAA,UAEN,cAAYA,IAAS,YAAY;AAAA,UAEjC,4BAACU,GAAA,EAAK,MAAMV,IAAS,UAAU,QAAQ,MAAK,KAAA,CAAK;AAAA,QAAA;AAAA,MAAA;AAAA,MAGnD,gBAAAQ,EAAC,QAAA,EAAK,WAAU,WAAU,MAAK,UAAS,aAAU,UAC/C,UAAAR,IAAS,wBAAwB,GAAA,CACpC;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { cn as d } from "../../utils/cn.js";
|
|
3
|
+
import { presets as l } from "./presets.js";
|
|
4
|
+
import { Shape as z } from "../../atoms/Shape/Shape.js";
|
|
5
|
+
function S({
|
|
6
|
+
preset: p,
|
|
7
|
+
layers: f,
|
|
8
|
+
scale: i = 1,
|
|
9
|
+
className: c,
|
|
10
|
+
style: h
|
|
11
|
+
}) {
|
|
12
|
+
const r = f || (p ? l[p] : []);
|
|
13
|
+
if (r.length === 0)
|
|
14
|
+
return null;
|
|
15
|
+
const n = r.reduce(
|
|
16
|
+
(t, m) => {
|
|
17
|
+
const o = m.size / 2, s = m.offsetX || 0, e = m.offsetY || 0;
|
|
18
|
+
return {
|
|
19
|
+
minX: Math.min(t.minX, s - o),
|
|
20
|
+
maxX: Math.max(t.maxX, s + o),
|
|
21
|
+
minY: Math.min(t.minY, e - o),
|
|
22
|
+
maxY: Math.max(t.maxY, e + o)
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
{ minX: 0, maxX: 0, minY: 0, maxY: 0 }
|
|
26
|
+
), x = (n.maxX - n.minX) * i, X = (n.maxY - n.minY) * i, Y = -n.minX, u = -n.minY;
|
|
27
|
+
return /* @__PURE__ */ a(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
className: d("relative inline-block", c),
|
|
31
|
+
style: {
|
|
32
|
+
width: x,
|
|
33
|
+
height: X,
|
|
34
|
+
...h
|
|
35
|
+
},
|
|
36
|
+
children: r.map((t, m) => {
|
|
37
|
+
const o = ((t.offsetX || 0) + Y) * i, s = ((t.offsetY || 0) + u) * i, e = t.size * i;
|
|
38
|
+
return /* @__PURE__ */ a(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
className: "absolute",
|
|
42
|
+
style: {
|
|
43
|
+
left: o,
|
|
44
|
+
top: s,
|
|
45
|
+
transform: "translate(-50%, -50%)"
|
|
46
|
+
},
|
|
47
|
+
children: /* @__PURE__ */ a(
|
|
48
|
+
z,
|
|
49
|
+
{
|
|
50
|
+
type: t.type,
|
|
51
|
+
size: e,
|
|
52
|
+
color: t.color,
|
|
53
|
+
pattern: t.pattern,
|
|
54
|
+
patternColors: t.patternColors,
|
|
55
|
+
rotation: t.rotation,
|
|
56
|
+
opacity: t.opacity
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
},
|
|
60
|
+
m
|
|
61
|
+
);
|
|
62
|
+
})
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
export {
|
|
67
|
+
S as CompositeShape
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=CompositeShape.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompositeShape.js","sources":["../../../src/molecules/CompositeShape/CompositeShape.tsx"],"sourcesContent":["import { Shape } from '../../atoms/Shape'\nimport { cn } from '../../utils/cn'\nimport { presets, CompositePreset, ShapeLayer } from './presets'\n\nexport interface CompositeShapeProps {\n preset?: CompositePreset\n layers?: ShapeLayer[]\n scale?: number\n className?: string\n style?: React.CSSProperties\n}\n\nexport function CompositeShape({\n preset,\n layers,\n scale = 1,\n className,\n style,\n}: CompositeShapeProps) {\n const shapeLayers = layers || (preset ? presets[preset] : [])\n\n if (shapeLayers.length === 0) {\n return null\n }\n\n // Calculate bounding box for the composition\n const bounds = shapeLayers.reduce(\n (acc, layer) => {\n const halfSize = layer.size / 2\n const x = layer.offsetX || 0\n const y = layer.offsetY || 0\n return {\n minX: Math.min(acc.minX, x - halfSize),\n maxX: Math.max(acc.maxX, x + halfSize),\n minY: Math.min(acc.minY, y - halfSize),\n maxY: Math.max(acc.maxY, y + halfSize),\n }\n },\n { minX: 0, maxX: 0, minY: 0, maxY: 0 }\n )\n\n const width = (bounds.maxX - bounds.minX) * scale\n const height = (bounds.maxY - bounds.minY) * scale\n const centerX = -bounds.minX\n const centerY = -bounds.minY\n\n return (\n <div\n className={cn('relative inline-block', className)}\n style={{\n width,\n height,\n ...style,\n }}\n >\n {shapeLayers.map((layer, index) => {\n const x = ((layer.offsetX || 0) + centerX) * scale\n const y = ((layer.offsetY || 0) + centerY) * scale\n const size = layer.size * scale\n\n return (\n <div\n key={index}\n className=\"absolute\"\n style={{\n left: x,\n top: y,\n transform: 'translate(-50%, -50%)',\n }}\n >\n <Shape\n type={layer.type}\n size={size}\n color={layer.color}\n pattern={layer.pattern}\n patternColors={layer.patternColors}\n rotation={layer.rotation}\n opacity={layer.opacity}\n />\n </div>\n )\n })}\n </div>\n )\n}\n"],"names":["CompositeShape","preset","layers","scale","className","style","shapeLayers","presets","bounds","acc","layer","halfSize","x","y","width","height","centerX","centerY","jsx","cn","index","size","Shape"],"mappings":";;;;AAYO,SAASA,EAAe;AAAA,EAC7B,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,WAAAC;AAAA,EACA,OAAAC;AACF,GAAwB;AACtB,QAAMC,IAAcJ,MAAWD,IAASM,EAAQN,CAAM,IAAI;AAE1D,MAAIK,EAAY,WAAW;AACzB,WAAO;AAIT,QAAME,IAASF,EAAY;AAAA,IACzB,CAACG,GAAKC,MAAU;AACd,YAAMC,IAAWD,EAAM,OAAO,GACxBE,IAAIF,EAAM,WAAW,GACrBG,IAAIH,EAAM,WAAW;AAC3B,aAAO;AAAA,QACL,MAAM,KAAK,IAAID,EAAI,MAAMG,IAAID,CAAQ;AAAA,QACrC,MAAM,KAAK,IAAIF,EAAI,MAAMG,IAAID,CAAQ;AAAA,QACrC,MAAM,KAAK,IAAIF,EAAI,MAAMI,IAAIF,CAAQ;AAAA,QACrC,MAAM,KAAK,IAAIF,EAAI,MAAMI,IAAIF,CAAQ;AAAA,MAAA;AAAA,IAEzC;AAAA,IACA,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,EAAA;AAAA,EAAE,GAGjCG,KAASN,EAAO,OAAOA,EAAO,QAAQL,GACtCY,KAAUP,EAAO,OAAOA,EAAO,QAAQL,GACvCa,IAAU,CAACR,EAAO,MAClBS,IAAU,CAACT,EAAO;AAExB,SACE,gBAAAU;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAG,yBAAyBf,CAAS;AAAA,MAChD,OAAO;AAAA,QACL,OAAAU;AAAA,QACA,QAAAC;AAAA,QACA,GAAGV;AAAA,MAAA;AAAA,MAGJ,UAAAC,EAAY,IAAI,CAACI,GAAOU,MAAU;AACjC,cAAMR,MAAMF,EAAM,WAAW,KAAKM,KAAWb,GACvCU,MAAMH,EAAM,WAAW,KAAKO,KAAWd,GACvCkB,IAAOX,EAAM,OAAOP;AAE1B,eACE,gBAAAe;AAAA,UAAC;AAAA,UAAA;AAAA,YAEC,WAAU;AAAA,YACV,OAAO;AAAA,cACL,MAAMN;AAAA,cACN,KAAKC;AAAA,cACL,WAAW;AAAA,YAAA;AAAA,YAGb,UAAA,gBAAAK;AAAA,cAACI;AAAA,cAAA;AAAA,gBACC,MAAMZ,EAAM;AAAA,gBACZ,MAAAW;AAAA,gBACA,OAAOX,EAAM;AAAA,gBACb,SAASA,EAAM;AAAA,gBACf,eAAeA,EAAM;AAAA,gBACrB,UAAUA,EAAM;AAAA,gBAChB,SAASA,EAAM;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,UAhBKU;AAAA,QAAA;AAAA,MAmBX,CAAC;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
"rainbow-arc": [
|
|
3
|
+
{ type: "arc", color: "#FF6B9D", size: 80, offsetX: 0, offsetY: 0 },
|
|
4
|
+
{ type: "arc", color: "#FF7F50", size: 68, offsetX: 0, offsetY: 6 },
|
|
5
|
+
{ type: "arc", color: "#FFD93D", size: 56, offsetX: 0, offsetY: 12 },
|
|
6
|
+
{ type: "arc", color: "#2ECC71", size: 44, offsetX: 0, offsetY: 18 },
|
|
7
|
+
{ type: "arc", color: "#5DADE2", size: 32, offsetX: 0, offsetY: 24 },
|
|
8
|
+
{ type: "arc", color: "#A78BFA", size: 20, offsetX: 0, offsetY: 30 }
|
|
9
|
+
],
|
|
10
|
+
cluster: [
|
|
11
|
+
{ type: "circle", color: "#2ECC71", size: 48, offsetX: 0, offsetY: 0 },
|
|
12
|
+
{ type: "circle", color: "#FF6B9D", size: 36, offsetX: 30, offsetY: -10 },
|
|
13
|
+
{ type: "diamond", color: "#FFD93D", size: 28, offsetX: -20, offsetY: 25 },
|
|
14
|
+
{ type: "triangle", color: "#5DADE2", size: 32, offsetX: 35, offsetY: 20 }
|
|
15
|
+
],
|
|
16
|
+
stack: [
|
|
17
|
+
{ type: "square", color: "#8B7355", size: 56, offsetX: 0, offsetY: 0, rotation: 5 },
|
|
18
|
+
{ type: "square", color: "#FFAB91", size: 48, offsetX: 4, offsetY: -8, rotation: -3 },
|
|
19
|
+
{ type: "square", color: "#A78BFA", size: 40, offsetX: 8, offsetY: -16, rotation: 2 }
|
|
20
|
+
],
|
|
21
|
+
flower: [
|
|
22
|
+
{ type: "circle", color: "#FF6B9D", size: 32, offsetX: 0, offsetY: -20 },
|
|
23
|
+
{ type: "circle", color: "#FF6B9D", size: 32, offsetX: 19, offsetY: -6 },
|
|
24
|
+
{ type: "circle", color: "#FF6B9D", size: 32, offsetX: 12, offsetY: 16 },
|
|
25
|
+
{ type: "circle", color: "#FF6B9D", size: 32, offsetX: -12, offsetY: 16 },
|
|
26
|
+
{ type: "circle", color: "#FF6B9D", size: 32, offsetX: -19, offsetY: -6 },
|
|
27
|
+
{ type: "circle", color: "#FFD93D", size: 24, offsetX: 0, offsetY: 0 }
|
|
28
|
+
],
|
|
29
|
+
bear: [
|
|
30
|
+
// Ears
|
|
31
|
+
{ type: "circle", color: "#8B7355", size: 24, offsetX: -20, offsetY: -24 },
|
|
32
|
+
{ type: "circle", color: "#8B7355", size: 24, offsetX: 20, offsetY: -24 },
|
|
33
|
+
{ type: "circle", color: "#FFAB91", size: 12, offsetX: -20, offsetY: -24 },
|
|
34
|
+
{ type: "circle", color: "#FFAB91", size: 12, offsetX: 20, offsetY: -24 },
|
|
35
|
+
// Face
|
|
36
|
+
{ type: "circle", color: "#8B7355", size: 56, offsetX: 0, offsetY: 0 },
|
|
37
|
+
// Muzzle
|
|
38
|
+
{ type: "circle", color: "#FFAB91", size: 28, offsetX: 0, offsetY: 8 }
|
|
39
|
+
],
|
|
40
|
+
snail: [
|
|
41
|
+
// Body
|
|
42
|
+
{ type: "pill", color: "#2ECC71", size: 48, offsetX: -10, offsetY: 15 },
|
|
43
|
+
// Shell layers
|
|
44
|
+
{ type: "semicircle", color: "#922B3E", size: 44, offsetX: 10, offsetY: -5, rotation: -30 },
|
|
45
|
+
{ type: "semicircle", color: "#FF6B9D", size: 32, offsetX: 14, offsetY: -2, rotation: -30 },
|
|
46
|
+
{ type: "circle", color: "#FFD93D", size: 16, offsetX: 18, offsetY: 2 }
|
|
47
|
+
],
|
|
48
|
+
orbit: [
|
|
49
|
+
{ type: "circle", color: "#A78BFA", size: 32, offsetX: 0, offsetY: 0 },
|
|
50
|
+
{ type: "circle", color: "#FF6B9D", size: 16, offsetX: 35, offsetY: 0 },
|
|
51
|
+
{ type: "circle", color: "#2ECC71", size: 12, offsetX: -30, offsetY: 20 },
|
|
52
|
+
{ type: "diamond", color: "#FFD93D", size: 14, offsetX: 10, offsetY: -35 }
|
|
53
|
+
],
|
|
54
|
+
"checkerboard-stack": [
|
|
55
|
+
{
|
|
56
|
+
type: "square",
|
|
57
|
+
color: "#FFAB91",
|
|
58
|
+
pattern: "checkered",
|
|
59
|
+
patternColors: ["#FFAB91", "#8B7355"],
|
|
60
|
+
size: 48,
|
|
61
|
+
offsetX: 0,
|
|
62
|
+
offsetY: 0
|
|
63
|
+
},
|
|
64
|
+
{ type: "circle", color: "#2ECC71", size: 24, offsetX: 30, offsetY: -15 },
|
|
65
|
+
{ type: "diamond", color: "#922B3E", size: 20, offsetX: -20, offsetY: -25 }
|
|
66
|
+
]
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
e as presets
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=presets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presets.js","sources":["../../../src/molecules/CompositeShape/presets.ts"],"sourcesContent":["import { ShapeType, PatternType } from '../../atoms/Shape'\n\nexport interface ShapeLayer {\n type: ShapeType\n color: string\n pattern?: PatternType\n patternColors?: string[]\n size: number\n offsetX?: number\n offsetY?: number\n rotation?: number\n opacity?: number\n}\n\nexport type CompositePreset =\n | 'rainbow-arc'\n | 'cluster'\n | 'stack'\n | 'flower'\n | 'bear'\n | 'snail'\n | 'orbit'\n | 'checkerboard-stack'\n\nexport const presets: Record<CompositePreset, ShapeLayer[]> = {\n 'rainbow-arc': [\n { type: 'arc', color: '#FF6B9D', size: 80, offsetX: 0, offsetY: 0 },\n { type: 'arc', color: '#FF7F50', size: 68, offsetX: 0, offsetY: 6 },\n { type: 'arc', color: '#FFD93D', size: 56, offsetX: 0, offsetY: 12 },\n { type: 'arc', color: '#2ECC71', size: 44, offsetX: 0, offsetY: 18 },\n { type: 'arc', color: '#5DADE2', size: 32, offsetX: 0, offsetY: 24 },\n { type: 'arc', color: '#A78BFA', size: 20, offsetX: 0, offsetY: 30 },\n ],\n\n cluster: [\n { type: 'circle', color: '#2ECC71', size: 48, offsetX: 0, offsetY: 0 },\n { type: 'circle', color: '#FF6B9D', size: 36, offsetX: 30, offsetY: -10 },\n { type: 'diamond', color: '#FFD93D', size: 28, offsetX: -20, offsetY: 25 },\n { type: 'triangle', color: '#5DADE2', size: 32, offsetX: 35, offsetY: 20 },\n ],\n\n stack: [\n { type: 'square', color: '#8B7355', size: 56, offsetX: 0, offsetY: 0, rotation: 5 },\n { type: 'square', color: '#FFAB91', size: 48, offsetX: 4, offsetY: -8, rotation: -3 },\n { type: 'square', color: '#A78BFA', size: 40, offsetX: 8, offsetY: -16, rotation: 2 },\n ],\n\n flower: [\n { type: 'circle', color: '#FF6B9D', size: 32, offsetX: 0, offsetY: -20 },\n { type: 'circle', color: '#FF6B9D', size: 32, offsetX: 19, offsetY: -6 },\n { type: 'circle', color: '#FF6B9D', size: 32, offsetX: 12, offsetY: 16 },\n { type: 'circle', color: '#FF6B9D', size: 32, offsetX: -12, offsetY: 16 },\n { type: 'circle', color: '#FF6B9D', size: 32, offsetX: -19, offsetY: -6 },\n { type: 'circle', color: '#FFD93D', size: 24, offsetX: 0, offsetY: 0 },\n ],\n\n bear: [\n // Ears\n { type: 'circle', color: '#8B7355', size: 24, offsetX: -20, offsetY: -24 },\n { type: 'circle', color: '#8B7355', size: 24, offsetX: 20, offsetY: -24 },\n { type: 'circle', color: '#FFAB91', size: 12, offsetX: -20, offsetY: -24 },\n { type: 'circle', color: '#FFAB91', size: 12, offsetX: 20, offsetY: -24 },\n // Face\n { type: 'circle', color: '#8B7355', size: 56, offsetX: 0, offsetY: 0 },\n // Muzzle\n { type: 'circle', color: '#FFAB91', size: 28, offsetX: 0, offsetY: 8 },\n ],\n\n snail: [\n // Body\n { type: 'pill', color: '#2ECC71', size: 48, offsetX: -10, offsetY: 15 },\n // Shell layers\n { type: 'semicircle', color: '#922B3E', size: 44, offsetX: 10, offsetY: -5, rotation: -30 },\n { type: 'semicircle', color: '#FF6B9D', size: 32, offsetX: 14, offsetY: -2, rotation: -30 },\n { type: 'circle', color: '#FFD93D', size: 16, offsetX: 18, offsetY: 2 },\n ],\n\n orbit: [\n { type: 'circle', color: '#A78BFA', size: 32, offsetX: 0, offsetY: 0 },\n { type: 'circle', color: '#FF6B9D', size: 16, offsetX: 35, offsetY: 0 },\n { type: 'circle', color: '#2ECC71', size: 12, offsetX: -30, offsetY: 20 },\n { type: 'diamond', color: '#FFD93D', size: 14, offsetX: 10, offsetY: -35 },\n ],\n\n 'checkerboard-stack': [\n {\n type: 'square',\n color: '#FFAB91',\n pattern: 'checkered',\n patternColors: ['#FFAB91', '#8B7355'],\n size: 48,\n offsetX: 0,\n offsetY: 0,\n },\n { type: 'circle', color: '#2ECC71', size: 24, offsetX: 30, offsetY: -15 },\n { type: 'diamond', color: '#922B3E', size: 20, offsetX: -20, offsetY: -25 },\n ],\n}\n"],"names":["presets"],"mappings":"AAwBO,MAAMA,IAAiD;AAAA,EAC5D,eAAe;AAAA,IACb,EAAE,MAAM,OAAO,OAAO,WAAW,MAAM,IAAI,SAAS,GAAG,SAAS,EAAA;AAAA,IAChE,EAAE,MAAM,OAAO,OAAO,WAAW,MAAM,IAAI,SAAS,GAAG,SAAS,EAAA;AAAA,IAChE,EAAE,MAAM,OAAO,OAAO,WAAW,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