@tachui/modifiers 0.8.15 → 0.8.17
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/appearance/background.d.ts +0 -4
- package/dist/appearance/background.d.ts.map +1 -1
- package/dist/appearance/border.d.ts +3 -0
- package/dist/appearance/border.d.ts.map +1 -1
- package/dist/appearance/index.js +9 -9
- package/dist/base.d.ts +3 -0
- package/dist/base.d.ts.map +1 -1
- package/dist/base.js +2 -2
- package/dist/basic/base.d.ts +6 -0
- package/dist/basic/base.d.ts.map +1 -1
- package/dist/basic/index.js +172 -168
- package/dist/basic/margin.js +1 -1
- package/dist/basic/padding.js +1 -1
- package/dist/basic/size.js +4 -4
- package/dist/effects/backdrop/index.js +1 -1
- package/dist/effects/filters/index.d.ts +12 -8
- package/dist/effects/filters/index.d.ts.map +1 -1
- package/dist/effects/filters/index.js +145 -120
- package/dist/effects/shadows/index.d.ts +1 -0
- package/dist/effects/shadows/index.d.ts.map +1 -1
- package/dist/effects/shadows/index.js +237 -190
- package/dist/effects/transforms/index.d.ts +17 -12
- package/dist/effects/transforms/index.d.ts.map +1 -1
- package/dist/effects/transforms/index.js +141 -99
- package/dist/index.js +185 -181
- package/dist/interaction/index.js +36 -36
- package/dist/layout/flexbox.d.ts +3 -0
- package/dist/layout/flexbox.d.ts.map +1 -1
- package/dist/layout/index.js +17 -14
- package/dist/layout/overlay.d.ts +18 -2
- package/dist/layout/overlay.d.ts.map +1 -1
- package/dist/layout/position.d.ts +9 -2
- package/dist/layout/position.d.ts.map +1 -1
- package/dist/{modifiers-basic-D-JVI3kT.js → modifiers-basic-D7okQBOJ.js} +2008 -1803
- package/dist/preload/basic.js +170 -166
- package/dist/types.d.ts +7 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/typography/index.js +17 -16
- package/dist/typography/text.js +1 -1
- package/dist/typography/typography.d.ts +2 -0
- package/dist/typography/typography.d.ts.map +1 -1
- package/dist/utility/index.js +9 -9
- package/package.json +4 -4
|
@@ -1,176 +1,223 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { isSignal as n, isComputed as
|
|
5
|
-
import { BaseModifier as
|
|
6
|
-
class d extends
|
|
1
|
+
var b = Object.defineProperty;
|
|
2
|
+
var x = (o, a, e) => a in o ? b(o, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[a] = e;
|
|
3
|
+
var u = (o, a, e) => x(o, typeof a != "symbol" ? a + "" : a, e);
|
|
4
|
+
import { isSignal as n, isComputed as i, createEffect as p, getThemeSignal as w } from "@tachui/core/reactive";
|
|
5
|
+
import { BaseModifier as y } from "@tachui/core/modifiers/base";
|
|
6
|
+
class d extends y {
|
|
7
7
|
constructor(e) {
|
|
8
|
-
const
|
|
9
|
-
for (const [
|
|
10
|
-
typeof
|
|
11
|
-
super(
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
const s = {};
|
|
9
|
+
for (const [r, l] of Object.entries(e))
|
|
10
|
+
typeof l == "function" && "peek" in l ? s[r] = l.peek() : s[r] = l;
|
|
11
|
+
super(s);
|
|
12
|
+
u(this, "type", "shadow");
|
|
13
|
+
u(this, "priority", 25);
|
|
14
14
|
}
|
|
15
|
-
apply(e,
|
|
16
|
-
|
|
15
|
+
apply(e, s) {
|
|
16
|
+
s.element && this.applyShadowStyles(s.element, this.properties);
|
|
17
17
|
}
|
|
18
|
-
applyShadowStyles(e,
|
|
19
|
-
|
|
18
|
+
applyShadowStyles(e, s) {
|
|
19
|
+
s.shadow && (typeof s.shadow == "string" ? this.applyStyles(e, { boxShadow: s.shadow }) : Array.isArray(s.shadow) ? this.applyMultipleShadows(e, s.shadow) : this.applySingleShadow(e, s.shadow));
|
|
20
20
|
}
|
|
21
|
-
applySingleShadow(e,
|
|
22
|
-
|
|
23
|
-
(t) => n(t) ||
|
|
24
|
-
))
|
|
21
|
+
applySingleShadow(e, s) {
|
|
22
|
+
const r = Object.values(s).some(
|
|
23
|
+
(t) => n(t) || i(t) || this.isAssetValue(t)
|
|
24
|
+
), l = Object.values(s).some(
|
|
25
|
+
(t) => this.isAssetValue(t)
|
|
26
|
+
);
|
|
27
|
+
if (r)
|
|
25
28
|
p(() => {
|
|
26
|
-
|
|
29
|
+
l && w()();
|
|
30
|
+
const t = this.generateShadowCSS(s);
|
|
27
31
|
this.applyStyleChange(e, "boxShadow", t);
|
|
28
32
|
});
|
|
29
33
|
else {
|
|
30
|
-
const t = this.generateShadowCSS(
|
|
34
|
+
const t = this.generateShadowCSS(s);
|
|
31
35
|
this.applyStyles(e, { boxShadow: t });
|
|
32
36
|
}
|
|
33
37
|
}
|
|
34
|
-
applyMultipleShadows(e,
|
|
35
|
-
|
|
36
|
-
(t) => Object.values(t).some(
|
|
37
|
-
|
|
38
|
+
applyMultipleShadows(e, s) {
|
|
39
|
+
const r = s.some(
|
|
40
|
+
(t) => Object.values(t).some(
|
|
41
|
+
(h) => n(h) || i(h) || this.isAssetValue(h)
|
|
42
|
+
)
|
|
43
|
+
), l = s.some(
|
|
44
|
+
(t) => Object.values(t).some((h) => this.isAssetValue(h))
|
|
45
|
+
);
|
|
46
|
+
if (r)
|
|
38
47
|
p(() => {
|
|
39
|
-
|
|
48
|
+
l && w()();
|
|
49
|
+
const t = s.map((h) => this.generateShadowCSS(h)).join(", ");
|
|
40
50
|
this.applyStyleChange(e, "boxShadow", t);
|
|
41
51
|
});
|
|
42
52
|
else {
|
|
43
|
-
const t =
|
|
53
|
+
const t = s.map((h) => this.generateShadowCSS(h)).join(", ");
|
|
44
54
|
this.applyStyles(e, { boxShadow: t });
|
|
45
55
|
}
|
|
46
56
|
}
|
|
47
57
|
generateShadowCSS(e) {
|
|
48
|
-
const
|
|
49
|
-
return `${this.resolveValue(e.inset, !1) ? "inset " : ""}${
|
|
58
|
+
const s = this.resolveValue(e.x, 0), r = this.resolveValue(e.y, 0), l = this.resolveValue(e.blur !== void 0 ? e.blur : e.radius, 0), t = e.spread !== void 0 ? this.resolveValue(e.spread, 0) : 0, h = this.resolveValue(e.color, "rgba(0,0,0,0.25)");
|
|
59
|
+
return `${this.resolveValue(e.inset, !1) ? "inset " : ""}${s}px ${r}px ${l}px ${t}px ${h}`;
|
|
50
60
|
}
|
|
51
|
-
resolveValue(e,
|
|
52
|
-
return n(e) ||
|
|
61
|
+
resolveValue(e, s) {
|
|
62
|
+
return n(e) || i(e) ? e() : this.isAssetValue(e) ? e.resolve() : e !== void 0 ? e : s;
|
|
53
63
|
}
|
|
54
64
|
}
|
|
55
|
-
class
|
|
65
|
+
class S extends y {
|
|
56
66
|
constructor(e) {
|
|
57
|
-
const
|
|
58
|
-
for (const [
|
|
59
|
-
typeof
|
|
60
|
-
super(
|
|
61
|
-
|
|
62
|
-
|
|
67
|
+
const s = {};
|
|
68
|
+
for (const [r, l] of Object.entries(e))
|
|
69
|
+
typeof l == "function" && "peek" in l ? s[r] = l.peek() : s[r] = l;
|
|
70
|
+
super(s);
|
|
71
|
+
u(this, "type", "textShadow");
|
|
72
|
+
u(this, "priority", 26);
|
|
63
73
|
}
|
|
64
|
-
apply(e,
|
|
65
|
-
|
|
74
|
+
apply(e, s) {
|
|
75
|
+
s.element && this.applyTextShadowStyles(s.element, this.properties);
|
|
66
76
|
}
|
|
67
|
-
applyTextShadowStyles(e,
|
|
68
|
-
|
|
77
|
+
applyTextShadowStyles(e, s) {
|
|
78
|
+
s.textShadow && (typeof s.textShadow == "string" ? this.applyStyles(e, { textShadow: s.textShadow }) : Array.isArray(s.textShadow) ? this.applyMultipleTextShadows(e, s.textShadow) : this.applySingleTextShadow(e, s.textShadow));
|
|
69
79
|
}
|
|
70
|
-
applySingleTextShadow(e,
|
|
71
|
-
|
|
72
|
-
(t) => n(t) ||
|
|
73
|
-
))
|
|
80
|
+
applySingleTextShadow(e, s) {
|
|
81
|
+
const r = Object.values(s).some(
|
|
82
|
+
(t) => n(t) || i(t) || this.isAssetValue(t)
|
|
83
|
+
), l = Object.values(s).some(
|
|
84
|
+
(t) => this.isAssetValue(t)
|
|
85
|
+
);
|
|
86
|
+
if (r)
|
|
74
87
|
p(() => {
|
|
75
|
-
|
|
88
|
+
l && w()();
|
|
89
|
+
const t = this.generateTextShadowCSS(s);
|
|
76
90
|
this.applyStyleChange(e, "textShadow", t);
|
|
77
91
|
});
|
|
78
92
|
else {
|
|
79
|
-
const t = this.generateTextShadowCSS(
|
|
93
|
+
const t = this.generateTextShadowCSS(s);
|
|
80
94
|
this.applyStyles(e, { textShadow: t });
|
|
81
95
|
}
|
|
82
96
|
}
|
|
83
|
-
applyMultipleTextShadows(e,
|
|
84
|
-
|
|
85
|
-
(t) => Object.values(t).some(
|
|
86
|
-
|
|
97
|
+
applyMultipleTextShadows(e, s) {
|
|
98
|
+
const r = s.some(
|
|
99
|
+
(t) => Object.values(t).some(
|
|
100
|
+
(h) => n(h) || i(h) || this.isAssetValue(h)
|
|
101
|
+
)
|
|
102
|
+
), l = s.some(
|
|
103
|
+
(t) => Object.values(t).some((h) => this.isAssetValue(h))
|
|
104
|
+
);
|
|
105
|
+
if (r)
|
|
87
106
|
p(() => {
|
|
88
|
-
|
|
107
|
+
l && w()();
|
|
108
|
+
const t = s.map((h) => this.generateTextShadowCSS(h)).join(", ");
|
|
89
109
|
this.applyStyleChange(e, "textShadow", t);
|
|
90
110
|
});
|
|
91
111
|
else {
|
|
92
|
-
const t =
|
|
112
|
+
const t = s.map((h) => this.generateTextShadowCSS(h)).join(", ");
|
|
93
113
|
this.applyStyles(e, { textShadow: t });
|
|
94
114
|
}
|
|
95
115
|
}
|
|
96
116
|
generateTextShadowCSS(e) {
|
|
97
|
-
const
|
|
98
|
-
return `${
|
|
117
|
+
const s = this.resolveValue(e.x, 0), r = this.resolveValue(e.y, 0), l = this.resolveValue(e.blur !== void 0 ? e.blur : e.radius, 0), t = this.resolveValue(e.color, "rgba(0,0,0,0.5)");
|
|
118
|
+
return `${s}px ${r}px ${l}px ${t}`;
|
|
99
119
|
}
|
|
100
|
-
resolveValue(e,
|
|
101
|
-
return n(e) ||
|
|
120
|
+
resolveValue(e, s) {
|
|
121
|
+
return n(e) || i(e) ? e() : this.isAssetValue(e) ? e.resolve() : e !== void 0 ? e : s;
|
|
102
122
|
}
|
|
103
123
|
}
|
|
104
|
-
class
|
|
124
|
+
class f extends y {
|
|
105
125
|
constructor(e) {
|
|
106
|
-
const
|
|
107
|
-
for (const [
|
|
108
|
-
typeof
|
|
109
|
-
super(
|
|
110
|
-
|
|
111
|
-
|
|
126
|
+
const s = {};
|
|
127
|
+
for (const [r, l] of Object.entries(e))
|
|
128
|
+
typeof l == "function" && "peek" in l ? s[r] = l.peek() : s[r] = l;
|
|
129
|
+
super(s);
|
|
130
|
+
u(this, "type", "dropShadow");
|
|
131
|
+
u(this, "priority", 27);
|
|
112
132
|
}
|
|
113
|
-
apply(e,
|
|
114
|
-
|
|
133
|
+
apply(e, s) {
|
|
134
|
+
s.element && this.applyDropShadowStyles(s.element, this.properties);
|
|
115
135
|
}
|
|
116
|
-
applyDropShadowStyles(e,
|
|
117
|
-
|
|
136
|
+
applyDropShadowStyles(e, s) {
|
|
137
|
+
s.dropShadow && (typeof s.dropShadow == "string" ? this.applyFilterDropShadow(e, s.dropShadow) : Array.isArray(s.dropShadow) ? this.applyMultipleDropShadows(e, s.dropShadow) : this.applySingleDropShadow(e, s.dropShadow));
|
|
118
138
|
}
|
|
119
|
-
applySingleDropShadow(e,
|
|
120
|
-
|
|
121
|
-
(t) => n(t) ||
|
|
122
|
-
))
|
|
139
|
+
applySingleDropShadow(e, s) {
|
|
140
|
+
const r = Object.values(s).some(
|
|
141
|
+
(t) => n(t) || i(t) || this.isAssetValue(t)
|
|
142
|
+
), l = Object.values(s).some(
|
|
143
|
+
(t) => this.isAssetValue(t)
|
|
144
|
+
);
|
|
145
|
+
if (r)
|
|
123
146
|
p(() => {
|
|
124
|
-
|
|
147
|
+
l && w()();
|
|
148
|
+
const t = this.generateDropShadowCSS(s);
|
|
125
149
|
this.applyFilterDropShadow(e, t);
|
|
126
150
|
});
|
|
127
151
|
else {
|
|
128
|
-
const t = this.generateDropShadowCSS(
|
|
152
|
+
const t = this.generateDropShadowCSS(s);
|
|
129
153
|
this.applyFilterDropShadow(e, t);
|
|
130
154
|
}
|
|
131
155
|
}
|
|
132
|
-
applyMultipleDropShadows(e,
|
|
133
|
-
|
|
134
|
-
(t) => Object.values(t).some(
|
|
135
|
-
|
|
156
|
+
applyMultipleDropShadows(e, s) {
|
|
157
|
+
const r = s.some(
|
|
158
|
+
(t) => Object.values(t).some(
|
|
159
|
+
(h) => n(h) || i(h) || this.isAssetValue(h)
|
|
160
|
+
)
|
|
161
|
+
), l = s.some(
|
|
162
|
+
(t) => Object.values(t).some((h) => this.isAssetValue(h))
|
|
163
|
+
);
|
|
164
|
+
if (r)
|
|
136
165
|
p(() => {
|
|
137
|
-
|
|
166
|
+
l && w()();
|
|
167
|
+
const t = s.map((h) => `drop-shadow(${this.generateDropShadowCSS(h)})`).join(" ");
|
|
138
168
|
this.applyStyles(e, { filter: t });
|
|
139
169
|
});
|
|
140
170
|
else {
|
|
141
|
-
const t =
|
|
171
|
+
const t = s.map((h) => `drop-shadow(${this.generateDropShadowCSS(h)})`).join(" ");
|
|
142
172
|
this.applyStyles(e, { filter: t });
|
|
143
173
|
}
|
|
144
174
|
}
|
|
145
|
-
applyFilterDropShadow(e,
|
|
146
|
-
const
|
|
147
|
-
this.applyStyles(e, { filter:
|
|
175
|
+
applyFilterDropShadow(e, s) {
|
|
176
|
+
const r = e.style.filter || "", l = this.removeDropShadowFunctions(r), t = l ? `${l} drop-shadow(${s})` : `drop-shadow(${s})`;
|
|
177
|
+
this.applyStyles(e, { filter: t });
|
|
148
178
|
}
|
|
149
179
|
generateDropShadowCSS(e) {
|
|
150
|
-
const
|
|
151
|
-
return `${
|
|
180
|
+
const s = this.resolveValue(e.x, 0), r = this.resolveValue(e.y, 0), l = this.resolveValue(e.blur !== void 0 ? e.blur : e.radius, 0), t = this.resolveValue(e.color, "rgba(0,0,0,0.25)");
|
|
181
|
+
return `${s}px ${r}px ${l}px ${t}`;
|
|
152
182
|
}
|
|
153
|
-
resolveValue(e,
|
|
154
|
-
return n(e) ||
|
|
183
|
+
resolveValue(e, s) {
|
|
184
|
+
return n(e) || i(e) ? e() : this.isAssetValue(e) ? e.resolve() : e !== void 0 ? e : s;
|
|
185
|
+
}
|
|
186
|
+
removeDropShadowFunctions(e) {
|
|
187
|
+
if (!e) return "";
|
|
188
|
+
let s = "", r = 0;
|
|
189
|
+
for (; r < e.length; )
|
|
190
|
+
if (e.startsWith("drop-shadow(", r)) {
|
|
191
|
+
r += 12;
|
|
192
|
+
let l = 1;
|
|
193
|
+
for (; r < e.length && l > 0; ) {
|
|
194
|
+
const t = e[r];
|
|
195
|
+
t === "(" && (l += 1), t === ")" && (l -= 1), r += 1;
|
|
196
|
+
}
|
|
197
|
+
for (; r < e.length && /\s/.test(e[r]); )
|
|
198
|
+
r += 1;
|
|
199
|
+
} else
|
|
200
|
+
s += e[r], r += 1;
|
|
201
|
+
return s.trim().replace(/\s+/g, " ");
|
|
155
202
|
}
|
|
156
203
|
}
|
|
157
|
-
function
|
|
158
|
-
return new d({ shadow:
|
|
204
|
+
function c(o) {
|
|
205
|
+
return new d({ shadow: o });
|
|
159
206
|
}
|
|
160
|
-
function
|
|
161
|
-
return new
|
|
207
|
+
function j(o) {
|
|
208
|
+
return new S({ textShadow: o });
|
|
162
209
|
}
|
|
163
|
-
function
|
|
164
|
-
return new
|
|
210
|
+
function $(o) {
|
|
211
|
+
return new f({ dropShadow: o });
|
|
165
212
|
}
|
|
166
|
-
function D(
|
|
167
|
-
return new d({ shadow:
|
|
213
|
+
function D(o) {
|
|
214
|
+
return new d({ shadow: o });
|
|
168
215
|
}
|
|
169
|
-
function O(
|
|
170
|
-
return new d({ shadow: { ...
|
|
216
|
+
function O(o) {
|
|
217
|
+
return new d({ shadow: { ...o, inset: !0 } });
|
|
171
218
|
}
|
|
172
|
-
function
|
|
173
|
-
const
|
|
219
|
+
function g(o) {
|
|
220
|
+
const a = {
|
|
174
221
|
none: "none",
|
|
175
222
|
small: { x: 0, y: 1, blur: 3, spread: 0, color: "rgba(0, 0, 0, 0.12)" },
|
|
176
223
|
medium: { x: 0, y: 4, blur: 6, spread: -1, color: "rgba(0, 0, 0, 0.1)" },
|
|
@@ -199,10 +246,10 @@ function f(r) {
|
|
|
199
246
|
},
|
|
200
247
|
outline: { x: 0, y: 0, blur: 0, spread: 1, color: "rgba(0, 0, 0, 0.05)" }
|
|
201
248
|
};
|
|
202
|
-
return new d({ shadow:
|
|
249
|
+
return new d({ shadow: a[o] });
|
|
203
250
|
}
|
|
204
|
-
function
|
|
205
|
-
const
|
|
251
|
+
function T(o) {
|
|
252
|
+
const a = {
|
|
206
253
|
0: [],
|
|
207
254
|
1: [
|
|
208
255
|
{ x: 0, y: 1, blur: 3, spread: 0, color: "rgba(0, 0, 0, 0.12)" },
|
|
@@ -224,182 +271,182 @@ function R(r) {
|
|
|
224
271
|
{ x: 0, y: 30, blur: 60, spread: 0, color: "rgba(0, 0, 0, 0.15)" },
|
|
225
272
|
{ x: 0, y: 8, blur: 16, spread: 0, color: "rgba(0, 0, 0, 0.12)" }
|
|
226
273
|
]
|
|
227
|
-
}, e =
|
|
274
|
+
}, e = a[o] || a[1];
|
|
228
275
|
return new d({ shadow: e });
|
|
229
276
|
}
|
|
230
|
-
function
|
|
277
|
+
function M(o, a = 6) {
|
|
231
278
|
const e = [
|
|
232
|
-
{ x: 0, y: 0, blur:
|
|
233
|
-
{ x: 0, y: 0, blur:
|
|
279
|
+
{ x: 0, y: 0, blur: a, spread: 0, color: o },
|
|
280
|
+
{ x: 0, y: 0, blur: a * 2, spread: 0, color: o + "80" },
|
|
234
281
|
// 50% opacity
|
|
235
|
-
{ x: 0, y: 0, blur:
|
|
282
|
+
{ x: 0, y: 0, blur: a * 3, spread: 0, color: o + "40" }
|
|
236
283
|
// 25% opacity
|
|
237
284
|
];
|
|
238
285
|
return new d({ shadow: e });
|
|
239
286
|
}
|
|
240
|
-
function
|
|
287
|
+
function k(o, a = 10) {
|
|
241
288
|
const e = [
|
|
242
|
-
{ x: 0, y: 0, blur:
|
|
243
|
-
{ x: 0, y: 0, blur:
|
|
289
|
+
{ x: 0, y: 0, blur: a / 2, spread: 0, color: o },
|
|
290
|
+
{ x: 0, y: 0, blur: a, spread: 0, color: o + "CC" },
|
|
244
291
|
// 80% opacity
|
|
245
|
-
{ x: 0, y: 0, blur:
|
|
292
|
+
{ x: 0, y: 0, blur: a * 2, spread: 0, color: o + "99" },
|
|
246
293
|
// 60% opacity
|
|
247
|
-
{ x: 0, y: 0, blur:
|
|
294
|
+
{ x: 0, y: 0, blur: a * 3, spread: 0, color: o + "66" }
|
|
248
295
|
// 40% opacity
|
|
249
296
|
];
|
|
250
297
|
return new d({ shadow: e });
|
|
251
298
|
}
|
|
252
|
-
function
|
|
253
|
-
const
|
|
254
|
-
{ x: -8, y: -8, blur: 16, spread: 0, color:
|
|
299
|
+
function F(o, a = !1) {
|
|
300
|
+
const r = [
|
|
301
|
+
{ x: -8, y: -8, blur: 16, spread: 0, color: a ? "rgba(255, 255, 255, 0.1)" : "rgba(255, 255, 255, 0.7)" },
|
|
255
302
|
// Top-left light
|
|
256
|
-
{ x: 8, y: 8, blur: 16, spread: 0, color:
|
|
303
|
+
{ x: 8, y: 8, blur: 16, spread: 0, color: a ? "rgba(0, 0, 0, 0.5)" : "rgba(0, 0, 0, 0.15)" }
|
|
257
304
|
// Bottom-right dark
|
|
258
305
|
];
|
|
259
|
-
return new d({ shadow:
|
|
306
|
+
return new d({ shadow: r });
|
|
260
307
|
}
|
|
261
|
-
function
|
|
262
|
-
const
|
|
263
|
-
{ x: 8, y: 8, blur: 16, spread: 0, color:
|
|
308
|
+
function I(o, a = !1) {
|
|
309
|
+
const r = [
|
|
310
|
+
{ x: 8, y: 8, blur: 16, spread: 0, color: a ? "rgba(0, 0, 0, 0.8)" : "rgba(0, 0, 0, 0.2)", inset: !0 },
|
|
264
311
|
// Inner dark
|
|
265
|
-
{ x: -8, y: -8, blur: 16, spread: 0, color:
|
|
312
|
+
{ x: -8, y: -8, blur: 16, spread: 0, color: a ? "rgba(255, 255, 255, 0.05)" : "rgba(255, 255, 255, 0.5)", inset: !0 }
|
|
266
313
|
// Inner light
|
|
267
314
|
];
|
|
268
|
-
return new d({ shadow:
|
|
315
|
+
return new d({ shadow: r });
|
|
269
316
|
}
|
|
270
|
-
function
|
|
317
|
+
function R(o = 3, a = 0.6) {
|
|
271
318
|
const e = [];
|
|
272
|
-
for (let
|
|
273
|
-
const
|
|
319
|
+
for (let s = 1; s <= o; s++) {
|
|
320
|
+
const r = Math.max(0.05, a * (1 - (s - 1) / o));
|
|
274
321
|
e.push({
|
|
275
322
|
x: 0,
|
|
276
|
-
y:
|
|
277
|
-
blur:
|
|
323
|
+
y: s * 2,
|
|
324
|
+
blur: s * 4,
|
|
278
325
|
spread: 0,
|
|
279
|
-
color: `rgba(0, 0, 0, ${
|
|
326
|
+
color: `rgba(0, 0, 0, ${r})`
|
|
280
327
|
});
|
|
281
328
|
}
|
|
282
329
|
return new d({ shadow: e });
|
|
283
330
|
}
|
|
284
|
-
function _(
|
|
285
|
-
return new
|
|
286
|
-
textShadow: { x: 0, y: 1, blur: 1, color:
|
|
331
|
+
function _(o = "rgba(0, 0, 0, 0.2)") {
|
|
332
|
+
return new S({
|
|
333
|
+
textShadow: { x: 0, y: 1, blur: 1, color: o }
|
|
287
334
|
});
|
|
288
335
|
}
|
|
289
|
-
function E(
|
|
290
|
-
return new
|
|
291
|
-
textShadow: { x: 1, y: 1, blur: 3, color:
|
|
336
|
+
function E(o = "rgba(0, 0, 0, 0.5)") {
|
|
337
|
+
return new S({
|
|
338
|
+
textShadow: { x: 1, y: 1, blur: 3, color: o }
|
|
292
339
|
});
|
|
293
340
|
}
|
|
294
|
-
function P(
|
|
341
|
+
function P(o, a = 1) {
|
|
295
342
|
const e = [];
|
|
296
|
-
for (let
|
|
297
|
-
for (let
|
|
298
|
-
(
|
|
299
|
-
return new
|
|
343
|
+
for (let s = -a; s <= a; s++)
|
|
344
|
+
for (let r = -a; r <= a; r++)
|
|
345
|
+
(s !== 0 || r !== 0) && e.push({ x: s, y: r, blur: 0, color: o });
|
|
346
|
+
return new S({ textShadow: e });
|
|
300
347
|
}
|
|
301
|
-
function B(
|
|
348
|
+
function B(o = "rgba(255, 255, 255, 0.8)", a = "rgba(0, 0, 0, 0.3)") {
|
|
302
349
|
const e = [
|
|
303
|
-
{ x: 0, y: 1, blur: 0, color:
|
|
350
|
+
{ x: 0, y: 1, blur: 0, color: o },
|
|
304
351
|
// Light highlight
|
|
305
|
-
{ x: 0, y: -1, blur: 0, color:
|
|
352
|
+
{ x: 0, y: -1, blur: 0, color: a }
|
|
306
353
|
// Dark shadow
|
|
307
354
|
];
|
|
308
|
-
return new
|
|
355
|
+
return new S({ textShadow: e });
|
|
309
356
|
}
|
|
310
|
-
function
|
|
357
|
+
function U(o = "rgba(0, 0, 0, 0.5)", a = "rgba(255, 255, 255, 0.2)") {
|
|
311
358
|
const e = [
|
|
312
|
-
{ x: 0, y: 1, blur: 0, color:
|
|
359
|
+
{ x: 0, y: 1, blur: 0, color: o },
|
|
313
360
|
// Dark shadow
|
|
314
|
-
{ x: 0, y: -1, blur: 0, color:
|
|
361
|
+
{ x: 0, y: -1, blur: 0, color: a }
|
|
315
362
|
// Light highlight
|
|
316
363
|
];
|
|
317
|
-
return new
|
|
364
|
+
return new S({ textShadow: e });
|
|
318
365
|
}
|
|
319
|
-
function
|
|
320
|
-
const { color:
|
|
366
|
+
function W(o = {}) {
|
|
367
|
+
const { color: a = "rgba(0, 0, 0, 0.2)", radius: e = 10, x: s = 0, y: r = 0 } = o;
|
|
321
368
|
return new d({
|
|
322
|
-
shadow: { x:
|
|
369
|
+
shadow: { x: s, y: r, blur: e, color: a }
|
|
323
370
|
});
|
|
324
371
|
}
|
|
325
|
-
const
|
|
372
|
+
const q = {
|
|
326
373
|
/**
|
|
327
374
|
* Top shadow (light coming from below)
|
|
328
375
|
*/
|
|
329
|
-
top: (
|
|
376
|
+
top: (o = 4) => c({
|
|
330
377
|
x: 0,
|
|
331
|
-
y: -
|
|
332
|
-
blur:
|
|
378
|
+
y: -o,
|
|
379
|
+
blur: o * 2,
|
|
333
380
|
color: "rgba(0,0,0,0.15)"
|
|
334
381
|
}),
|
|
335
382
|
/**
|
|
336
383
|
* Bottom shadow (light coming from above) - most common
|
|
337
384
|
*/
|
|
338
|
-
bottom: (
|
|
385
|
+
bottom: (o = 4) => c({
|
|
339
386
|
x: 0,
|
|
340
|
-
y:
|
|
341
|
-
blur:
|
|
387
|
+
y: o,
|
|
388
|
+
blur: o * 2,
|
|
342
389
|
color: "rgba(0,0,0,0.15)"
|
|
343
390
|
}),
|
|
344
391
|
/**
|
|
345
392
|
* Left shadow (light coming from right)
|
|
346
393
|
*/
|
|
347
|
-
left: (
|
|
348
|
-
x: -
|
|
394
|
+
left: (o = 4) => c({
|
|
395
|
+
x: -o,
|
|
349
396
|
y: 0,
|
|
350
|
-
blur:
|
|
397
|
+
blur: o * 2,
|
|
351
398
|
color: "rgba(0,0,0,0.15)"
|
|
352
399
|
}),
|
|
353
400
|
/**
|
|
354
401
|
* Right shadow (light coming from left)
|
|
355
402
|
*/
|
|
356
|
-
right: (
|
|
357
|
-
x:
|
|
403
|
+
right: (o = 4) => c({
|
|
404
|
+
x: o,
|
|
358
405
|
y: 0,
|
|
359
|
-
blur:
|
|
406
|
+
blur: o * 2,
|
|
360
407
|
color: "rgba(0,0,0,0.15)"
|
|
361
408
|
}),
|
|
362
409
|
/**
|
|
363
410
|
* All-around shadow (ambient lighting)
|
|
364
411
|
*/
|
|
365
|
-
around: (
|
|
412
|
+
around: (o = 6) => c({
|
|
366
413
|
x: 0,
|
|
367
414
|
y: 0,
|
|
368
|
-
blur:
|
|
369
|
-
spread:
|
|
415
|
+
blur: o * 2,
|
|
416
|
+
spread: o,
|
|
370
417
|
color: "rgba(0,0,0,0.1)"
|
|
371
418
|
})
|
|
372
419
|
};
|
|
373
|
-
function
|
|
374
|
-
const
|
|
375
|
-
return new d({ shadow:
|
|
420
|
+
function z(o, a, e = { x: 0, y: 0, blur: 0, color: "transparent" }) {
|
|
421
|
+
const s = o() ? a : e;
|
|
422
|
+
return new d({ shadow: s });
|
|
376
423
|
}
|
|
377
|
-
function
|
|
378
|
-
return
|
|
424
|
+
function G(o = 200) {
|
|
425
|
+
return g("medium");
|
|
379
426
|
}
|
|
380
427
|
export {
|
|
381
|
-
|
|
428
|
+
f as DropShadowModifier,
|
|
382
429
|
d as ShadowModifier,
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
430
|
+
S as TextShadowModifier,
|
|
431
|
+
G as animatedShadow,
|
|
432
|
+
$ as dropShadow,
|
|
433
|
+
T as elevationShadow,
|
|
434
|
+
M as glowEffect,
|
|
388
435
|
O as insetShadow,
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
436
|
+
R as layeredShadow,
|
|
437
|
+
k as neonEffect,
|
|
438
|
+
F as neumorphism,
|
|
439
|
+
I as neumorphismPressed,
|
|
440
|
+
z as reactiveShadow,
|
|
441
|
+
c as shadow,
|
|
442
|
+
q as shadowDirections,
|
|
443
|
+
g as shadowPreset,
|
|
397
444
|
D as shadows,
|
|
398
|
-
|
|
445
|
+
W as swiftUIShadow,
|
|
399
446
|
B as textEmbossed,
|
|
400
|
-
|
|
447
|
+
U as textEngraved,
|
|
401
448
|
P as textOutline,
|
|
402
|
-
|
|
449
|
+
j as textShadow,
|
|
403
450
|
E as textShadowStrong,
|
|
404
451
|
_ as textShadowSubtle
|
|
405
452
|
};
|