@tachui/modifiers 0.8.0-alpha → 0.8.5-alpha
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/README.md +19 -9
- package/dist/animation/index.d.ts +11 -0
- package/dist/animation/index.d.ts.map +1 -0
- package/dist/appearance/background.d.ts +23 -6
- package/dist/appearance/background.d.ts.map +1 -1
- package/dist/appearance/border.d.ts +2 -2
- package/dist/appearance/border.d.ts.map +1 -1
- package/dist/appearance/clip-shape.d.ts +2 -2
- package/dist/appearance/clip-shape.d.ts.map +1 -1
- package/dist/appearance/clipped.d.ts +2 -2
- package/dist/appearance/clipped.d.ts.map +1 -1
- package/dist/appearance/foreground.d.ts +14 -5
- package/dist/appearance/foreground.d.ts.map +1 -1
- package/dist/appearance/index.js +11 -12
- package/dist/appearance/reactive-factories.d.ts +20 -0
- package/dist/appearance/reactive-factories.d.ts.map +1 -0
- package/dist/attributes/accessibility.d.ts +10 -0
- package/dist/attributes/accessibility.d.ts.map +1 -0
- package/dist/attributes/aria.d.ts +2 -2
- package/dist/attributes/aria.d.ts.map +1 -1
- package/dist/attributes/css-properties.d.ts +2 -2
- package/dist/attributes/css-properties.d.ts.map +1 -1
- package/dist/attributes/html.d.ts +2 -2
- package/dist/attributes/html.d.ts.map +1 -1
- package/dist/attributes/index.d.ts +1 -0
- package/dist/attributes/index.d.ts.map +1 -1
- package/dist/base.d.ts +6 -7
- package/dist/base.d.ts.map +1 -1
- package/dist/base.js +9 -840
- package/dist/basic/animation.d.ts +41 -0
- package/dist/basic/animation.d.ts.map +1 -0
- package/dist/basic/base.d.ts +7 -8
- package/dist/basic/base.d.ts.map +1 -1
- package/dist/basic/index.d.ts +19 -2
- package/dist/basic/index.d.ts.map +1 -1
- package/dist/basic/index.js +252 -0
- package/dist/basic/margin.d.ts +2 -2
- package/dist/basic/margin.d.ts.map +1 -1
- package/dist/basic/margin.js +13 -158
- package/dist/basic/padding.d.ts +2 -2
- package/dist/basic/padding.d.ts.map +1 -1
- package/dist/basic/padding.js +13 -153
- package/dist/basic/size.d.ts +2 -2
- package/dist/basic/size.d.ts.map +1 -1
- package/dist/basic/size.js +10 -76
- package/dist/effects/backdrop/index.d.ts +60 -0
- package/dist/effects/backdrop/index.d.ts.map +1 -0
- package/dist/effects/backdrop/index.js +118 -0
- package/dist/effects/effects/index.d.ts +190 -0
- package/dist/effects/effects/index.d.ts.map +1 -0
- package/dist/effects/filters/index.d.ts +297 -0
- package/dist/effects/filters/index.d.ts.map +1 -0
- package/dist/effects/filters/index.js +234 -0
- package/dist/effects/index.d.ts +14 -0
- package/dist/effects/index.d.ts.map +1 -0
- package/dist/effects/index.js +373 -0
- package/dist/effects/internal-exports.d.ts +9 -0
- package/dist/effects/internal-exports.d.ts.map +1 -0
- package/dist/effects/shadows/index.d.ts +316 -0
- package/dist/effects/shadows/index.d.ts.map +1 -0
- package/dist/effects/shadows/index.js +405 -0
- package/dist/effects/transforms/index.d.ts +316 -0
- package/dist/effects/transforms/index.d.ts.map +1 -0
- package/dist/effects/transforms/index.js +193 -0
- package/dist/elements/pseudo-elements.d.ts +2 -2
- package/dist/elements/pseudo-elements.d.ts.map +1 -1
- package/dist/essential-manifest.d.ts +5 -0
- package/dist/essential-manifest.d.ts.map +1 -0
- package/dist/index.d.ts +10 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +273 -881
- package/dist/interaction/allows-hit-testing.d.ts +1 -1
- package/dist/interaction/allows-hit-testing.d.ts.map +1 -1
- package/dist/interaction/dom-events.d.ts +35 -0
- package/dist/interaction/dom-events.d.ts.map +1 -0
- package/dist/interaction/focus-events.d.ts +54 -0
- package/dist/interaction/focus-events.d.ts.map +1 -0
- package/dist/interaction/focusable.d.ts +1 -1
- package/dist/interaction/focusable.d.ts.map +1 -1
- package/dist/interaction/focused.d.ts +1 -1
- package/dist/interaction/focused.d.ts.map +1 -1
- package/dist/interaction/index.d.ts +5 -0
- package/dist/interaction/index.d.ts.map +1 -1
- package/dist/interaction/index.js +75 -28
- package/dist/interaction/keyboard-events.d.ts +69 -0
- package/dist/interaction/keyboard-events.d.ts.map +1 -0
- package/dist/interaction/keyboard-shortcut.d.ts +1 -1
- package/dist/interaction/keyboard-shortcut.d.ts.map +1 -1
- package/dist/interaction/mouse-events.d.ts +125 -0
- package/dist/interaction/mouse-events.d.ts.map +1 -0
- package/dist/interaction/on-continuous-hover.d.ts +1 -1
- package/dist/interaction/on-continuous-hover.d.ts.map +1 -1
- package/dist/interaction/on-hover.d.ts +30 -0
- package/dist/interaction/on-hover.d.ts.map +1 -0
- package/dist/interaction/on-long-press-gesture.d.ts +1 -1
- package/dist/interaction/on-long-press-gesture.d.ts.map +1 -1
- package/dist/interaction/scroll.d.ts +2 -2
- package/dist/interaction/scroll.d.ts.map +1 -1
- package/dist/layout/aspect-ratio.d.ts +2 -2
- package/dist/layout/aspect-ratio.d.ts.map +1 -1
- package/dist/layout/fixed-size.d.ts +2 -2
- package/dist/layout/fixed-size.d.ts.map +1 -1
- package/dist/layout/flexbox.d.ts +2 -2
- package/dist/layout/flexbox.d.ts.map +1 -1
- package/dist/layout/frame.d.ts +13 -0
- package/dist/layout/frame.d.ts.map +1 -0
- package/dist/layout/index.d.ts +2 -0
- package/dist/layout/index.d.ts.map +1 -1
- package/dist/layout/index.js +25 -22
- package/dist/layout/offset.d.ts +2 -2
- package/dist/layout/offset.d.ts.map +1 -1
- package/dist/layout/overlay.d.ts +1 -1
- package/dist/layout/overlay.d.ts.map +1 -1
- package/dist/layout/position.d.ts +2 -2
- package/dist/layout/position.d.ts.map +1 -1
- package/dist/layout/resizable.d.ts +6 -0
- package/dist/layout/resizable.d.ts.map +1 -0
- package/dist/layout/scale-effect.d.ts +6 -5
- package/dist/layout/scale-effect.d.ts.map +1 -1
- package/dist/layout/z-index.d.ts +2 -2
- package/dist/layout/z-index.d.ts.map +1 -1
- package/dist/lifecycle/index.d.ts +6 -0
- package/dist/lifecycle/index.d.ts.map +1 -0
- package/dist/modifiers-basic-DLmE749_.js +5604 -0
- package/dist/navigation/index.d.ts +12 -0
- package/dist/navigation/index.d.ts.map +1 -0
- package/dist/preload/backdrop.d.ts +5 -0
- package/dist/preload/backdrop.d.ts.map +1 -0
- package/dist/preload/backdrop.js +7 -0
- package/dist/preload/basic.d.ts +7 -0
- package/dist/preload/basic.d.ts.map +1 -0
- package/dist/preload/basic.js +251 -0
- package/dist/preload/effects.d.ts +6 -0
- package/dist/preload/effects.d.ts.map +1 -0
- package/dist/preload/effects.js +95 -0
- package/dist/preload/filters.d.ts +6 -0
- package/dist/preload/filters.d.ts.map +1 -0
- package/dist/preload/filters.js +31 -0
- package/dist/preload/shadows.d.ts +5 -0
- package/dist/preload/shadows.d.ts.map +1 -0
- package/dist/preload/shadows.js +27 -0
- package/dist/preload/transforms.d.ts +5 -0
- package/dist/preload/transforms.d.ts.map +1 -0
- package/dist/preload/transforms.js +30 -0
- package/dist/types.d.ts +7 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -1
- package/dist/typography/font.d.ts +5 -2
- package/dist/typography/font.d.ts.map +1 -1
- package/dist/typography/index.d.ts +1 -0
- package/dist/typography/index.d.ts.map +1 -1
- package/dist/typography/index.js +26 -28
- package/dist/typography/text.d.ts +2 -2
- package/dist/typography/text.d.ts.map +1 -1
- package/dist/typography/text.js +9 -127
- package/dist/typography/typography.d.ts +6 -4
- package/dist/typography/typography.d.ts.map +1 -1
- package/dist/utility/as-html-validator.d.ts +20 -0
- package/dist/utility/as-html-validator.d.ts.map +1 -0
- package/dist/utility/as-html.d.ts +65 -0
- package/dist/utility/as-html.d.ts.map +1 -0
- package/dist/utility/basic-sanitizer.d.ts +54 -0
- package/dist/utility/basic-sanitizer.d.ts.map +1 -0
- package/dist/utility/css.d.ts +2 -2
- package/dist/utility/css.d.ts.map +1 -1
- package/dist/utility/index.d.ts +3 -0
- package/dist/utility/index.d.ts.map +1 -1
- package/dist/utility/index.js +19 -15
- package/dist/utility/utility.d.ts +2 -2
- package/dist/utility/utility.d.ts.map +1 -1
- package/dist/version.d.ts +14 -0
- package/dist/version.d.ts.map +1 -0
- package/package.json +59 -4
- package/dist/allows-hit-testing-DscPrcOw.js +0 -464
- package/dist/allows-hit-testing-DscPrcOw.js.map +0 -1
- package/dist/appearance/index.js.map +0 -1
- package/dist/base-CkGf4b9G.js +0 -786
- package/dist/base-CkGf4b9G.js.map +0 -1
- package/dist/base.js.map +0 -1
- package/dist/basic/margin.js.map +0 -1
- package/dist/basic/padding.js.map +0 -1
- package/dist/basic/size.js.map +0 -1
- package/dist/clipped-CCW8gJqJ.js +0 -282
- package/dist/clipped-CCW8gJqJ.js.map +0 -1
- package/dist/css-CJEXRr6H.js +0 -124
- package/dist/css-CJEXRr6H.js.map +0 -1
- package/dist/font-3qM2Z97N.js +0 -135
- package/dist/font-3qM2Z97N.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/interaction/index.js.map +0 -1
- package/dist/layout/index.js.map +0 -1
- package/dist/overlay-DDiSLprp.js +0 -774
- package/dist/overlay-DDiSLprp.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/typography/index.js.map +0 -1
- package/dist/typography/text.js.map +0 -1
- package/dist/utility/index.js.map +0 -1
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
var b = Object.defineProperty;
|
|
2
|
+
var x = (t, o, e) => o in t ? b(t, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[o] = e;
|
|
3
|
+
var l = (t, o, e) => x(t, typeof o != "symbol" ? o + "" : o, e);
|
|
4
|
+
import { globalModifierRegistry as v } from "@tachui/registry";
|
|
5
|
+
import { blur as C, brightness as k, contrast as E, filter as O, saturate as H, grayscale as I, sepia as T, hueRotate as $, invert as R, filterDropShadow as P, vintagePhoto as j, blackAndWhite as Y, vibrant as z, warmTone as F, coolTone as M, faded as V, highKey as X, lowKey as Z, softFocus as U, highContrastMode as W, subtleBlur as B, darkModeInvert as D, colorInvert as K, saturation as N, hueRotation as A } from "./filters/index.js";
|
|
6
|
+
import { transform as G, scale as L, rotate as _, translate as q, skew as J, rotateX as Q, rotateY as ee, rotateZ as te, perspective as re, advancedTransform as oe, matrix as ne, matrix3d as se, rotate3d as ae, scale3d as ie, translate3d as le, scaleX as ce, scaleY as ue, scaleZ as de, translateX as he, translateY as fe, translateZ as me, perspectiveOrigin as pe, transformStyle as ve, backfaceVisibility as ge } from "./transforms/index.js";
|
|
7
|
+
import { shadow as ye, textShadow as Se, dropShadow as we, insetShadow as be, elevationShadow as xe, glowEffect as Ce, neonEffect as ke, neumorphism as Ee, neumorphismPressed as Oe, layeredShadow as He, textShadowSubtle as Ie, textShadowStrong as Te, textOutline as $e, textEmbossed as Re, textEngraved as Pe, swiftUIShadow as je, reactiveShadow as Ye, animatedShadow as ze } from "./shadows/index.js";
|
|
8
|
+
import { BaseModifier as g } from "@tachui/core/modifiers/base";
|
|
9
|
+
import { backdropFilter as Fe, glassmorphism as Me, customGlassmorphism as Ve } from "./backdrop/index.js";
|
|
10
|
+
class Xe extends g {
|
|
11
|
+
constructor(e) {
|
|
12
|
+
const r = { cursor: "auto" };
|
|
13
|
+
for (const [s, n] of Object.entries(e))
|
|
14
|
+
typeof n == "function" && "peek" in n ? r[s] = n.peek() : r[s] = n;
|
|
15
|
+
super(r);
|
|
16
|
+
l(this, "type", "cursor");
|
|
17
|
+
l(this, "priority", 10);
|
|
18
|
+
}
|
|
19
|
+
apply(e, r) {
|
|
20
|
+
r.element && (process.env.NODE_ENV === "development" && this.validateCursorValue(this.properties.cursor), this.applyStyles(r.element, { cursor: this.properties.cursor }));
|
|
21
|
+
}
|
|
22
|
+
validateCursorValue(e) {
|
|
23
|
+
![
|
|
24
|
+
"auto",
|
|
25
|
+
"default",
|
|
26
|
+
"pointer",
|
|
27
|
+
"text",
|
|
28
|
+
"wait",
|
|
29
|
+
"help",
|
|
30
|
+
"not-allowed",
|
|
31
|
+
"none",
|
|
32
|
+
"grab",
|
|
33
|
+
"grabbing",
|
|
34
|
+
"zoom-in",
|
|
35
|
+
"zoom-out",
|
|
36
|
+
"alias",
|
|
37
|
+
"cell",
|
|
38
|
+
"copy"
|
|
39
|
+
].includes(e) && !e.includes("url(") && console.warn(
|
|
40
|
+
`Unknown cursor value: "${e}". See documentation for valid cursor values.`
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const u = class u extends g {
|
|
45
|
+
constructor(e) {
|
|
46
|
+
const r = {};
|
|
47
|
+
for (const [s, n] of Object.entries(e))
|
|
48
|
+
typeof n == "function" && "peek" in n ? r[s] = n.peek() : r[s] = n;
|
|
49
|
+
super(r);
|
|
50
|
+
l(this, "type", "hover");
|
|
51
|
+
l(this, "priority", 15);
|
|
52
|
+
}
|
|
53
|
+
apply(e, r) {
|
|
54
|
+
if (!r.element || !(this.properties.isEnabled !== !1)) return;
|
|
55
|
+
const n = `tachui-hover-${++u.hoverCount}`;
|
|
56
|
+
r.element.classList.add(n), this.addHoverStyles(n, this.properties);
|
|
57
|
+
}
|
|
58
|
+
addHoverStyles(e, r) {
|
|
59
|
+
const s = this.getOrCreateStyleSheet(), n = this.formatTransition(r.transition);
|
|
60
|
+
if (n) {
|
|
61
|
+
const d = `.${e} { transition: ${n}; }`;
|
|
62
|
+
try {
|
|
63
|
+
s.insertRule(d);
|
|
64
|
+
} catch (h) {
|
|
65
|
+
console.warn("Failed to add transition rule:", h);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const m = this.computeHoverStyles(r);
|
|
69
|
+
if (Object.keys(m).length > 0) {
|
|
70
|
+
const d = Object.entries(m).map(([f, S]) => {
|
|
71
|
+
const p = this.toCSSProperty(f), w = [
|
|
72
|
+
"background-color",
|
|
73
|
+
"background",
|
|
74
|
+
"border-color",
|
|
75
|
+
"color"
|
|
76
|
+
].includes(p);
|
|
77
|
+
return `${p}: ${S}${w ? " !important" : ""}`;
|
|
78
|
+
}).join("; "), h = `.${e}:hover { ${d} }`;
|
|
79
|
+
try {
|
|
80
|
+
s.insertRule(h);
|
|
81
|
+
} catch (f) {
|
|
82
|
+
console.warn("Failed to add hover rule:", f);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
computeHoverStyles(e) {
|
|
87
|
+
const r = {};
|
|
88
|
+
return e.effect && Object.assign(r, this.getSwiftUIEffectStyles(e.effect)), e.hoverStyles && Object.assign(r, e.hoverStyles), r;
|
|
89
|
+
}
|
|
90
|
+
getSwiftUIEffectStyles(e) {
|
|
91
|
+
switch (e) {
|
|
92
|
+
case "automatic":
|
|
93
|
+
return {
|
|
94
|
+
transform: "scale(1.02)",
|
|
95
|
+
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.15)"
|
|
96
|
+
};
|
|
97
|
+
case "highlight":
|
|
98
|
+
return {
|
|
99
|
+
backgroundColor: "rgba(0, 0, 0, 0.05)",
|
|
100
|
+
filter: "brightness(0.95)"
|
|
101
|
+
};
|
|
102
|
+
case "lift":
|
|
103
|
+
return {
|
|
104
|
+
transform: "translateY(-2px)",
|
|
105
|
+
boxShadow: "0 8px 24px rgba(0, 0, 0, 0.15)"
|
|
106
|
+
};
|
|
107
|
+
case "scale":
|
|
108
|
+
return {
|
|
109
|
+
transform: "scale(1.05)"
|
|
110
|
+
};
|
|
111
|
+
default:
|
|
112
|
+
return {};
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
formatTransition(e) {
|
|
116
|
+
return e === void 0 ? "all 200ms ease" : typeof e == "number" ? `all ${e}ms ease` : e;
|
|
117
|
+
}
|
|
118
|
+
getOrCreateStyleSheet() {
|
|
119
|
+
const e = document.getElementById("tachui-hover-styles");
|
|
120
|
+
if (e && e instanceof HTMLStyleElement)
|
|
121
|
+
return e.sheet;
|
|
122
|
+
const r = document.createElement("style");
|
|
123
|
+
return r.id = "tachui-hover-styles", document.head.appendChild(r), r.sheet;
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
l(u, "hoverCount", 0);
|
|
127
|
+
let a = u;
|
|
128
|
+
function i(t) {
|
|
129
|
+
return new Xe({ cursor: t });
|
|
130
|
+
}
|
|
131
|
+
function c(t, o) {
|
|
132
|
+
return new a({ effect: t, isEnabled: o });
|
|
133
|
+
}
|
|
134
|
+
function Ze(t, o) {
|
|
135
|
+
return new a({ hoverStyles: t, transition: o });
|
|
136
|
+
}
|
|
137
|
+
function Ue(t, o = 200) {
|
|
138
|
+
return new a({ hoverStyles: t, transition: o });
|
|
139
|
+
}
|
|
140
|
+
function We(t, o) {
|
|
141
|
+
return new a({ effect: t, isEnabled: o });
|
|
142
|
+
}
|
|
143
|
+
function Be() {
|
|
144
|
+
return i("pointer");
|
|
145
|
+
}
|
|
146
|
+
function De() {
|
|
147
|
+
return i("grab");
|
|
148
|
+
}
|
|
149
|
+
function Ke() {
|
|
150
|
+
return i("text");
|
|
151
|
+
}
|
|
152
|
+
function Ne() {
|
|
153
|
+
return i("not-allowed");
|
|
154
|
+
}
|
|
155
|
+
function Ae() {
|
|
156
|
+
return i("wait");
|
|
157
|
+
}
|
|
158
|
+
function Ge() {
|
|
159
|
+
return i("help");
|
|
160
|
+
}
|
|
161
|
+
function Le(t = "in") {
|
|
162
|
+
return i(t === "in" ? "zoom-in" : "zoom-out");
|
|
163
|
+
}
|
|
164
|
+
function _e() {
|
|
165
|
+
return c("lift");
|
|
166
|
+
}
|
|
167
|
+
function qe() {
|
|
168
|
+
return c("automatic");
|
|
169
|
+
}
|
|
170
|
+
function Je() {
|
|
171
|
+
return c("highlight");
|
|
172
|
+
}
|
|
173
|
+
function Qe() {
|
|
174
|
+
return c("scale");
|
|
175
|
+
}
|
|
176
|
+
function et(t) {
|
|
177
|
+
return new a({ hoverStyles: t });
|
|
178
|
+
}
|
|
179
|
+
function tt(t) {
|
|
180
|
+
return new a({ hoverStyles: t });
|
|
181
|
+
}
|
|
182
|
+
function rt(t) {
|
|
183
|
+
return new a({ hoverStyles: t });
|
|
184
|
+
}
|
|
185
|
+
const y = [
|
|
186
|
+
// Filter system
|
|
187
|
+
["blur", C],
|
|
188
|
+
["brightness", k],
|
|
189
|
+
["contrast", E],
|
|
190
|
+
["filter", O],
|
|
191
|
+
["saturate", H],
|
|
192
|
+
["grayscale", I],
|
|
193
|
+
["sepia", T],
|
|
194
|
+
["hueRotate", $],
|
|
195
|
+
["invert", R],
|
|
196
|
+
["filterDropShadow", P],
|
|
197
|
+
["vintagePhoto", j],
|
|
198
|
+
["blackAndWhite", Y],
|
|
199
|
+
["vibrant", z],
|
|
200
|
+
["warmTone", F],
|
|
201
|
+
["coolTone", M],
|
|
202
|
+
["faded", V],
|
|
203
|
+
["highKey", X],
|
|
204
|
+
["lowKey", Z],
|
|
205
|
+
["softFocus", U],
|
|
206
|
+
["highContrastMode", W],
|
|
207
|
+
["subtleBlur", B],
|
|
208
|
+
["darkModeInvert", D],
|
|
209
|
+
["colorInvert", K],
|
|
210
|
+
["saturation", N],
|
|
211
|
+
["hueRotation", A],
|
|
212
|
+
// Transform utilities
|
|
213
|
+
["transform", G],
|
|
214
|
+
["scale", L],
|
|
215
|
+
["rotate", _],
|
|
216
|
+
["translate", q],
|
|
217
|
+
["skew", J],
|
|
218
|
+
["rotateX", Q],
|
|
219
|
+
["rotateY", ee],
|
|
220
|
+
["rotateZ", te],
|
|
221
|
+
["perspective", re],
|
|
222
|
+
["advancedTransform", oe],
|
|
223
|
+
["matrix", ne],
|
|
224
|
+
["matrix3d", se],
|
|
225
|
+
["rotate3d", ae],
|
|
226
|
+
["scale3d", ie],
|
|
227
|
+
["translate3d", le],
|
|
228
|
+
["scaleX", ce],
|
|
229
|
+
["scaleY", ue],
|
|
230
|
+
["scaleZ", de],
|
|
231
|
+
["translateX", he],
|
|
232
|
+
["translateY", fe],
|
|
233
|
+
["translateZ", me],
|
|
234
|
+
["perspectiveOrigin", pe],
|
|
235
|
+
["transformStyle", ve],
|
|
236
|
+
["backfaceVisibility", ge],
|
|
237
|
+
// Shadows
|
|
238
|
+
["shadow", ye],
|
|
239
|
+
["textShadow", Se],
|
|
240
|
+
["dropShadow", we],
|
|
241
|
+
["insetShadow", be],
|
|
242
|
+
["elevationShadow", xe],
|
|
243
|
+
["glowEffect", Ce],
|
|
244
|
+
["neonEffect", ke],
|
|
245
|
+
["neumorphism", Ee],
|
|
246
|
+
["neumorphismPressed", Oe],
|
|
247
|
+
["layeredShadow", He],
|
|
248
|
+
["textShadowSubtle", Ie],
|
|
249
|
+
["textShadowStrong", Te],
|
|
250
|
+
["textOutline", $e],
|
|
251
|
+
["textEmbossed", Re],
|
|
252
|
+
["textEngraved", Pe],
|
|
253
|
+
["swiftUIShadow", je],
|
|
254
|
+
["reactiveShadow", Ye],
|
|
255
|
+
["animatedShadow", ze],
|
|
256
|
+
// Interactive effects
|
|
257
|
+
["hover", Ze],
|
|
258
|
+
["active", et],
|
|
259
|
+
["focus", tt],
|
|
260
|
+
["pressed", rt],
|
|
261
|
+
["hoverEffect", c],
|
|
262
|
+
["hoverWithTransition", Ue],
|
|
263
|
+
["conditionalHover", We],
|
|
264
|
+
["interactiveCursor", Be],
|
|
265
|
+
["draggableCursor", De],
|
|
266
|
+
["textCursor", Ke],
|
|
267
|
+
["disabledCursor", Ne],
|
|
268
|
+
["loadingCursor", Ae],
|
|
269
|
+
["helpCursor", Ge],
|
|
270
|
+
["zoomCursor", Le],
|
|
271
|
+
["buttonHover", _e],
|
|
272
|
+
["cardHover", qe],
|
|
273
|
+
["linkHover", Je],
|
|
274
|
+
["imageHover", Qe],
|
|
275
|
+
// Backdrop / glassmorphism
|
|
276
|
+
["backdropFilter", Fe],
|
|
277
|
+
["glassmorphism", Me],
|
|
278
|
+
["customGlassmorphism", Ve]
|
|
279
|
+
];
|
|
280
|
+
y.forEach(([t, o]) => {
|
|
281
|
+
v.has(t) || v.register(t, o);
|
|
282
|
+
});
|
|
283
|
+
process.env.NODE_ENV === "development" && console.log(`@tachui/modifiers/effects: Preloaded and registered ${y.length} effects modifiers.`);
|
|
284
|
+
export {
|
|
285
|
+
et as active,
|
|
286
|
+
oe as advancedTransform,
|
|
287
|
+
ze as animatedShadow,
|
|
288
|
+
Fe as backdropFilter,
|
|
289
|
+
ge as backfaceVisibility,
|
|
290
|
+
Y as blackAndWhite,
|
|
291
|
+
C as blur,
|
|
292
|
+
k as brightness,
|
|
293
|
+
_e as buttonHover,
|
|
294
|
+
qe as cardHover,
|
|
295
|
+
K as colorInvert,
|
|
296
|
+
We as conditionalHover,
|
|
297
|
+
E as contrast,
|
|
298
|
+
M as coolTone,
|
|
299
|
+
Ve as customGlassmorphism,
|
|
300
|
+
D as darkModeInvert,
|
|
301
|
+
Ne as disabledCursor,
|
|
302
|
+
De as draggableCursor,
|
|
303
|
+
we as dropShadow,
|
|
304
|
+
xe as elevationShadow,
|
|
305
|
+
V as faded,
|
|
306
|
+
O as filter,
|
|
307
|
+
P as filterDropShadow,
|
|
308
|
+
tt as focus,
|
|
309
|
+
Me as glassmorphism,
|
|
310
|
+
Ce as glowEffect,
|
|
311
|
+
I as grayscale,
|
|
312
|
+
Ge as helpCursor,
|
|
313
|
+
W as highContrastMode,
|
|
314
|
+
X as highKey,
|
|
315
|
+
Ze as hover,
|
|
316
|
+
c as hoverEffect,
|
|
317
|
+
Ue as hoverWithTransition,
|
|
318
|
+
$ as hueRotate,
|
|
319
|
+
A as hueRotation,
|
|
320
|
+
Qe as imageHover,
|
|
321
|
+
be as insetShadow,
|
|
322
|
+
Be as interactiveCursor,
|
|
323
|
+
R as invert,
|
|
324
|
+
He as layeredShadow,
|
|
325
|
+
Je as linkHover,
|
|
326
|
+
Ae as loadingCursor,
|
|
327
|
+
Z as lowKey,
|
|
328
|
+
ne as matrix,
|
|
329
|
+
se as matrix3d,
|
|
330
|
+
ke as neonEffect,
|
|
331
|
+
Ee as neumorphism,
|
|
332
|
+
Oe as neumorphismPressed,
|
|
333
|
+
re as perspective,
|
|
334
|
+
pe as perspectiveOrigin,
|
|
335
|
+
rt as pressed,
|
|
336
|
+
Ye as reactiveShadow,
|
|
337
|
+
_ as rotate,
|
|
338
|
+
ae as rotate3d,
|
|
339
|
+
Q as rotateX,
|
|
340
|
+
ee as rotateY,
|
|
341
|
+
te as rotateZ,
|
|
342
|
+
H as saturate,
|
|
343
|
+
N as saturation,
|
|
344
|
+
L as scale,
|
|
345
|
+
ie as scale3d,
|
|
346
|
+
ce as scaleX,
|
|
347
|
+
ue as scaleY,
|
|
348
|
+
de as scaleZ,
|
|
349
|
+
T as sepia,
|
|
350
|
+
ye as shadow,
|
|
351
|
+
J as skew,
|
|
352
|
+
U as softFocus,
|
|
353
|
+
B as subtleBlur,
|
|
354
|
+
je as swiftUIShadow,
|
|
355
|
+
Ke as textCursor,
|
|
356
|
+
Re as textEmbossed,
|
|
357
|
+
Pe as textEngraved,
|
|
358
|
+
$e as textOutline,
|
|
359
|
+
Se as textShadow,
|
|
360
|
+
Te as textShadowStrong,
|
|
361
|
+
Ie as textShadowSubtle,
|
|
362
|
+
G as transform,
|
|
363
|
+
ve as transformStyle,
|
|
364
|
+
q as translate,
|
|
365
|
+
le as translate3d,
|
|
366
|
+
he as translateX,
|
|
367
|
+
fe as translateY,
|
|
368
|
+
me as translateZ,
|
|
369
|
+
z as vibrant,
|
|
370
|
+
j as vintagePhoto,
|
|
371
|
+
F as warmTone,
|
|
372
|
+
Le as zoomCursor
|
|
373
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal exports for registry registration
|
|
3
|
+
* This file collects all modifier factory functions for auto-registration
|
|
4
|
+
*/
|
|
5
|
+
export { filter, blur, brightness, contrast } from './filters';
|
|
6
|
+
export { transform } from './transforms';
|
|
7
|
+
export { cursor, hover } from './effects';
|
|
8
|
+
export { shadow, textShadow } from './shadows';
|
|
9
|
+
//# sourceMappingURL=internal-exports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-exports.d.ts","sourceRoot":"","sources":["../../src/effects/internal-exports.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shadow Modifiers - Comprehensive shadow system
|
|
3
|
+
*
|
|
4
|
+
* Provides comprehensive shadow capabilities including box shadows, text shadows,
|
|
5
|
+
* inset shadows, multiple shadows, and filter-based drop shadows with SwiftUI compatibility.
|
|
6
|
+
*/
|
|
7
|
+
import type { Signal } from '@tachui/types/reactive';
|
|
8
|
+
import type { DOMNode } from '@tachui/types/runtime';
|
|
9
|
+
import { BaseModifier } from '@tachui/core/modifiers/base';
|
|
10
|
+
import type { ModifierContext, ReactiveModifierProps } from '@tachui/types/modifiers';
|
|
11
|
+
export interface ShadowConfig {
|
|
12
|
+
x?: number | Signal<number>;
|
|
13
|
+
y?: number | Signal<number>;
|
|
14
|
+
blur?: number | Signal<number>;
|
|
15
|
+
radius?: number | Signal<number>;
|
|
16
|
+
spread?: number | Signal<number>;
|
|
17
|
+
color?: string | Signal<string>;
|
|
18
|
+
inset?: boolean | Signal<boolean>;
|
|
19
|
+
}
|
|
20
|
+
export interface ReactiveTextShadowConfig {
|
|
21
|
+
x?: number | Signal<number>;
|
|
22
|
+
y?: number | Signal<number>;
|
|
23
|
+
blur?: number | Signal<number>;
|
|
24
|
+
radius?: number | Signal<number>;
|
|
25
|
+
color?: string | Signal<string>;
|
|
26
|
+
}
|
|
27
|
+
export interface DropShadowConfig {
|
|
28
|
+
x?: number | Signal<number>;
|
|
29
|
+
y?: number | Signal<number>;
|
|
30
|
+
blur?: number | Signal<number>;
|
|
31
|
+
radius?: number | Signal<number>;
|
|
32
|
+
color?: string | Signal<string>;
|
|
33
|
+
}
|
|
34
|
+
export interface ShadowOptions {
|
|
35
|
+
shadow?: ShadowConfig | ShadowConfig[] | string;
|
|
36
|
+
}
|
|
37
|
+
export interface TextShadowOptions {
|
|
38
|
+
textShadow?: ReactiveTextShadowConfig | ReactiveTextShadowConfig[] | string;
|
|
39
|
+
}
|
|
40
|
+
export interface DropShadowOptions {
|
|
41
|
+
dropShadow?: DropShadowConfig | DropShadowConfig[] | string;
|
|
42
|
+
}
|
|
43
|
+
export type ReactiveShadowOptions = ReactiveModifierProps<ShadowOptions>;
|
|
44
|
+
export type ReactiveTextShadowOptions = ReactiveModifierProps<TextShadowOptions>;
|
|
45
|
+
export type ReactiveDropShadowOptions = ReactiveModifierProps<DropShadowOptions>;
|
|
46
|
+
export declare class ShadowModifier extends BaseModifier<ShadowOptions> {
|
|
47
|
+
readonly type = "shadow";
|
|
48
|
+
readonly priority = 25;
|
|
49
|
+
constructor(options: ReactiveShadowOptions);
|
|
50
|
+
apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined;
|
|
51
|
+
private applyShadowStyles;
|
|
52
|
+
private applySingleShadow;
|
|
53
|
+
private applyMultipleShadows;
|
|
54
|
+
private generateShadowCSS;
|
|
55
|
+
private resolveValue;
|
|
56
|
+
}
|
|
57
|
+
export declare class TextShadowModifier extends BaseModifier<TextShadowOptions> {
|
|
58
|
+
readonly type = "textShadow";
|
|
59
|
+
readonly priority = 26;
|
|
60
|
+
constructor(options: ReactiveTextShadowOptions);
|
|
61
|
+
apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined;
|
|
62
|
+
private applyTextShadowStyles;
|
|
63
|
+
private applySingleTextShadow;
|
|
64
|
+
private applyMultipleTextShadows;
|
|
65
|
+
private generateTextShadowCSS;
|
|
66
|
+
private resolveValue;
|
|
67
|
+
}
|
|
68
|
+
export declare class DropShadowModifier extends BaseModifier<DropShadowOptions> {
|
|
69
|
+
readonly type = "dropShadow";
|
|
70
|
+
readonly priority = 27;
|
|
71
|
+
constructor(options: ReactiveDropShadowOptions);
|
|
72
|
+
apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined;
|
|
73
|
+
private applyDropShadowStyles;
|
|
74
|
+
private applySingleDropShadow;
|
|
75
|
+
private applyMultipleDropShadows;
|
|
76
|
+
private applyFilterDropShadow;
|
|
77
|
+
private generateDropShadowCSS;
|
|
78
|
+
private resolveValue;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* General box shadow modifier with flexible configuration
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```typescript
|
|
85
|
+
* .shadow({ x: 0, y: 2, blur: 4, color: 'rgba(0,0,0,0.1)' })
|
|
86
|
+
* .shadow('0 2px 4px rgba(0,0,0,0.1)') // Direct CSS shadow string
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
export declare function shadow(config: ShadowConfig | ShadowConfig[] | string): ShadowModifier;
|
|
90
|
+
/**
|
|
91
|
+
* Text shadow modifier for typography effects
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```typescript
|
|
95
|
+
* .textShadow({ x: 1, y: 1, blur: 2, color: 'rgba(0,0,0,0.5)' })
|
|
96
|
+
* .textShadow('1px 1px 2px rgba(0,0,0,0.5)') // Direct CSS text shadow
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
export declare function textShadow(config: ReactiveTextShadowConfig | ReactiveTextShadowConfig[] | string): TextShadowModifier;
|
|
100
|
+
/**
|
|
101
|
+
* Filter-based drop shadow modifier (alternative to box-shadow)
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```typescript
|
|
105
|
+
* .dropShadow({ x: 0, y: 4, blur: 8, color: 'rgba(0,0,0,0.2)' })
|
|
106
|
+
* .dropShadow('0 4px 8px rgba(0,0,0,0.2)') // Direct CSS drop shadow
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
export declare function dropShadow(config: DropShadowConfig | DropShadowConfig[] | string): DropShadowModifier;
|
|
110
|
+
/**
|
|
111
|
+
* Multiple box shadows for complex shadow effects
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* ```typescript
|
|
115
|
+
* .shadows([
|
|
116
|
+
* { x: 0, y: 1, blur: 3, color: 'rgba(0,0,0,0.12)' },
|
|
117
|
+
* { x: 0, y: 1, blur: 2, color: 'rgba(0,0,0,0.24)' }
|
|
118
|
+
* ])
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
export declare function shadows(configs: ShadowConfig[]): ShadowModifier;
|
|
122
|
+
/**
|
|
123
|
+
* Inset shadow for inner depth effects
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* ```typescript
|
|
127
|
+
* .insetShadow({ x: 0, y: 2, blur: 4, color: 'rgba(0,0,0,0.1)' })
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
export declare function insetShadow(config: Omit<ShadowConfig, 'inset'>): ShadowModifier;
|
|
131
|
+
export type ShadowPreset = 'none' | 'small' | 'medium' | 'large' | 'xlarge' | '2xlarge' | 'inner' | 'outline';
|
|
132
|
+
/**
|
|
133
|
+
* Predefined shadow presets based on common design patterns
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```typescript
|
|
137
|
+
* .shadowPreset('small') // Subtle shadow
|
|
138
|
+
* .shadowPreset('medium') // Standard shadow
|
|
139
|
+
* .shadowPreset('large') // Prominent shadow
|
|
140
|
+
* .shadowPreset('inner') // Inset shadow
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
export declare function shadowPreset(preset: ShadowPreset): ShadowModifier;
|
|
144
|
+
/**
|
|
145
|
+
* Material Design elevation shadows
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```typescript
|
|
149
|
+
* .elevationShadow(1) // Card elevation
|
|
150
|
+
* .elevationShadow(4) // Button elevation
|
|
151
|
+
* .elevationShadow(8) // Modal elevation
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
export declare function elevationShadow(level: number): ShadowModifier;
|
|
155
|
+
/**
|
|
156
|
+
* Glow effect using multiple colored shadows
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```typescript
|
|
160
|
+
* .glowEffect('#007AFF', 4) // Blue glow
|
|
161
|
+
* .glowEffect('#FF3B30', 8) // Red glow with larger radius
|
|
162
|
+
* ```
|
|
163
|
+
*/
|
|
164
|
+
export declare function glowEffect(color: string, intensity?: number): ShadowModifier;
|
|
165
|
+
/**
|
|
166
|
+
* Neon effect with bright colored glow
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* ```typescript
|
|
170
|
+
* .neonEffect('#00FF00') // Green neon
|
|
171
|
+
* .neonEffect('#FF006E', 8) // Pink neon with custom intensity
|
|
172
|
+
* ```
|
|
173
|
+
*/
|
|
174
|
+
export declare function neonEffect(color: string, intensity?: number): ShadowModifier;
|
|
175
|
+
/**
|
|
176
|
+
* Neumorphism (soft UI) shadow effect
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```typescript
|
|
180
|
+
* .neumorphism('#f0f0f0') // Light neumorphism
|
|
181
|
+
* .neumorphism('#2d2d2d', true) // Dark neumorphism
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
184
|
+
export declare function neumorphism(_backgroundColor: string, dark?: boolean): ShadowModifier;
|
|
185
|
+
/**
|
|
186
|
+
* Pressed/inset neumorphism effect
|
|
187
|
+
*
|
|
188
|
+
* @example
|
|
189
|
+
* ```typescript
|
|
190
|
+
* .neumorphismPressed('#f0f0f0') // Light pressed effect
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
export declare function neumorphismPressed(_backgroundColor: string, dark?: boolean): ShadowModifier;
|
|
194
|
+
/**
|
|
195
|
+
* Layered shadow for depth perception
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* ```typescript
|
|
199
|
+
* .layeredShadow() // Default layered effect
|
|
200
|
+
* .layeredShadow(3, 0.8) // 3 layers with 80% opacity multiplier
|
|
201
|
+
* ```
|
|
202
|
+
*/
|
|
203
|
+
export declare function layeredShadow(layers?: number, opacityMultiplier?: number): ShadowModifier;
|
|
204
|
+
/**
|
|
205
|
+
* Subtle text shadow for readability on light backgrounds
|
|
206
|
+
*
|
|
207
|
+
* @example
|
|
208
|
+
* ```typescript
|
|
209
|
+
* .textShadowSubtle() // Default subtle shadow
|
|
210
|
+
* .textShadowSubtle('rgba(0,0,0,0.3)') // Custom color
|
|
211
|
+
* ```
|
|
212
|
+
*/
|
|
213
|
+
export declare function textShadowSubtle(color?: string): TextShadowModifier;
|
|
214
|
+
/**
|
|
215
|
+
* Strong text shadow for readability on busy backgrounds
|
|
216
|
+
*
|
|
217
|
+
* @example
|
|
218
|
+
* ```typescript
|
|
219
|
+
* .textShadowStrong() // Default strong shadow
|
|
220
|
+
* .textShadowStrong('rgba(0,0,0,0.8)') // Custom color
|
|
221
|
+
* ```
|
|
222
|
+
*/
|
|
223
|
+
export declare function textShadowStrong(color?: string): TextShadowModifier;
|
|
224
|
+
/**
|
|
225
|
+
* Outline text effect using multiple text shadows
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* ```typescript
|
|
229
|
+
* .textOutline('#000000') // Black outline
|
|
230
|
+
* .textOutline('#FFFFFF', 2) // White outline with 2px thickness
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
export declare function textOutline(color: string, thickness?: number): TextShadowModifier;
|
|
234
|
+
/**
|
|
235
|
+
* Embossed text effect
|
|
236
|
+
*
|
|
237
|
+
* @example
|
|
238
|
+
* ```typescript
|
|
239
|
+
* .textEmbossed() // Default embossed effect
|
|
240
|
+
* .textEmbossed('#ffffff', '#000000') // Custom light and dark colors
|
|
241
|
+
* ```
|
|
242
|
+
*/
|
|
243
|
+
export declare function textEmbossed(lightColor?: string, darkColor?: string): TextShadowModifier;
|
|
244
|
+
/**
|
|
245
|
+
* Engraved text effect (opposite of embossed)
|
|
246
|
+
*
|
|
247
|
+
* @example
|
|
248
|
+
* ```typescript
|
|
249
|
+
* .textEngraved() // Default engraved effect
|
|
250
|
+
* .textEngraved('#000000', '#ffffff') // Custom dark and light colors
|
|
251
|
+
* ```
|
|
252
|
+
*/
|
|
253
|
+
export declare function textEngraved(darkColor?: string, lightColor?: string): TextShadowModifier;
|
|
254
|
+
/**
|
|
255
|
+
* SwiftUI-compatible shadow modifier (matches SwiftUI .shadow() behavior)
|
|
256
|
+
*
|
|
257
|
+
* @example
|
|
258
|
+
* ```typescript
|
|
259
|
+
* .swiftUIShadow() // Default SwiftUI shadow
|
|
260
|
+
* .swiftUIShadow({ radius: 8, y: 4 }) // Custom SwiftUI shadow
|
|
261
|
+
* ```
|
|
262
|
+
*/
|
|
263
|
+
export declare function swiftUIShadow(config?: {
|
|
264
|
+
color?: string;
|
|
265
|
+
radius?: number;
|
|
266
|
+
x?: number;
|
|
267
|
+
y?: number;
|
|
268
|
+
}): ShadowModifier;
|
|
269
|
+
/**
|
|
270
|
+
* Convenience functions for common shadow directions
|
|
271
|
+
*/
|
|
272
|
+
export declare const shadowDirections: {
|
|
273
|
+
/**
|
|
274
|
+
* Top shadow (light coming from below)
|
|
275
|
+
*/
|
|
276
|
+
top: (intensity?: number) => ShadowModifier;
|
|
277
|
+
/**
|
|
278
|
+
* Bottom shadow (light coming from above) - most common
|
|
279
|
+
*/
|
|
280
|
+
bottom: (intensity?: number) => ShadowModifier;
|
|
281
|
+
/**
|
|
282
|
+
* Left shadow (light coming from right)
|
|
283
|
+
*/
|
|
284
|
+
left: (intensity?: number) => ShadowModifier;
|
|
285
|
+
/**
|
|
286
|
+
* Right shadow (light coming from left)
|
|
287
|
+
*/
|
|
288
|
+
right: (intensity?: number) => ShadowModifier;
|
|
289
|
+
/**
|
|
290
|
+
* All-around shadow (ambient lighting)
|
|
291
|
+
*/
|
|
292
|
+
around: (intensity?: number) => ShadowModifier;
|
|
293
|
+
};
|
|
294
|
+
/**
|
|
295
|
+
* Create a reactive shadow that responds to a signal
|
|
296
|
+
*
|
|
297
|
+
* @example
|
|
298
|
+
* ```typescript
|
|
299
|
+
* const isHovered = createSignal(false)
|
|
300
|
+
* .reactiveShadow(isHovered,
|
|
301
|
+
* { x: 0, y: 2, blur: 4, color: 'rgba(0,0,0,0.1)' }, // normal
|
|
302
|
+
* { x: 0, y: 8, blur: 16, color: 'rgba(0,0,0,0.2)' } // hovered
|
|
303
|
+
* )
|
|
304
|
+
* ```
|
|
305
|
+
*/
|
|
306
|
+
export declare function reactiveShadow(condition: Signal<boolean>, trueShadow: ShadowConfig, falseShadow?: ShadowConfig): ShadowModifier;
|
|
307
|
+
/**
|
|
308
|
+
* Animated shadow that transitions between states
|
|
309
|
+
*
|
|
310
|
+
* @example
|
|
311
|
+
* ```typescript
|
|
312
|
+
* .animatedShadow(300) // 300ms transition
|
|
313
|
+
* ```
|
|
314
|
+
*/
|
|
315
|
+
export declare function animatedShadow(_duration?: number): ShadowModifier;
|
|
316
|
+
//# sourceMappingURL=index.d.ts.map
|