@nice2dev/icons 1.1.10 → 1.2.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/CHANGELOG.md +173 -0
- package/dist/cjs/NiceDesktopIconExporter.js +2 -6
- package/dist/cjs/NiceFaviconGenerator.js +2 -1
- package/dist/cjs/NiceIconPicker.js +15 -20
- package/dist/cjs/NiceIconSetCreator.js +6 -29
- package/dist/cjs/NtdIconBadge.js +12 -12
- package/dist/cjs/NtdIconMorph.js +21 -11
- package/dist/cjs/NtdStateMorph.js +3 -3
- package/dist/cjs/animationControls.js +10 -3
- package/dist/cjs/createIcon.js +6 -10
- package/dist/cjs/headless-ui.js +3 -3
- package/dist/cjs/iconStyles.js +36 -34
- package/dist/cjs/icons/accessibility.js +13 -26
- package/dist/cjs/icons/actions.js +37 -50
- package/dist/cjs/icons/ai.js +15 -30
- package/dist/cjs/icons/brand.js +7 -18
- package/dist/cjs/icons/business.js +18 -106
- package/dist/cjs/icons/devtech.js +31 -142
- package/dist/cjs/icons/ecommerce.js +16 -32
- package/dist/cjs/icons/education.js +17 -34
- package/dist/cjs/icons/files.js +31 -62
- package/dist/cjs/icons/fintech.js +14 -28
- package/dist/cjs/icons/food.js +16 -32
- package/dist/cjs/icons/fun.js +13 -26
- package/dist/cjs/icons/gaming.js +15 -30
- package/dist/cjs/icons/health.js +13 -36
- package/dist/cjs/icons/index.js +4 -0
- package/dist/cjs/icons/legal.js +13 -26
- package/dist/cjs/icons/media.js +46 -46
- package/dist/cjs/icons/navigation.js +14 -28
- package/dist/cjs/icons/omniverk.js +10 -10
- package/dist/cjs/icons/realestate.js +17 -34
- package/dist/cjs/icons/saas.js +13 -26
- package/dist/cjs/icons/science.js +17 -34
- package/dist/cjs/icons/shapes.js +22 -44
- package/dist/cjs/icons/smarthome.js +13 -26
- package/dist/cjs/icons/social.js +8 -116
- package/dist/cjs/icons/sports.js +14 -28
- package/dist/cjs/icons/sustainability.js +15 -30
- package/dist/cjs/icons/travel.js +15 -30
- package/dist/cjs/icons/ui.js +39 -56
- package/dist/cjs/icons/weather.js +20 -40
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/lottieIntegration.js +3 -3
- package/dist/cjs/nicetodev-icons.css +1 -1
- package/dist/cjs/particleEffects.js +11 -4
- package/dist/cjs/resolver.js +4 -0
- package/dist/cjs/rsc.js +1 -1
- package/dist/cjs/variantProps.js +2 -7
- package/dist/esm/NiceDesktopIconExporter.js +2 -6
- package/dist/esm/NiceFaviconGenerator.js +2 -1
- package/dist/esm/NiceIconPicker.js +16 -21
- package/dist/esm/NiceIconSetCreator.js +6 -29
- package/dist/esm/NtdIconBadge.js +12 -12
- package/dist/esm/NtdIconMorph.js +21 -11
- package/dist/esm/NtdStateMorph.js +3 -3
- package/dist/esm/animationControls.js +11 -4
- package/dist/esm/createIcon.js +7 -11
- package/dist/esm/headless-ui.js +3 -3
- package/dist/esm/iconStyles.js +36 -34
- package/dist/esm/icons/accessibility.js +13 -26
- package/dist/esm/icons/actions.js +37 -51
- package/dist/esm/icons/ai.js +15 -30
- package/dist/esm/icons/brand.js +7 -18
- package/dist/esm/icons/business.js +18 -106
- package/dist/esm/icons/devtech.js +31 -142
- package/dist/esm/icons/ecommerce.js +16 -32
- package/dist/esm/icons/education.js +17 -34
- package/dist/esm/icons/files.js +31 -62
- package/dist/esm/icons/fintech.js +14 -28
- package/dist/esm/icons/food.js +16 -32
- package/dist/esm/icons/fun.js +13 -26
- package/dist/esm/icons/gaming.js +15 -30
- package/dist/esm/icons/health.js +13 -36
- package/dist/esm/icons/index.js +3 -3
- package/dist/esm/icons/legal.js +13 -26
- package/dist/esm/icons/media.js +45 -47
- package/dist/esm/icons/navigation.js +14 -28
- package/dist/esm/icons/omniverk.js +10 -10
- package/dist/esm/icons/realestate.js +17 -34
- package/dist/esm/icons/saas.js +13 -26
- package/dist/esm/icons/science.js +17 -34
- package/dist/esm/icons/shapes.js +22 -44
- package/dist/esm/icons/smarthome.js +13 -26
- package/dist/esm/icons/social.js +8 -116
- package/dist/esm/icons/sports.js +14 -28
- package/dist/esm/icons/sustainability.js +15 -30
- package/dist/esm/icons/travel.js +15 -30
- package/dist/esm/icons/ui.js +39 -57
- package/dist/esm/icons/weather.js +20 -40
- package/dist/esm/index.js +4 -5
- package/dist/esm/lottieIntegration.js +3 -3
- package/dist/esm/nicetodev-icons.css +1 -1
- package/dist/esm/particleEffects.js +11 -4
- package/dist/esm/resolver.js +4 -0
- package/dist/esm/rsc.js +1 -1
- package/dist/esm/smilAnimations.js +1 -1
- package/dist/esm/variantProps.js +3 -7
- package/dist/types/NiceDesktopIconExporter.d.ts +1 -0
- package/dist/types/NtdIconBadge.d.ts +12 -4
- package/dist/types/NtdIconMorph.d.ts +10 -4
- package/dist/types/NtdStateMorph.d.ts +3 -1
- package/dist/types/createIcon.d.ts +1 -9
- package/dist/types/headless-ui.d.ts +6 -2
- package/dist/types/iconStyles.d.ts +33 -11
- package/dist/types/icons/actions.d.ts +1 -0
- package/dist/types/icons/index.d.ts +3 -3
- package/dist/types/icons/media.d.ts +3 -0
- package/dist/types/icons/ui.d.ts +2 -0
- package/dist/types/index.d.ts +2 -12
- package/dist/types/lottieIntegration.d.ts +3 -1
- package/dist/types/particleEffects.d.ts +3 -1
- package/dist/types/rsc.d.ts +1 -3
- package/dist/types/tailwind-plugin.d.ts +1 -1
- package/dist/types/types.d.ts +1 -2
- package/dist/types/variantProps.d.ts +3 -11
- package/package.json +1 -1
|
@@ -43,7 +43,8 @@ function interpolateSegments(from, to, t) {
|
|
|
43
43
|
/* ────────────────────────────────────────────────────────────────────────────
|
|
44
44
|
COMPONENT
|
|
45
45
|
───────────────────────────────────────────────────────────────────────────── */
|
|
46
|
-
const NtdStateMorph =
|
|
46
|
+
const NtdStateMorph = /* @__PURE__ */ Object.assign(
|
|
47
|
+
/* @__PURE__ */ React.forwardRef(({ states, currentState, fills, strokes, strokeWidth = 2, duration = 300, easing: _easing = 'ease-in-out', size = 'md', viewBox = '0 0 24 24', className, style, 'aria-label': ariaLabel, onTransitionEnd, }, ref) => {
|
|
47
48
|
var _a;
|
|
48
49
|
const svgRef = React.useRef(null);
|
|
49
50
|
const animRef = React.useRef(0);
|
|
@@ -111,8 +112,7 @@ const NtdStateMorph = React.forwardRef(({ states, currentState, fills, strokes,
|
|
|
111
112
|
getSvgElement: () => svgRef.current,
|
|
112
113
|
}));
|
|
113
114
|
return (jsxRuntime.jsx("svg", { ref: svgRef, xmlns: "http://www.w3.org/2000/svg", viewBox: viewBox, width: resolvedSize, height: resolvedSize, fill: "none", className: className, style: style, "aria-label": ariaLabel, role: ariaLabel ? 'img' : undefined, children: jsxRuntime.jsx("path", { d: currentPath, fill: currentFill, stroke: currentStroke, strokeWidth: strokeWidth, strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
114
|
-
});
|
|
115
|
-
NtdStateMorph.displayName = 'NtdStateMorph';
|
|
115
|
+
}), { displayName: 'NtdStateMorph' });
|
|
116
116
|
/* ────────────────────────────────────────────────────────────────────────────
|
|
117
117
|
COLOR INTERPOLATION
|
|
118
118
|
───────────────────────────────────────────────────────────────────────────── */
|
|
@@ -239,7 +239,7 @@ function useAnimationSequence(config) {
|
|
|
239
239
|
* </AnimationController>
|
|
240
240
|
* ```
|
|
241
241
|
*/
|
|
242
|
-
const AnimationController = React.forwardRef(function AnimationController(props, ref) {
|
|
242
|
+
const AnimationController = /* @__PURE__ */ React.forwardRef(function AnimationController(props, ref) {
|
|
243
243
|
const { children, animation, autoPlay = false, playState: externalPlayState, onStart, onEnd, onStepChange, onPause, onResume, className, style, } = props;
|
|
244
244
|
// Determine if sequence or single animation
|
|
245
245
|
const isSequence = isSequenceConfig(animation);
|
|
@@ -424,7 +424,7 @@ const AnimationController = React.forwardRef(function AnimationController(props,
|
|
|
424
424
|
* </InteractiveIcon>
|
|
425
425
|
* ```
|
|
426
426
|
*/
|
|
427
|
-
const InteractiveIcon = React.forwardRef(function InteractiveIcon(props, ref) {
|
|
427
|
+
const InteractiveIcon = /* @__PURE__ */ React.forwardRef(function InteractiveIcon(props, ref) {
|
|
428
428
|
const { children, config, disabled = false, onInteractionStart, onInteractionEnd, className, style, } = props;
|
|
429
429
|
const [isActive, setIsActive] = React.useState(false);
|
|
430
430
|
const [isLeaving, setIsLeaving] = React.useState(false);
|
|
@@ -538,7 +538,14 @@ const InteractiveIcon = React.forwardRef(function InteractiveIcon(props, ref) {
|
|
|
538
538
|
display: 'inline-flex',
|
|
539
539
|
cursor: disabled ? 'default' : config.trigger === 'click' ? 'pointer' : undefined,
|
|
540
540
|
...style,
|
|
541
|
-
}, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onClick: handleClick,
|
|
541
|
+
}, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onClick: handleClick, onKeyDown: handleClick
|
|
542
|
+
? (e) => {
|
|
543
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
544
|
+
e.preventDefault();
|
|
545
|
+
handleClick();
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
: undefined, onFocus: handleFocus, onBlur: handleBlur, tabIndex: config.trigger === 'focus' || config.trigger === 'click' ? 0 : undefined, role: config.trigger === 'click' ? 'button' : undefined, children: animatedChild }));
|
|
542
549
|
});
|
|
543
550
|
/* ────────────────────────────────────────────────────────────────────────────
|
|
544
551
|
6. UTILITY FUNCTIONS
|
package/dist/cjs/createIcon.js
CHANGED
|
@@ -7,14 +7,17 @@ var smilAnimations = require('./smilAnimations.js');
|
|
|
7
7
|
var types = require('./types.js');
|
|
8
8
|
|
|
9
9
|
/* ── Dark mode detection hook ───────────────────────── */
|
|
10
|
+
// No `matchMedia` (jsdom without a polyfill, some embedded webviews): light, and nothing to
|
|
11
|
+
// subscribe to — an icon must not throw where a page renders.
|
|
12
|
+
const hasMatchMedia = () => typeof window !== 'undefined' && typeof window.matchMedia === 'function';
|
|
10
13
|
function getColorScheme() {
|
|
11
|
-
if (
|
|
14
|
+
if (!hasMatchMedia()) {
|
|
12
15
|
return 'light';
|
|
13
16
|
}
|
|
14
17
|
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
15
18
|
}
|
|
16
19
|
function subscribeColorScheme(callback) {
|
|
17
|
-
if (
|
|
20
|
+
if (!hasMatchMedia()) {
|
|
18
21
|
return () => { };
|
|
19
22
|
}
|
|
20
23
|
const mq = window.matchMedia('(prefers-color-scheme: dark)');
|
|
@@ -49,12 +52,6 @@ function useColorScheme() {
|
|
|
49
52
|
* <path d="..." stroke={primaryColor} fill="none" />
|
|
50
53
|
* </>
|
|
51
54
|
* ),
|
|
52
|
-
* flat: ({ primaryColor, secondaryColor }) => (
|
|
53
|
-
* <>
|
|
54
|
-
* <rect x="2" y="2" width="20" height="20" rx="4" fill={secondaryColor} />
|
|
55
|
-
* <path d="..." fill={primaryColor} />
|
|
56
|
-
* </>
|
|
57
|
-
* ),
|
|
58
55
|
* },
|
|
59
56
|
* });
|
|
60
57
|
* ```
|
|
@@ -158,8 +155,7 @@ function createIcon(options) {
|
|
|
158
155
|
const is3d = variant === '3d';
|
|
159
156
|
const filterId = React.useId();
|
|
160
157
|
// Cutout variant uses SVG mask for knockout/cutout effect
|
|
161
|
-
|
|
162
|
-
const isCutout = variant === 'cutout' || variant === 'flat';
|
|
158
|
+
const isCutout = variant === 'cutout';
|
|
163
159
|
const maskId = React.useId();
|
|
164
160
|
const classes = ['ntd-icon', animation ? `ntd-anim-${animation}` : '', className !== null && className !== void 0 ? className : '']
|
|
165
161
|
.filter(Boolean)
|
package/dist/cjs/headless-ui.js
CHANGED
|
@@ -38,7 +38,8 @@ var React = require('react');
|
|
|
38
38
|
* Simple Slot implementation for asChild pattern.
|
|
39
39
|
* Compatible with Radix UI's Slot component behavior.
|
|
40
40
|
*/
|
|
41
|
-
const Slot =
|
|
41
|
+
const Slot = /* @__PURE__ */ Object.assign(
|
|
42
|
+
/* @__PURE__ */ React.forwardRef(({ children, ...props }, forwardedRef) => {
|
|
42
43
|
if (!React.isValidElement(children)) {
|
|
43
44
|
return null;
|
|
44
45
|
}
|
|
@@ -47,8 +48,7 @@ const Slot = React.forwardRef(({ children, ...props }, forwardedRef) => {
|
|
|
47
48
|
...children.props,
|
|
48
49
|
ref: forwardedRef,
|
|
49
50
|
});
|
|
50
|
-
});
|
|
51
|
-
Slot.displayName = 'Slot';
|
|
51
|
+
}), { displayName: 'Slot' });
|
|
52
52
|
/* ────────────────────────────────────────────────────────────────────────────
|
|
53
53
|
FORWARD REF WRAPPER
|
|
54
54
|
───────────────────────────────────────────────────────────────────────────── */
|
package/dist/cjs/iconStyles.js
CHANGED
|
@@ -19,7 +19,8 @@ const overlayBase = {
|
|
|
19
19
|
// 1. NtdIconFloral 🌸
|
|
20
20
|
// Botanical vines, leaves & flowers wrapping the icon
|
|
21
21
|
// ══════════════════════════════════════════════════════
|
|
22
|
-
const NtdIconFloral =
|
|
22
|
+
const NtdIconFloral = /* @__PURE__ */ Object.assign(
|
|
23
|
+
/* @__PURE__ */ React.forwardRef(({ children, animate = true, duration = 2, intensity = 'normal', vineColor = '#22c55e', petalColor = '#f472b6', leafColor, className, style, }, ref) => {
|
|
23
24
|
const lc = leafColor !== null && leafColor !== void 0 ? leafColor : vineColor;
|
|
24
25
|
const dur = `${duration}s`;
|
|
25
26
|
const halfDur = `${duration * 0.5}s`;
|
|
@@ -68,13 +69,13 @@ const NtdIconFloral = React.forwardRef(({ children, animate = true, duration = 2
|
|
|
68
69
|
];
|
|
69
70
|
const dashLen = 250;
|
|
70
71
|
return (jsxRuntime.jsxs("span", { ref: ref, className: className, style: { ...wrapperBase, ...style }, children: [children, jsxRuntime.jsxs("svg", { viewBox: "0 0 100 100", style: { ...overlayBase, inset: '-30%', width: '160%', height: '160%' }, "aria-hidden": true, children: [[vine1, vine2, ...(showExtra ? [vine3, vine4] : [])].map((d, i) => (jsxRuntime.jsx("path", { d: d, fill: "none", stroke: vineColor, strokeWidth: i < 2 ? 1.5 : 1, strokeLinecap: "round", opacity: i < 2 ? 0.85 : 0.55, ...(animate ? { strokeDasharray: dashLen, strokeDashoffset: dashLen } : {}), children: animate && (jsxRuntime.jsx("animate", { attributeName: "stroke-dashoffset", from: `${dashLen}`, to: "0", dur: dur, fill: "freeze", begin: i < 2 ? '0s' : `${duration * 0.3}s` })) }, `v${i}`))), allLeaves.map((l, i) => (jsxRuntime.jsx("g", { transform: `translate(${l.x},${l.y}) rotate(${l.a})`, children: jsxRuntime.jsxs("g", { opacity: animate ? 0 : 0.8, children: [jsxRuntime.jsx("path", { d: leafD, fill: lc }), jsxRuntime.jsx("line", { x1: 0, y1: -3, x2: 0, y2: 2.5, stroke: lc, strokeWidth: "0.4", opacity: 0.4 }), animate && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("animate", { attributeName: "opacity", from: "0", to: "0.8", dur: halfDur, begin: bloomAt, fill: "freeze" }), jsxRuntime.jsx("animateTransform", { attributeName: "transform", type: "scale", values: "0 0;1 1", keyTimes: "0;1", keySplines: "0.34 1 0.64 1", calcMode: "spline", dur: halfDur, begin: bloomAt, fill: "freeze" })] }))] }) }, `l${i}`))), flowerPositions.map((f, fi) => (jsxRuntime.jsxs("g", { opacity: animate ? 0 : 1, children: [petalOffsets.map(([ox, oy], pi) => (jsxRuntime.jsx("circle", { cx: f.x + ox * f.r, cy: f.y + oy * f.r, r: f.r * 0.5, fill: petalColor, opacity: 0.85 }, pi))), jsxRuntime.jsx("circle", { cx: f.x, cy: f.y, r: f.r * 0.3, fill: "#fde047" }), animate && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("animate", { attributeName: "opacity", from: "0", to: "1", dur: halfDur, begin: flowerAt, fill: "freeze" }), jsxRuntime.jsx("animateTransform", { attributeName: "transform", type: "scale", values: "0.3 0.3;1 1", keyTimes: "0;1", keySplines: "0.34 1 0.64 1", calcMode: "spline", dur: halfDur, begin: flowerAt, fill: "freeze" })] }))] }, `f${fi}`))), animate && (jsxRuntime.jsx("animateTransform", { attributeName: "transform", type: "rotate", values: "0 50 50;1 50 50;-1 50 50;0 50 50", dur: "4s", repeatCount: "indefinite", begin: `${duration}s` }))] })] }));
|
|
71
|
-
});
|
|
72
|
-
NtdIconFloral.displayName = 'NtdIconFloral';
|
|
72
|
+
}), { displayName: 'NtdIconFloral' });
|
|
73
73
|
// ══════════════════════════════════════════════════════
|
|
74
74
|
// 2. NtdIconFestive 🎉
|
|
75
75
|
// Confetti burst, stars & sparkles
|
|
76
76
|
// ══════════════════════════════════════════════════════
|
|
77
|
-
const NtdIconFestive =
|
|
77
|
+
const NtdIconFestive = /* @__PURE__ */ Object.assign(
|
|
78
|
+
/* @__PURE__ */ React.forwardRef(({ children, animate = true, duration = 1.5, intensity = 'normal', colors, sparkleColor = '#fbbf24', className, style, }, ref) => {
|
|
78
79
|
const cols = colors !== null && colors !== void 0 ? colors : ['#ef4444', '#f59e0b', '#22c55e', '#3b82f6', '#a855f7', '#ec4899'];
|
|
79
80
|
const dur = `${duration * 0.6}s`;
|
|
80
81
|
// Confetti pieces: position relative to center, rotation, color index
|
|
@@ -140,13 +141,13 @@ const NtdIconFestive = React.forwardRef(({ children, animate = true, duration =
|
|
|
140
141
|
const col = cols[c.ci % cols.length];
|
|
141
142
|
return (jsxRuntime.jsx("g", { transform: "translate(50,50)", children: jsxRuntime.jsxs("g", { opacity: animate ? 0 : 0.85, children: [jsxRuntime.jsx("rect", { x: c.x - 50 - 1.5, y: c.y - 50 - 3, width: 3, height: 6, rx: 0.5, fill: col, transform: `rotate(${c.r} ${c.x - 50} ${c.y - 50})` }), animate && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("animate", { attributeName: "opacity", from: "0", to: "0.85", dur: "0.4s", begin: delay, fill: "freeze" }), jsxRuntime.jsx("animateTransform", { attributeName: "transform", type: "scale", values: "0 0;1 1", keyTimes: "0;1", keySplines: "0.34 1 0.64 1", calcMode: "spline", dur: dur, begin: delay, fill: "freeze" })] }))] }) }, `c${i}`));
|
|
142
143
|
}), stars.map((s, i) => (jsxRuntime.jsxs("g", { transform: `translate(${s.x},${s.y}) scale(${s.s})`, children: [jsxRuntime.jsx("path", { d: starD, fill: sparkleColor, opacity: animate ? 0 : 0.9, children: animate && (jsxRuntime.jsx("animate", { attributeName: "opacity", from: "0", to: "0.9", dur: "0.5s", begin: `${(i * 0.15 + 0.3).toFixed(2)}s`, fill: "freeze" })) }), animate && (jsxRuntime.jsx("animateTransform", { attributeName: "transform", type: "scale", values: `${s.s};${s.s * 1.3};${s.s}`, dur: "1.5s", repeatCount: "indefinite", begin: `${duration + 0.5}s` }))] }, `s${i}`))), sparkles.map((sp, i) => (jsxRuntime.jsx("circle", { cx: sp.cx, cy: sp.cy, r: sp.r, fill: sparkleColor, opacity: animate ? 0 : 0.7, children: animate && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("animate", { attributeName: "opacity", from: "0", to: "0.7", dur: "0.3s", begin: `${(duration * 0.4 + i * 0.08).toFixed(2)}s`, fill: "freeze" }), jsxRuntime.jsx("animate", { attributeName: "opacity", values: "0.3;0.9;0.3", dur: `${1 + i * 0.3}s`, repeatCount: "indefinite", begin: `${duration}s` })] })) }, `sp${i}`)))] })] }));
|
|
143
|
-
});
|
|
144
|
-
NtdIconFestive.displayName = 'NtdIconFestive';
|
|
144
|
+
}), { displayName: 'NtdIconFestive' });
|
|
145
145
|
// ══════════════════════════════════════════════════════
|
|
146
146
|
// 3. NtdIconNeon 💡
|
|
147
147
|
// Multi-layered glow with neon sign flicker
|
|
148
148
|
// ══════════════════════════════════════════════════════
|
|
149
|
-
const NtdIconNeon =
|
|
149
|
+
const NtdIconNeon = /* @__PURE__ */ Object.assign(
|
|
150
|
+
/* @__PURE__ */ React.forwardRef(({ children, animate = true, duration = 4, intensity = 'normal', glowColor = '#0ff', secondaryGlow, flicker = true, className, style, }, ref) => {
|
|
150
151
|
const uid = React.useId().replace(/[^a-zA-Z0-9]/g, '_');
|
|
151
152
|
const glow2 = secondaryGlow !== null && secondaryGlow !== void 0 ? secondaryGlow : glowColor;
|
|
152
153
|
const blur = intensity === 'dense' ? 8 : intensity === 'subtle' ? 3 : 5;
|
|
@@ -171,13 +172,13 @@ const NtdIconNeon = React.forwardRef(({ children, animate = true, duration = 4,
|
|
|
171
172
|
filter: filterValue,
|
|
172
173
|
...(animate && flicker ? { animation: `${animName} ${duration}s infinite` } : {}),
|
|
173
174
|
}, children: children })] }));
|
|
174
|
-
});
|
|
175
|
-
NtdIconNeon.displayName = 'NtdIconNeon';
|
|
175
|
+
}), { displayName: 'NtdIconNeon' });
|
|
176
176
|
// ══════════════════════════════════════════════════════
|
|
177
177
|
// 4. NtdIconSketch ✏️
|
|
178
178
|
// Hand-drawn look with SVG turbulence + scribble overlay
|
|
179
179
|
// ══════════════════════════════════════════════════════
|
|
180
|
-
const NtdIconSketch =
|
|
180
|
+
const NtdIconSketch = /* @__PURE__ */ Object.assign(
|
|
181
|
+
/* @__PURE__ */ React.forwardRef(({ children, animate = true, duration = 1.5, intensity = 'normal', strokeColor = '#374151', roughness = 2, className, style, }, ref) => {
|
|
181
182
|
const uid = React.useId().replace(/[^a-zA-Z0-9]/g, '_');
|
|
182
183
|
const filterId = `ntd_sketch_${uid}`;
|
|
183
184
|
const dur = `${duration}s`;
|
|
@@ -197,13 +198,13 @@ const NtdIconSketch = React.forwardRef(({ children, animate = true, duration = 1
|
|
|
197
198
|
];
|
|
198
199
|
return (jsxRuntime.jsxs("span", { ref: ref, className: className, style: { ...wrapperBase, ...style }, children: [jsxRuntime.jsx("svg", { style: { position: 'absolute', width: 0, height: 0 }, "aria-hidden": true, children: jsxRuntime.jsx("defs", { children: jsxRuntime.jsxs("filter", { id: filterId, children: [jsxRuntime.jsx("feTurbulence", { type: "turbulence", baseFrequency: 0.02 + roughness * 0.008, numOctaves: 3, seed: 2, result: "noise" }), jsxRuntime.jsx("feDisplacementMap", { in: "SourceGraphic", in2: "noise", scale: roughness, xChannelSelector: "R", yChannelSelector: "G" })] }) }) }), jsxRuntime.jsx("span", { style: { display: 'inline-flex', filter: `url(#${filterId})` }, children: children }), jsxRuntime.jsxs("svg", { viewBox: "0 0 100 100", style: { ...overlayBase, inset: '-20%', width: '140%', height: '140%' }, "aria-hidden": true, children: [jsxRuntime.jsx("path", { d: scribbleMain, fill: "none", stroke: strokeColor, strokeWidth: "1", strokeLinecap: "round", opacity: 0.5, ...(animate ? { strokeDasharray: dashLen, strokeDashoffset: dashLen } : {}), children: animate && (jsxRuntime.jsx("animate", { attributeName: "stroke-dashoffset", from: `${dashLen}`, to: "0", dur: dur, fill: "freeze" })) }), intensity !== 'subtle' &&
|
|
199
200
|
scribbleExtra.slice(0, intensity === 'dense' ? 2 : 1).map((d, i) => (jsxRuntime.jsx("path", { d: d, fill: "none", stroke: strokeColor, strokeWidth: "0.8", strokeLinecap: "round", opacity: 0.35, ...(animate ? { strokeDasharray: dashLen, strokeDashoffset: dashLen } : {}), children: animate && (jsxRuntime.jsx("animate", { attributeName: "stroke-dashoffset", from: `${dashLen}`, to: "0", dur: dur, fill: "freeze", begin: `${0.3 + i * 0.2}s` })) }, `se${i}`))), hatchPositions.slice(0, hatchCount).map((p, i) => (jsxRuntime.jsx("line", { x1: p.x1, y1: p.y1, x2: p.x2, y2: p.y2, stroke: strokeColor, strokeWidth: "0.6", strokeLinecap: "round", opacity: animate ? 0 : 0.3, children: animate && (jsxRuntime.jsx("animate", { attributeName: "opacity", from: "0", to: "0.3", dur: "0.3s", begin: `${duration * 0.7 + i * 0.1}s`, fill: "freeze" })) }, `h${i}`)))] })] }));
|
|
200
|
-
});
|
|
201
|
-
NtdIconSketch.displayName = 'NtdIconSketch';
|
|
201
|
+
}), { displayName: 'NtdIconSketch' });
|
|
202
202
|
// ══════════════════════════════════════════════════════
|
|
203
203
|
// 5. NtdIconWatercolor 🎨
|
|
204
204
|
// Soft paint blobs & bleed effect behind the icon
|
|
205
205
|
// ══════════════════════════════════════════════════════
|
|
206
|
-
const NtdIconWatercolor =
|
|
206
|
+
const NtdIconWatercolor = /* @__PURE__ */ Object.assign(
|
|
207
|
+
/* @__PURE__ */ React.forwardRef(({ children, animate = true, duration = 2, intensity = 'normal', tintColor = '#818cf8', bleedColor = '#f0abfc', className, style, }, ref) => {
|
|
207
208
|
const uid = React.useId().replace(/[^a-zA-Z0-9]/g, '_');
|
|
208
209
|
const filterId = `ntd_wc_${uid}`;
|
|
209
210
|
const blobFilter = `${filterId}_blob`;
|
|
@@ -246,13 +247,13 @@ const NtdIconWatercolor = React.forwardRef(({ children, animate = true, duration
|
|
|
246
247
|
position: 'relative',
|
|
247
248
|
zIndex: 1,
|
|
248
249
|
}, children: children })] }));
|
|
249
|
-
});
|
|
250
|
-
NtdIconWatercolor.displayName = 'NtdIconWatercolor';
|
|
250
|
+
}), { displayName: 'NtdIconWatercolor' });
|
|
251
251
|
// ══════════════════════════════════════════════════════
|
|
252
252
|
// 6. NtdIconCosmic ✨
|
|
253
253
|
// Stars, nebula glow & constellation lines
|
|
254
254
|
// ══════════════════════════════════════════════════════
|
|
255
|
-
const NtdIconCosmic =
|
|
255
|
+
const NtdIconCosmic = /* @__PURE__ */ Object.assign(
|
|
256
|
+
/* @__PURE__ */ React.forwardRef(({ children, animate = true, duration = 2, intensity = 'normal', starColor = '#e2e8f0', nebulaColor = '#7c3aed', nebulaColor2 = '#2563eb', className, style, }, ref) => {
|
|
256
257
|
const uid = React.useId().replace(/[^a-zA-Z0-9]/g, '_');
|
|
257
258
|
const nebulaFilter = `ntd_cosm_${uid}`;
|
|
258
259
|
// Stars
|
|
@@ -305,7 +306,9 @@ const NtdIconCosmic = React.forwardRef(({ children, animate = true, duration = 2
|
|
|
305
306
|
const nebulae = [
|
|
306
307
|
{ cx: 25, cy: 25, r: 16, color: nebulaColor, op: 0.12 },
|
|
307
308
|
{ cx: 75, cy: 75, r: 18, color: nebulaColor2, op: 0.1 },
|
|
308
|
-
...(intensity !== 'subtle'
|
|
309
|
+
...(intensity !== 'subtle'
|
|
310
|
+
? [{ cx: 50, cy: 50, r: 14, color: nebulaColor, op: 0.08 }]
|
|
311
|
+
: []),
|
|
309
312
|
...(intensity === 'dense'
|
|
310
313
|
? [
|
|
311
314
|
{ cx: 80, cy: 20, r: 12, color: nebulaColor2, op: 0.09 },
|
|
@@ -315,13 +318,13 @@ const NtdIconCosmic = React.forwardRef(({ children, animate = true, duration = 2
|
|
|
315
318
|
];
|
|
316
319
|
const lineLen = 80;
|
|
317
320
|
return (jsxRuntime.jsxs("span", { ref: ref, className: className, style: { ...wrapperBase, ...style }, children: [jsxRuntime.jsx("svg", { style: { position: 'absolute', width: 0, height: 0 }, "aria-hidden": true, children: jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("filter", { id: nebulaFilter, children: jsxRuntime.jsx("feGaussianBlur", { stdDeviation: "4" }) }) }) }), jsxRuntime.jsxs("svg", { viewBox: "0 0 100 100", style: { ...overlayBase, inset: '-30%', width: '160%', height: '160%', zIndex: 0 }, "aria-hidden": true, children: [nebulae.map((n, i) => (jsxRuntime.jsx("circle", { cx: n.cx, cy: n.cy, r: n.r, fill: n.color, opacity: animate ? 0 : n.op, filter: `url(#${nebulaFilter})`, children: animate && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("animate", { attributeName: "opacity", from: "0", to: `${n.op}`, dur: `${duration}s`, fill: "freeze" }), jsxRuntime.jsx("animate", { attributeName: "opacity", values: `${n.op};${n.op * 1.5};${n.op}`, dur: "5s", repeatCount: "indefinite", begin: `${duration}s` }), jsxRuntime.jsx("animate", { attributeName: "r", values: `${n.r};${n.r * 1.1};${n.r}`, dur: "6s", repeatCount: "indefinite", begin: `${duration}s` })] })) }, `nb${i}`))), constellations.map((c, i) => (jsxRuntime.jsx("line", { x1: c.from[0], y1: c.from[1], x2: c.to[0], y2: c.to[1], stroke: starColor, strokeWidth: "0.3", opacity: 0.25, ...(animate ? { strokeDasharray: lineLen, strokeDashoffset: lineLen } : {}), children: animate && (jsxRuntime.jsx("animate", { attributeName: "stroke-dashoffset", from: `${lineLen}`, to: "0", dur: `${duration * 0.8}s`, begin: `${(i * 0.2).toFixed(1)}s`, fill: "freeze" })) }, `cl${i}`)))] }), jsxRuntime.jsx("span", { style: { display: 'inline-flex', position: 'relative', zIndex: 1 }, children: children }), jsxRuntime.jsxs("svg", { viewBox: "0 0 100 100", style: { ...overlayBase, inset: '-30%', width: '160%', height: '160%', zIndex: 2 }, "aria-hidden": true, children: [allStars.map((s, i) => (jsxRuntime.jsx("circle", { cx: s.cx, cy: s.cy, r: s.r, fill: starColor, opacity: animate ? 0 : 0.8, children: animate && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("animate", { attributeName: "opacity", from: "0", to: "0.8", dur: `${duration * 0.5}s`, begin: `${(i * 0.1).toFixed(2)}s`, fill: "freeze" }), jsxRuntime.jsx("animate", { attributeName: "opacity", values: "0.4;1;0.4", dur: `${1.5 + (i % 4) * 0.4}s`, repeatCount: "indefinite", begin: `${duration}s` }), jsxRuntime.jsx("animate", { attributeName: "r", values: `${s.r};${s.r * 1.4};${s.r}`, dur: `${2 + (i % 3) * 0.5}s`, repeatCount: "indefinite", begin: `${duration}s` })] })) }, `st${i}`))), animate && (jsxRuntime.jsx("animateTransform", { attributeName: "transform", type: "rotate", from: "0 50 50", to: "360 50 50", dur: "120s", repeatCount: "indefinite" }))] })] }));
|
|
318
|
-
});
|
|
319
|
-
NtdIconCosmic.displayName = 'NtdIconCosmic';
|
|
321
|
+
}), { displayName: 'NtdIconCosmic' });
|
|
320
322
|
// ══════════════════════════════════════════════════════
|
|
321
323
|
// 7. NtdIconSteampunk ⚙️
|
|
322
324
|
// Rotating gears, copper pipes, brass rivets & steam puffs
|
|
323
325
|
// ══════════════════════════════════════════════════════
|
|
324
|
-
const NtdIconSteampunk =
|
|
326
|
+
const NtdIconSteampunk = /* @__PURE__ */ Object.assign(
|
|
327
|
+
/* @__PURE__ */ React.forwardRef(({ children, animate = true, duration = 3, intensity = 'normal', brassColor = '#b45309', pipeColor = '#78350f', steamColor = '#d1d5db', className, style, }, ref) => {
|
|
325
328
|
// Build toothed gear path from a center point, radius and tooth count
|
|
326
329
|
const makeGear = (cx, cy, r, teeth) => {
|
|
327
330
|
const inner = r * 0.68;
|
|
@@ -387,13 +390,13 @@ const NtdIconSteampunk = React.forwardRef(({ children, animate = true, duration
|
|
|
387
390
|
];
|
|
388
391
|
return (jsxRuntime.jsxs("span", { ref: ref, className: className, style: { ...wrapperBase, ...style }, children: [jsxRuntime.jsxs("svg", { viewBox: "0 0 100 100", style: { ...overlayBase, inset: '-20%', width: '140%', height: '140%', zIndex: 0 }, "aria-hidden": true, children: [pipes.map((p, i) => (jsxRuntime.jsx("path", { d: p.d, stroke: pipeColor, strokeWidth: p.w, fill: "none", strokeLinecap: "round", opacity: 0.55 }, `pipe${i}`))), rivets.map((rv, i) => (jsxRuntime.jsx("circle", { cx: rv.cx, cy: rv.cy, r: 1.5, fill: brassColor, opacity: 0.7 }, `rv${i}`)))] }), jsxRuntime.jsx("span", { style: { display: 'inline-flex', position: 'relative', zIndex: 1 }, children: children }), jsxRuntime.jsxs("svg", { viewBox: "0 0 100 100", style: { ...overlayBase, inset: '-20%', width: '140%', height: '140%', zIndex: 2 }, "aria-hidden": true, children: [gears.map((g, i) => (jsxRuntime.jsxs("g", { children: [jsxRuntime.jsx("path", { d: makeGear(g.cx, g.cy, g.r, g.teeth), fill: brassColor, opacity: 0.78, children: animate && (jsxRuntime.jsx("animateTransform", { attributeName: "transform", type: "rotate", from: `0 ${g.cx} ${g.cy}`, to: `${g.dir * 360} ${g.cx} ${g.cy}`, dur: `${duration * g.dm}s`, repeatCount: "indefinite" })) }), jsxRuntime.jsx("circle", { cx: g.cx, cy: g.cy, r: g.r * 0.3, fill: pipeColor, opacity: 0.85 }), jsxRuntime.jsx("circle", { cx: g.cx, cy: g.cy, r: g.r * 0.12, fill: brassColor, opacity: 0.6 })] }, `gear${i}`))), animate &&
|
|
389
392
|
steamPuffs.map((sp, i) => (jsxRuntime.jsxs("circle", { cx: sp.cx, cy: sp.cy, r: sp.r, fill: steamColor, opacity: 0, children: [jsxRuntime.jsx("animate", { attributeName: "opacity", values: "0;0.45;0", dur: "2.4s", begin: `${i * 0.7}s`, repeatCount: "indefinite" }), jsxRuntime.jsx("animate", { attributeName: "cy", values: `${sp.cy};${sp.cy - 12}`, dur: "2.4s", begin: `${i * 0.7}s`, repeatCount: "indefinite" }), jsxRuntime.jsx("animate", { attributeName: "r", values: `${sp.r};${sp.r * 2.2}`, dur: "2.4s", begin: `${i * 0.7}s`, repeatCount: "indefinite" })] }, `stm${i}`)))] })] }));
|
|
390
|
-
});
|
|
391
|
-
NtdIconSteampunk.displayName = 'NtdIconSteampunk';
|
|
393
|
+
}), { displayName: 'NtdIconSteampunk' });
|
|
392
394
|
// ══════════════════════════════════════════════════════
|
|
393
395
|
// 8. NtdIconFrost ❄️
|
|
394
396
|
// Hexagonal snowflake crystals, sparkles & frozen glow
|
|
395
397
|
// ══════════════════════════════════════════════════════
|
|
396
|
-
const NtdIconFrost =
|
|
398
|
+
const NtdIconFrost = /* @__PURE__ */ Object.assign(
|
|
399
|
+
/* @__PURE__ */ React.forwardRef(({ children, animate = true, duration = 2, intensity = 'normal', crystalColor = '#bae6fd', glowColor = '#38bdf8', className, style, }, ref) => {
|
|
397
400
|
const uid = React.useId().replace(/[^a-zA-Z0-9]/g, '_');
|
|
398
401
|
const glowFilterId = `ntd_frost_${uid}`;
|
|
399
402
|
const crystalDefs = [
|
|
@@ -453,13 +456,13 @@ const NtdIconFrost = React.forwardRef(({ children, animate = true, duration = 2,
|
|
|
453
456
|
{ cx: 86, cy: 96, r: 1.1 },
|
|
454
457
|
];
|
|
455
458
|
return (jsxRuntime.jsxs("span", { ref: ref, className: className, style: { ...wrapperBase, ...style }, children: [jsxRuntime.jsx("svg", { style: { position: 'absolute', width: 0, height: 0 }, "aria-hidden": true, children: jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("filter", { id: glowFilterId, children: jsxRuntime.jsx("feGaussianBlur", { stdDeviation: "6" }) }) }) }), jsxRuntime.jsxs("svg", { viewBox: "0 0 100 100", style: { ...overlayBase, inset: '-25%', width: '150%', height: '150%', zIndex: 0 }, "aria-hidden": true, children: [jsxRuntime.jsx("circle", { cx: "50", cy: "50", r: "30", fill: glowColor, opacity: 0.07, filter: `url(#${glowFilterId})`, children: animate && (jsxRuntime.jsx("animate", { attributeName: "opacity", values: "0.04;0.11;0.04", dur: "4s", repeatCount: "indefinite" })) }), allArms.map((arm, i) => (jsxRuntime.jsx("line", { x1: arm.x1, y1: arm.y1, x2: arm.x2, y2: arm.y2, stroke: crystalColor, strokeWidth: "0.9", strokeLinecap: "round", opacity: animate ? 0 : 0.7, children: animate && (jsxRuntime.jsx("animate", { attributeName: "opacity", from: "0", to: "0.7", dur: `${duration * 0.4}s`, begin: `${arm.delay.toFixed(2)}s`, fill: "freeze" })) }, `arm${i}`))), allTicks.map((tick, i) => (jsxRuntime.jsx("line", { x1: tick.x1, y1: tick.y1, x2: tick.x2, y2: tick.y2, stroke: crystalColor, strokeWidth: "0.6", strokeLinecap: "round", opacity: animate ? 0 : 0.45, children: animate && (jsxRuntime.jsx("animate", { attributeName: "opacity", from: "0", to: "0.45", dur: `${duration * 0.3}s`, begin: `${tick.delay.toFixed(2)}s`, fill: "freeze" })) }, `tick${i}`))), sparkles.slice(0, intensity === 'subtle' ? 4 : 8).map((sp, i) => (jsxRuntime.jsx("circle", { cx: sp.cx, cy: sp.cy, r: sp.r, fill: glowColor, opacity: animate ? 0 : 0.8, children: animate && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("animate", { attributeName: "opacity", from: "0", to: "0.8", dur: "0.35s", begin: `${(duration * 0.65 + i * 0.08).toFixed(2)}s`, fill: "freeze" }), jsxRuntime.jsx("animate", { attributeName: "opacity", values: "0.3;1;0.3", dur: `${1 + i * 0.2}s`, repeatCount: "indefinite", begin: `${duration}s` })] })) }, `fsp${i}`)))] }), jsxRuntime.jsx("span", { style: { display: 'inline-flex', position: 'relative', zIndex: 1 }, children: children })] }));
|
|
456
|
-
});
|
|
457
|
-
NtdIconFrost.displayName = 'NtdIconFrost';
|
|
459
|
+
}), { displayName: 'NtdIconFrost' });
|
|
458
460
|
// ══════════════════════════════════════════════════════
|
|
459
461
|
// 9. NtdIconPixel 👾
|
|
460
462
|
// Retro pixel corners, scanline scroll & glitch animation
|
|
461
463
|
// ══════════════════════════════════════════════════════
|
|
462
|
-
const NtdIconPixel =
|
|
464
|
+
const NtdIconPixel = /* @__PURE__ */ Object.assign(
|
|
465
|
+
/* @__PURE__ */ React.forwardRef(({ children, animate = true, duration = 0.5, intensity = 'normal', pixelColor = '#22d3ee', scanlineColor = '#000000', glitchEffect = true, className, style, }, ref) => {
|
|
463
466
|
const uid = React.useId().replace(/[^a-zA-Z0-9]/g, '_');
|
|
464
467
|
const scanAnimName = `ntd_pixel_scan_${uid}`;
|
|
465
468
|
const glitchAnimName = `ntd_pixel_glitch_${uid}`;
|
|
@@ -531,13 +534,13 @@ const NtdIconPixel = React.forwardRef(({ children, animate = true, duration = 0.
|
|
|
531
534
|
background: `linear-gradient(transparent, ${pixelColor}20, transparent)`,
|
|
532
535
|
animation: `${scanAnimName} ${duration + 2}s linear infinite`,
|
|
533
536
|
} }) }))] }));
|
|
534
|
-
});
|
|
535
|
-
NtdIconPixel.displayName = 'NtdIconPixel';
|
|
537
|
+
}), { displayName: 'NtdIconPixel' });
|
|
536
538
|
// ══════════════════════════════════════════════════════
|
|
537
539
|
// 10. NtdIconOrganic 🦠
|
|
538
540
|
// Pulsing cell blobs, membrane rings & floating bubbles
|
|
539
541
|
// ══════════════════════════════════════════════════════
|
|
540
|
-
const NtdIconOrganic =
|
|
542
|
+
const NtdIconOrganic = /* @__PURE__ */ Object.assign(
|
|
543
|
+
/* @__PURE__ */ React.forwardRef(({ children, animate = true, duration = 3, intensity = 'normal', cellColor = '#86efac', membraneColor = '#4ade80', nucleusColor = '#fbbf24', className, style, }, ref) => {
|
|
541
544
|
const uid = React.useId().replace(/[^a-zA-Z0-9]/g, '_');
|
|
542
545
|
const blobFilterId = `ntd_org_${uid}`;
|
|
543
546
|
const cells = [
|
|
@@ -576,14 +579,14 @@ const NtdIconOrganic = React.forwardRef(({ children, animate = true, duration =
|
|
|
576
579
|
{ cx: 8, cy: 8, r: 10 },
|
|
577
580
|
{ cx: 92, cy: 92, r: 10 },
|
|
578
581
|
].map((ring, i) => (jsxRuntime.jsx("circle", { cx: ring.cx, cy: ring.cy, r: ring.r, fill: "none", stroke: membraneColor, strokeWidth: "0.7", opacity: animate ? 0 : 0.35, children: animate && (jsxRuntime.jsx("animate", { attributeName: "opacity", from: "0", to: "0.35", dur: `${duration * 0.7}s`, fill: "freeze" })) }, `ring${i}`))), bubbles.slice(0, bubbleCount).map((b, i) => (jsxRuntime.jsx("circle", { cx: b.cx, cy: b.cy, r: b.r, fill: nucleusColor, opacity: animate ? 0 : 0.28, children: animate && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("animate", { attributeName: "opacity", from: "0", to: "0.28", dur: "0.5s", begin: `${(duration * 0.65 + i * 0.18).toFixed(2)}s`, fill: "freeze" }), jsxRuntime.jsx("animate", { attributeName: "cy", values: `${b.cy};${b.cy - 5};${b.cy}`, dur: `${2.2 + i * 0.45}s`, repeatCount: "indefinite", begin: `${duration}s` })] })) }, `ob${i}`)))] }), jsxRuntime.jsx("span", { style: { display: 'inline-flex', position: 'relative', zIndex: 1 }, children: children })] }));
|
|
579
|
-
});
|
|
580
|
-
NtdIconOrganic.displayName = 'NtdIconOrganic';
|
|
582
|
+
}), { displayName: 'NtdIconOrganic' });
|
|
581
583
|
// ══════════════════════════════════════════════════════
|
|
582
584
|
// 11. NtdIconGeometric 🔷
|
|
583
585
|
// Sacred geometry: concentric rings, Star of David
|
|
584
586
|
// triangles & slowly rotating corner diamonds
|
|
585
587
|
// ══════════════════════════════════════════════════════
|
|
586
|
-
const NtdIconGeometric =
|
|
588
|
+
const NtdIconGeometric = /* @__PURE__ */ Object.assign(
|
|
589
|
+
/* @__PURE__ */ React.forwardRef(({ children, animate = true, duration = 8, intensity = 'normal', primaryColor = '#6366f1', secondaryColor = '#8b5cf6', accentColor = '#a78bfa', className, style, }, ref) => {
|
|
587
590
|
const makeTriangle = (cx, cy, r, rotDeg) => Array.from({ length: 3 }, (_, i) => {
|
|
588
591
|
const a = ((i * 120 - 90 + rotDeg) * Math.PI) / 180;
|
|
589
592
|
return `${(cx + r * Math.cos(a)).toFixed(2)},${(cy + r * Math.sin(a)).toFixed(2)}`;
|
|
@@ -628,8 +631,7 @@ const NtdIconGeometric = React.forwardRef(({ children, animate = true, duration
|
|
|
628
631
|
];
|
|
629
632
|
const diamondPath = (cx, cy, s = 3) => `M${cx},${cy - s} L${cx + s},${cy} L${cx},${cy + s} L${cx - s},${cy}Z`;
|
|
630
633
|
return (jsxRuntime.jsxs("span", { ref: ref, className: className, style: { ...wrapperBase, ...style }, children: [jsxRuntime.jsxs("svg", { viewBox: "0 0 100 100", style: { ...overlayBase, inset: '-30%', width: '160%', height: '160%', zIndex: 0 }, "aria-hidden": true, children: [rings.map((ring, i) => (jsxRuntime.jsx("circle", { cx: "50", cy: "50", r: ring.r, fill: "none", stroke: ring.color, strokeWidth: "0.6", strokeDasharray: ring.dash, opacity: ring.op, children: animate && (jsxRuntime.jsx("animateTransform", { attributeName: "transform", type: "rotate", from: "0 50 50", to: `${ring.dir * 360} 50 50`, dur: `${ring.dur}s`, repeatCount: "indefinite" })) }, `rng${i}`))), triangles.map((t, i) => (jsxRuntime.jsx("polygon", { points: makeTriangle(50, 50, t.r, t.rot), fill: "none", stroke: t.color, strokeWidth: "0.5", opacity: t.op, children: animate && (jsxRuntime.jsx("animateTransform", { attributeName: "transform", type: "rotate", from: "0 50 50", to: `${t.dir * 360} 50 50`, dur: `${t.dur}s`, repeatCount: "indefinite" })) }, `tri${i}`))), diamonds.map((d, i) => (jsxRuntime.jsx("path", { d: diamondPath(d.cx, d.cy), fill: accentColor, opacity: animate ? 0 : 0.5, children: animate && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("animate", { attributeName: "opacity", from: "0", to: "0.5", dur: `${duration * 0.25}s`, begin: `${(i * 0.09).toFixed(2)}s`, fill: "freeze" }), jsxRuntime.jsx("animateTransform", { attributeName: "transform", type: "rotate", from: `0 ${d.cx} ${d.cy}`, to: `360 ${d.cx} ${d.cy}`, dur: `${3 + i * 0.6}s`, repeatCount: "indefinite" })] })) }, `dm${i}`)))] }), jsxRuntime.jsx("span", { style: { display: 'inline-flex', position: 'relative', zIndex: 1 }, children: children })] }));
|
|
631
|
-
});
|
|
632
|
-
NtdIconGeometric.displayName = 'NtdIconGeometric';
|
|
634
|
+
}), { displayName: 'NtdIconGeometric' });
|
|
633
635
|
|
|
634
636
|
exports.NtdIconCosmic = NtdIconCosmic;
|
|
635
637
|
exports.NtdIconFestive = NtdIconFestive;
|