jean-react-utils 0.2.0 → 0.2.2
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 +157 -19
- package/dist/index.d.mts +182 -10
- package/dist/index.d.ts +182 -10
- package/dist/index.js +3704 -76
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3731 -81
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -4
package/dist/index.mjs
CHANGED
|
@@ -1,26 +1,2881 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x2, {
|
|
9
|
+
get: (a3, b3) => (typeof require !== "undefined" ? require : a3)[b3]
|
|
10
|
+
}) : x2)(function(x2) {
|
|
11
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
|
+
throw Error('Dynamic require of "' + x2 + '" is not supported');
|
|
13
|
+
});
|
|
14
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
15
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
16
|
+
};
|
|
17
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
19
|
+
for (let key of __getOwnPropNames(from))
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
21
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
26
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
27
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
28
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
29
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
30
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
31
|
+
mod
|
|
32
|
+
));
|
|
33
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
34
|
+
|
|
35
|
+
// ../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
|
|
36
|
+
var require_use_sync_external_store_shim_production = __commonJS({
|
|
37
|
+
"../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js"(exports) {
|
|
38
|
+
"use strict";
|
|
39
|
+
var React3 = __require("react");
|
|
40
|
+
function is(x2, y3) {
|
|
41
|
+
return x2 === y3 && (0 !== x2 || 1 / x2 === 1 / y3) || x2 !== x2 && y3 !== y3;
|
|
42
|
+
}
|
|
43
|
+
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
|
44
|
+
var useState4 = React3.useState;
|
|
45
|
+
var useEffect2 = React3.useEffect;
|
|
46
|
+
var useLayoutEffect = React3.useLayoutEffect;
|
|
47
|
+
var useDebugValue2 = React3.useDebugValue;
|
|
48
|
+
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
49
|
+
var value = getSnapshot(), _useState = useState4({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
50
|
+
useLayoutEffect(
|
|
51
|
+
function() {
|
|
52
|
+
inst.value = value;
|
|
53
|
+
inst.getSnapshot = getSnapshot;
|
|
54
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
55
|
+
},
|
|
56
|
+
[subscribe, value, getSnapshot]
|
|
57
|
+
);
|
|
58
|
+
useEffect2(
|
|
59
|
+
function() {
|
|
60
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
61
|
+
return subscribe(function() {
|
|
62
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
[subscribe]
|
|
66
|
+
);
|
|
67
|
+
useDebugValue2(value);
|
|
68
|
+
return value;
|
|
69
|
+
}
|
|
70
|
+
function checkIfSnapshotChanged(inst) {
|
|
71
|
+
var latestGetSnapshot = inst.getSnapshot;
|
|
72
|
+
inst = inst.value;
|
|
73
|
+
try {
|
|
74
|
+
var nextValue = latestGetSnapshot();
|
|
75
|
+
return !objectIs(inst, nextValue);
|
|
76
|
+
} catch (error) {
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
81
|
+
return getSnapshot();
|
|
82
|
+
}
|
|
83
|
+
var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
84
|
+
exports.useSyncExternalStore = void 0 !== React3.useSyncExternalStore ? React3.useSyncExternalStore : shim;
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// ../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
|
|
89
|
+
var require_use_sync_external_store_shim_development = __commonJS({
|
|
90
|
+
"../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
|
|
91
|
+
"use strict";
|
|
92
|
+
"production" !== process.env.NODE_ENV && function() {
|
|
93
|
+
function is(x2, y3) {
|
|
94
|
+
return x2 === y3 && (0 !== x2 || 1 / x2 === 1 / y3) || x2 !== x2 && y3 !== y3;
|
|
95
|
+
}
|
|
96
|
+
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
97
|
+
didWarnOld18Alpha || void 0 === React3.startTransition || (didWarnOld18Alpha = true, console.error(
|
|
98
|
+
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
99
|
+
));
|
|
100
|
+
var value = getSnapshot();
|
|
101
|
+
if (!didWarnUncachedGetSnapshot) {
|
|
102
|
+
var cachedValue = getSnapshot();
|
|
103
|
+
objectIs(value, cachedValue) || (console.error(
|
|
104
|
+
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
105
|
+
), didWarnUncachedGetSnapshot = true);
|
|
106
|
+
}
|
|
107
|
+
cachedValue = useState4({
|
|
108
|
+
inst: { value, getSnapshot }
|
|
109
|
+
});
|
|
110
|
+
var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
|
|
111
|
+
useLayoutEffect(
|
|
112
|
+
function() {
|
|
113
|
+
inst.value = value;
|
|
114
|
+
inst.getSnapshot = getSnapshot;
|
|
115
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
116
|
+
},
|
|
117
|
+
[subscribe, value, getSnapshot]
|
|
118
|
+
);
|
|
119
|
+
useEffect2(
|
|
120
|
+
function() {
|
|
121
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
122
|
+
return subscribe(function() {
|
|
123
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
124
|
+
});
|
|
125
|
+
},
|
|
126
|
+
[subscribe]
|
|
127
|
+
);
|
|
128
|
+
useDebugValue2(value);
|
|
129
|
+
return value;
|
|
130
|
+
}
|
|
131
|
+
function checkIfSnapshotChanged(inst) {
|
|
132
|
+
var latestGetSnapshot = inst.getSnapshot;
|
|
133
|
+
inst = inst.value;
|
|
134
|
+
try {
|
|
135
|
+
var nextValue = latestGetSnapshot();
|
|
136
|
+
return !objectIs(inst, nextValue);
|
|
137
|
+
} catch (error) {
|
|
138
|
+
return true;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
142
|
+
return getSnapshot();
|
|
143
|
+
}
|
|
144
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
145
|
+
var React3 = __require("react"), objectIs = "function" === typeof Object.is ? Object.is : is, useState4 = React3.useState, useEffect2 = React3.useEffect, useLayoutEffect = React3.useLayoutEffect, useDebugValue2 = React3.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
146
|
+
exports.useSyncExternalStore = void 0 !== React3.useSyncExternalStore ? React3.useSyncExternalStore : shim;
|
|
147
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
148
|
+
}();
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
// ../node_modules/use-sync-external-store/shim/index.js
|
|
153
|
+
var require_shim = __commonJS({
|
|
154
|
+
"../node_modules/use-sync-external-store/shim/index.js"(exports, module) {
|
|
155
|
+
"use strict";
|
|
156
|
+
if (process.env.NODE_ENV === "production") {
|
|
157
|
+
module.exports = require_use_sync_external_store_shim_production();
|
|
158
|
+
} else {
|
|
159
|
+
module.exports = require_use_sync_external_store_shim_development();
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// ../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js
|
|
165
|
+
var require_with_selector_production = __commonJS({
|
|
166
|
+
"../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js"(exports) {
|
|
167
|
+
"use strict";
|
|
168
|
+
var React3 = __require("react");
|
|
169
|
+
var shim = require_shim();
|
|
170
|
+
function is(x2, y3) {
|
|
171
|
+
return x2 === y3 && (0 !== x2 || 1 / x2 === 1 / y3) || x2 !== x2 && y3 !== y3;
|
|
172
|
+
}
|
|
173
|
+
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
|
174
|
+
var useSyncExternalStore = shim.useSyncExternalStore;
|
|
175
|
+
var useRef = React3.useRef;
|
|
176
|
+
var useEffect2 = React3.useEffect;
|
|
177
|
+
var useMemo2 = React3.useMemo;
|
|
178
|
+
var useDebugValue2 = React3.useDebugValue;
|
|
179
|
+
exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
180
|
+
var instRef = useRef(null);
|
|
181
|
+
if (null === instRef.current) {
|
|
182
|
+
var inst = { hasValue: false, value: null };
|
|
183
|
+
instRef.current = inst;
|
|
184
|
+
} else inst = instRef.current;
|
|
185
|
+
instRef = useMemo2(
|
|
186
|
+
function() {
|
|
187
|
+
function memoizedSelector(nextSnapshot) {
|
|
188
|
+
if (!hasMemo) {
|
|
189
|
+
hasMemo = true;
|
|
190
|
+
memoizedSnapshot = nextSnapshot;
|
|
191
|
+
nextSnapshot = selector(nextSnapshot);
|
|
192
|
+
if (void 0 !== isEqual && inst.hasValue) {
|
|
193
|
+
var currentSelection = inst.value;
|
|
194
|
+
if (isEqual(currentSelection, nextSnapshot))
|
|
195
|
+
return memoizedSelection = currentSelection;
|
|
196
|
+
}
|
|
197
|
+
return memoizedSelection = nextSnapshot;
|
|
198
|
+
}
|
|
199
|
+
currentSelection = memoizedSelection;
|
|
200
|
+
if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
|
|
201
|
+
var nextSelection = selector(nextSnapshot);
|
|
202
|
+
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
|
|
203
|
+
return memoizedSnapshot = nextSnapshot, currentSelection;
|
|
204
|
+
memoizedSnapshot = nextSnapshot;
|
|
205
|
+
return memoizedSelection = nextSelection;
|
|
206
|
+
}
|
|
207
|
+
var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
|
|
208
|
+
return [
|
|
209
|
+
function() {
|
|
210
|
+
return memoizedSelector(getSnapshot());
|
|
211
|
+
},
|
|
212
|
+
null === maybeGetServerSnapshot ? void 0 : function() {
|
|
213
|
+
return memoizedSelector(maybeGetServerSnapshot());
|
|
214
|
+
}
|
|
215
|
+
];
|
|
216
|
+
},
|
|
217
|
+
[getSnapshot, getServerSnapshot, selector, isEqual]
|
|
218
|
+
);
|
|
219
|
+
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
|
|
220
|
+
useEffect2(
|
|
221
|
+
function() {
|
|
222
|
+
inst.hasValue = true;
|
|
223
|
+
inst.value = value;
|
|
224
|
+
},
|
|
225
|
+
[value]
|
|
226
|
+
);
|
|
227
|
+
useDebugValue2(value);
|
|
228
|
+
return value;
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
// ../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
|
|
234
|
+
var require_with_selector_development = __commonJS({
|
|
235
|
+
"../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) {
|
|
236
|
+
"use strict";
|
|
237
|
+
"production" !== process.env.NODE_ENV && function() {
|
|
238
|
+
function is(x2, y3) {
|
|
239
|
+
return x2 === y3 && (0 !== x2 || 1 / x2 === 1 / y3) || x2 !== x2 && y3 !== y3;
|
|
240
|
+
}
|
|
241
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
242
|
+
var React3 = __require("react"), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef = React3.useRef, useEffect2 = React3.useEffect, useMemo2 = React3.useMemo, useDebugValue2 = React3.useDebugValue;
|
|
243
|
+
exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
244
|
+
var instRef = useRef(null);
|
|
245
|
+
if (null === instRef.current) {
|
|
246
|
+
var inst = { hasValue: false, value: null };
|
|
247
|
+
instRef.current = inst;
|
|
248
|
+
} else inst = instRef.current;
|
|
249
|
+
instRef = useMemo2(
|
|
250
|
+
function() {
|
|
251
|
+
function memoizedSelector(nextSnapshot) {
|
|
252
|
+
if (!hasMemo) {
|
|
253
|
+
hasMemo = true;
|
|
254
|
+
memoizedSnapshot = nextSnapshot;
|
|
255
|
+
nextSnapshot = selector(nextSnapshot);
|
|
256
|
+
if (void 0 !== isEqual && inst.hasValue) {
|
|
257
|
+
var currentSelection = inst.value;
|
|
258
|
+
if (isEqual(currentSelection, nextSnapshot))
|
|
259
|
+
return memoizedSelection = currentSelection;
|
|
260
|
+
}
|
|
261
|
+
return memoizedSelection = nextSnapshot;
|
|
262
|
+
}
|
|
263
|
+
currentSelection = memoizedSelection;
|
|
264
|
+
if (objectIs(memoizedSnapshot, nextSnapshot))
|
|
265
|
+
return currentSelection;
|
|
266
|
+
var nextSelection = selector(nextSnapshot);
|
|
267
|
+
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
|
|
268
|
+
return memoizedSnapshot = nextSnapshot, currentSelection;
|
|
269
|
+
memoizedSnapshot = nextSnapshot;
|
|
270
|
+
return memoizedSelection = nextSelection;
|
|
271
|
+
}
|
|
272
|
+
var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
|
|
273
|
+
return [
|
|
274
|
+
function() {
|
|
275
|
+
return memoizedSelector(getSnapshot());
|
|
276
|
+
},
|
|
277
|
+
null === maybeGetServerSnapshot ? void 0 : function() {
|
|
278
|
+
return memoizedSelector(maybeGetServerSnapshot());
|
|
279
|
+
}
|
|
280
|
+
];
|
|
281
|
+
},
|
|
282
|
+
[getSnapshot, getServerSnapshot, selector, isEqual]
|
|
283
|
+
);
|
|
284
|
+
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
|
|
285
|
+
useEffect2(
|
|
286
|
+
function() {
|
|
287
|
+
inst.hasValue = true;
|
|
288
|
+
inst.value = value;
|
|
289
|
+
},
|
|
290
|
+
[value]
|
|
291
|
+
);
|
|
292
|
+
useDebugValue2(value);
|
|
293
|
+
return value;
|
|
294
|
+
};
|
|
295
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
296
|
+
}();
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
// ../node_modules/use-sync-external-store/shim/with-selector.js
|
|
301
|
+
var require_with_selector = __commonJS({
|
|
302
|
+
"../node_modules/use-sync-external-store/shim/with-selector.js"(exports, module) {
|
|
303
|
+
"use strict";
|
|
304
|
+
if (process.env.NODE_ENV === "production") {
|
|
305
|
+
module.exports = require_with_selector_production();
|
|
306
|
+
} else {
|
|
307
|
+
module.exports = require_with_selector_development();
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
|
|
1
312
|
// src/components/Button/index.tsx
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
313
|
+
import * as React from "react";
|
|
314
|
+
|
|
315
|
+
// ../node_modules/clsx/dist/clsx.mjs
|
|
316
|
+
function r(e3) {
|
|
317
|
+
var t4, f3, n3 = "";
|
|
318
|
+
if ("string" == typeof e3 || "number" == typeof e3) n3 += e3;
|
|
319
|
+
else if ("object" == typeof e3) if (Array.isArray(e3)) {
|
|
320
|
+
var o3 = e3.length;
|
|
321
|
+
for (t4 = 0; t4 < o3; t4++) e3[t4] && (f3 = r(e3[t4])) && (n3 && (n3 += " "), n3 += f3);
|
|
322
|
+
} else for (f3 in e3) e3[f3] && (n3 && (n3 += " "), n3 += f3);
|
|
323
|
+
return n3;
|
|
324
|
+
}
|
|
325
|
+
function clsx() {
|
|
326
|
+
for (var e3, t4, f3 = 0, n3 = "", o3 = arguments.length; f3 < o3; f3++) (e3 = arguments[f3]) && (t4 = r(e3)) && (n3 && (n3 += " "), n3 += t4);
|
|
327
|
+
return n3;
|
|
328
|
+
}
|
|
329
|
+
var clsx_default = clsx;
|
|
330
|
+
|
|
331
|
+
// ../node_modules/class-variance-authority/dist/index.mjs
|
|
332
|
+
var falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
333
|
+
var cx = clsx;
|
|
334
|
+
var cva = (base, config) => (props) => {
|
|
335
|
+
var _config_compoundVariants;
|
|
336
|
+
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
337
|
+
const { variants, defaultVariants } = config;
|
|
338
|
+
const getVariantClassNames = Object.keys(variants).map((variant) => {
|
|
339
|
+
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
340
|
+
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
341
|
+
if (variantProp === null) return null;
|
|
342
|
+
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
343
|
+
return variants[variant][variantKey];
|
|
344
|
+
});
|
|
345
|
+
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
|
|
346
|
+
let [key, value] = param;
|
|
347
|
+
if (value === void 0) {
|
|
348
|
+
return acc;
|
|
349
|
+
}
|
|
350
|
+
acc[key] = value;
|
|
351
|
+
return acc;
|
|
352
|
+
}, {});
|
|
353
|
+
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
|
|
354
|
+
let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
|
|
355
|
+
return Object.entries(compoundVariantOptions).every((param2) => {
|
|
356
|
+
let [key, value] = param2;
|
|
357
|
+
return Array.isArray(value) ? value.includes({
|
|
358
|
+
...defaultVariants,
|
|
359
|
+
...propsWithoutUndefined
|
|
360
|
+
}[key]) : {
|
|
361
|
+
...defaultVariants,
|
|
362
|
+
...propsWithoutUndefined
|
|
363
|
+
}[key] === value;
|
|
364
|
+
}) ? [
|
|
365
|
+
...acc,
|
|
366
|
+
cvClass,
|
|
367
|
+
cvClassName
|
|
368
|
+
] : acc;
|
|
369
|
+
}, []);
|
|
370
|
+
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
// ../node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
374
|
+
var CLASS_PART_SEPARATOR = "-";
|
|
375
|
+
var createClassGroupUtils = (config) => {
|
|
376
|
+
const classMap = createClassMap(config);
|
|
377
|
+
const {
|
|
378
|
+
conflictingClassGroups,
|
|
379
|
+
conflictingClassGroupModifiers
|
|
380
|
+
} = config;
|
|
381
|
+
const getClassGroupId = (className) => {
|
|
382
|
+
const classParts = className.split(CLASS_PART_SEPARATOR);
|
|
383
|
+
if (classParts[0] === "" && classParts.length !== 1) {
|
|
384
|
+
classParts.shift();
|
|
385
|
+
}
|
|
386
|
+
return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
|
|
387
|
+
};
|
|
388
|
+
const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
|
|
389
|
+
const conflicts = conflictingClassGroups[classGroupId] || [];
|
|
390
|
+
if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
|
|
391
|
+
return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
|
|
392
|
+
}
|
|
393
|
+
return conflicts;
|
|
15
394
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
395
|
+
return {
|
|
396
|
+
getClassGroupId,
|
|
397
|
+
getConflictingClassGroupIds
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
var getGroupRecursive = (classParts, classPartObject) => {
|
|
401
|
+
if (classParts.length === 0) {
|
|
402
|
+
return classPartObject.classGroupId;
|
|
403
|
+
}
|
|
404
|
+
const currentClassPart = classParts[0];
|
|
405
|
+
const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
|
|
406
|
+
const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
|
|
407
|
+
if (classGroupFromNextClassPart) {
|
|
408
|
+
return classGroupFromNextClassPart;
|
|
409
|
+
}
|
|
410
|
+
if (classPartObject.validators.length === 0) {
|
|
411
|
+
return void 0;
|
|
412
|
+
}
|
|
413
|
+
const classRest = classParts.join(CLASS_PART_SEPARATOR);
|
|
414
|
+
return classPartObject.validators.find(({
|
|
415
|
+
validator
|
|
416
|
+
}) => validator(classRest))?.classGroupId;
|
|
417
|
+
};
|
|
418
|
+
var arbitraryPropertyRegex = /^\[(.+)\]$/;
|
|
419
|
+
var getGroupIdForArbitraryProperty = (className) => {
|
|
420
|
+
if (arbitraryPropertyRegex.test(className)) {
|
|
421
|
+
const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
|
|
422
|
+
const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(":"));
|
|
423
|
+
if (property) {
|
|
424
|
+
return "arbitrary.." + property;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
var createClassMap = (config) => {
|
|
429
|
+
const {
|
|
430
|
+
theme,
|
|
431
|
+
prefix
|
|
432
|
+
} = config;
|
|
433
|
+
const classMap = {
|
|
434
|
+
nextPart: /* @__PURE__ */ new Map(),
|
|
435
|
+
validators: []
|
|
20
436
|
};
|
|
21
|
-
const
|
|
22
|
-
|
|
437
|
+
const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix);
|
|
438
|
+
prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {
|
|
439
|
+
processClassesRecursively(classGroup, classMap, classGroupId, theme);
|
|
440
|
+
});
|
|
441
|
+
return classMap;
|
|
23
442
|
};
|
|
443
|
+
var processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
|
|
444
|
+
classGroup.forEach((classDefinition) => {
|
|
445
|
+
if (typeof classDefinition === "string") {
|
|
446
|
+
const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
|
|
447
|
+
classPartObjectToEdit.classGroupId = classGroupId;
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
if (typeof classDefinition === "function") {
|
|
451
|
+
if (isThemeGetter(classDefinition)) {
|
|
452
|
+
processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
classPartObject.validators.push({
|
|
456
|
+
validator: classDefinition,
|
|
457
|
+
classGroupId
|
|
458
|
+
});
|
|
459
|
+
return;
|
|
460
|
+
}
|
|
461
|
+
Object.entries(classDefinition).forEach(([key, classGroup2]) => {
|
|
462
|
+
processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme);
|
|
463
|
+
});
|
|
464
|
+
});
|
|
465
|
+
};
|
|
466
|
+
var getPart = (classPartObject, path) => {
|
|
467
|
+
let currentClassPartObject = classPartObject;
|
|
468
|
+
path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
|
|
469
|
+
if (!currentClassPartObject.nextPart.has(pathPart)) {
|
|
470
|
+
currentClassPartObject.nextPart.set(pathPart, {
|
|
471
|
+
nextPart: /* @__PURE__ */ new Map(),
|
|
472
|
+
validators: []
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
|
|
476
|
+
});
|
|
477
|
+
return currentClassPartObject;
|
|
478
|
+
};
|
|
479
|
+
var isThemeGetter = (func) => func.isThemeGetter;
|
|
480
|
+
var getPrefixedClassGroupEntries = (classGroupEntries, prefix) => {
|
|
481
|
+
if (!prefix) {
|
|
482
|
+
return classGroupEntries;
|
|
483
|
+
}
|
|
484
|
+
return classGroupEntries.map(([classGroupId, classGroup]) => {
|
|
485
|
+
const prefixedClassGroup = classGroup.map((classDefinition) => {
|
|
486
|
+
if (typeof classDefinition === "string") {
|
|
487
|
+
return prefix + classDefinition;
|
|
488
|
+
}
|
|
489
|
+
if (typeof classDefinition === "object") {
|
|
490
|
+
return Object.fromEntries(Object.entries(classDefinition).map(([key, value]) => [prefix + key, value]));
|
|
491
|
+
}
|
|
492
|
+
return classDefinition;
|
|
493
|
+
});
|
|
494
|
+
return [classGroupId, prefixedClassGroup];
|
|
495
|
+
});
|
|
496
|
+
};
|
|
497
|
+
var createLruCache = (maxCacheSize) => {
|
|
498
|
+
if (maxCacheSize < 1) {
|
|
499
|
+
return {
|
|
500
|
+
get: () => void 0,
|
|
501
|
+
set: () => {
|
|
502
|
+
}
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
let cacheSize = 0;
|
|
506
|
+
let cache = /* @__PURE__ */ new Map();
|
|
507
|
+
let previousCache = /* @__PURE__ */ new Map();
|
|
508
|
+
const update = (key, value) => {
|
|
509
|
+
cache.set(key, value);
|
|
510
|
+
cacheSize++;
|
|
511
|
+
if (cacheSize > maxCacheSize) {
|
|
512
|
+
cacheSize = 0;
|
|
513
|
+
previousCache = cache;
|
|
514
|
+
cache = /* @__PURE__ */ new Map();
|
|
515
|
+
}
|
|
516
|
+
};
|
|
517
|
+
return {
|
|
518
|
+
get(key) {
|
|
519
|
+
let value = cache.get(key);
|
|
520
|
+
if (value !== void 0) {
|
|
521
|
+
return value;
|
|
522
|
+
}
|
|
523
|
+
if ((value = previousCache.get(key)) !== void 0) {
|
|
524
|
+
update(key, value);
|
|
525
|
+
return value;
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
set(key, value) {
|
|
529
|
+
if (cache.has(key)) {
|
|
530
|
+
cache.set(key, value);
|
|
531
|
+
} else {
|
|
532
|
+
update(key, value);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
};
|
|
536
|
+
};
|
|
537
|
+
var IMPORTANT_MODIFIER = "!";
|
|
538
|
+
var createParseClassName = (config) => {
|
|
539
|
+
const {
|
|
540
|
+
separator,
|
|
541
|
+
experimentalParseClassName
|
|
542
|
+
} = config;
|
|
543
|
+
const isSeparatorSingleCharacter = separator.length === 1;
|
|
544
|
+
const firstSeparatorCharacter = separator[0];
|
|
545
|
+
const separatorLength = separator.length;
|
|
546
|
+
const parseClassName = (className) => {
|
|
547
|
+
const modifiers = [];
|
|
548
|
+
let bracketDepth = 0;
|
|
549
|
+
let modifierStart = 0;
|
|
550
|
+
let postfixModifierPosition;
|
|
551
|
+
for (let index = 0; index < className.length; index++) {
|
|
552
|
+
let currentCharacter = className[index];
|
|
553
|
+
if (bracketDepth === 0) {
|
|
554
|
+
if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {
|
|
555
|
+
modifiers.push(className.slice(modifierStart, index));
|
|
556
|
+
modifierStart = index + separatorLength;
|
|
557
|
+
continue;
|
|
558
|
+
}
|
|
559
|
+
if (currentCharacter === "/") {
|
|
560
|
+
postfixModifierPosition = index;
|
|
561
|
+
continue;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
if (currentCharacter === "[") {
|
|
565
|
+
bracketDepth++;
|
|
566
|
+
} else if (currentCharacter === "]") {
|
|
567
|
+
bracketDepth--;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
|
|
571
|
+
const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);
|
|
572
|
+
const baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;
|
|
573
|
+
const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
|
|
574
|
+
return {
|
|
575
|
+
modifiers,
|
|
576
|
+
hasImportantModifier,
|
|
577
|
+
baseClassName,
|
|
578
|
+
maybePostfixModifierPosition
|
|
579
|
+
};
|
|
580
|
+
};
|
|
581
|
+
if (experimentalParseClassName) {
|
|
582
|
+
return (className) => experimentalParseClassName({
|
|
583
|
+
className,
|
|
584
|
+
parseClassName
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
return parseClassName;
|
|
588
|
+
};
|
|
589
|
+
var sortModifiers = (modifiers) => {
|
|
590
|
+
if (modifiers.length <= 1) {
|
|
591
|
+
return modifiers;
|
|
592
|
+
}
|
|
593
|
+
const sortedModifiers = [];
|
|
594
|
+
let unsortedModifiers = [];
|
|
595
|
+
modifiers.forEach((modifier) => {
|
|
596
|
+
const isArbitraryVariant = modifier[0] === "[";
|
|
597
|
+
if (isArbitraryVariant) {
|
|
598
|
+
sortedModifiers.push(...unsortedModifiers.sort(), modifier);
|
|
599
|
+
unsortedModifiers = [];
|
|
600
|
+
} else {
|
|
601
|
+
unsortedModifiers.push(modifier);
|
|
602
|
+
}
|
|
603
|
+
});
|
|
604
|
+
sortedModifiers.push(...unsortedModifiers.sort());
|
|
605
|
+
return sortedModifiers;
|
|
606
|
+
};
|
|
607
|
+
var createConfigUtils = (config) => ({
|
|
608
|
+
cache: createLruCache(config.cacheSize),
|
|
609
|
+
parseClassName: createParseClassName(config),
|
|
610
|
+
...createClassGroupUtils(config)
|
|
611
|
+
});
|
|
612
|
+
var SPLIT_CLASSES_REGEX = /\s+/;
|
|
613
|
+
var mergeClassList = (classList, configUtils) => {
|
|
614
|
+
const {
|
|
615
|
+
parseClassName,
|
|
616
|
+
getClassGroupId,
|
|
617
|
+
getConflictingClassGroupIds
|
|
618
|
+
} = configUtils;
|
|
619
|
+
const classGroupsInConflict = [];
|
|
620
|
+
const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
|
|
621
|
+
let result = "";
|
|
622
|
+
for (let index = classNames.length - 1; index >= 0; index -= 1) {
|
|
623
|
+
const originalClassName = classNames[index];
|
|
624
|
+
const {
|
|
625
|
+
modifiers,
|
|
626
|
+
hasImportantModifier,
|
|
627
|
+
baseClassName,
|
|
628
|
+
maybePostfixModifierPosition
|
|
629
|
+
} = parseClassName(originalClassName);
|
|
630
|
+
let hasPostfixModifier = Boolean(maybePostfixModifierPosition);
|
|
631
|
+
let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
|
|
632
|
+
if (!classGroupId) {
|
|
633
|
+
if (!hasPostfixModifier) {
|
|
634
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
635
|
+
continue;
|
|
636
|
+
}
|
|
637
|
+
classGroupId = getClassGroupId(baseClassName);
|
|
638
|
+
if (!classGroupId) {
|
|
639
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
640
|
+
continue;
|
|
641
|
+
}
|
|
642
|
+
hasPostfixModifier = false;
|
|
643
|
+
}
|
|
644
|
+
const variantModifier = sortModifiers(modifiers).join(":");
|
|
645
|
+
const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
|
|
646
|
+
const classId = modifierId + classGroupId;
|
|
647
|
+
if (classGroupsInConflict.includes(classId)) {
|
|
648
|
+
continue;
|
|
649
|
+
}
|
|
650
|
+
classGroupsInConflict.push(classId);
|
|
651
|
+
const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
|
|
652
|
+
for (let i2 = 0; i2 < conflictGroups.length; ++i2) {
|
|
653
|
+
const group = conflictGroups[i2];
|
|
654
|
+
classGroupsInConflict.push(modifierId + group);
|
|
655
|
+
}
|
|
656
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
657
|
+
}
|
|
658
|
+
return result;
|
|
659
|
+
};
|
|
660
|
+
function twJoin() {
|
|
661
|
+
let index = 0;
|
|
662
|
+
let argument;
|
|
663
|
+
let resolvedValue;
|
|
664
|
+
let string = "";
|
|
665
|
+
while (index < arguments.length) {
|
|
666
|
+
if (argument = arguments[index++]) {
|
|
667
|
+
if (resolvedValue = toValue(argument)) {
|
|
668
|
+
string && (string += " ");
|
|
669
|
+
string += resolvedValue;
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
return string;
|
|
674
|
+
}
|
|
675
|
+
var toValue = (mix) => {
|
|
676
|
+
if (typeof mix === "string") {
|
|
677
|
+
return mix;
|
|
678
|
+
}
|
|
679
|
+
let resolvedValue;
|
|
680
|
+
let string = "";
|
|
681
|
+
for (let k2 = 0; k2 < mix.length; k2++) {
|
|
682
|
+
if (mix[k2]) {
|
|
683
|
+
if (resolvedValue = toValue(mix[k2])) {
|
|
684
|
+
string && (string += " ");
|
|
685
|
+
string += resolvedValue;
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
return string;
|
|
690
|
+
};
|
|
691
|
+
function createTailwindMerge(createConfigFirst, ...createConfigRest) {
|
|
692
|
+
let configUtils;
|
|
693
|
+
let cacheGet;
|
|
694
|
+
let cacheSet;
|
|
695
|
+
let functionToCall = initTailwindMerge;
|
|
696
|
+
function initTailwindMerge(classList) {
|
|
697
|
+
const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
|
|
698
|
+
configUtils = createConfigUtils(config);
|
|
699
|
+
cacheGet = configUtils.cache.get;
|
|
700
|
+
cacheSet = configUtils.cache.set;
|
|
701
|
+
functionToCall = tailwindMerge;
|
|
702
|
+
return tailwindMerge(classList);
|
|
703
|
+
}
|
|
704
|
+
function tailwindMerge(classList) {
|
|
705
|
+
const cachedResult = cacheGet(classList);
|
|
706
|
+
if (cachedResult) {
|
|
707
|
+
return cachedResult;
|
|
708
|
+
}
|
|
709
|
+
const result = mergeClassList(classList, configUtils);
|
|
710
|
+
cacheSet(classList, result);
|
|
711
|
+
return result;
|
|
712
|
+
}
|
|
713
|
+
return function callTailwindMerge() {
|
|
714
|
+
return functionToCall(twJoin.apply(null, arguments));
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
var fromTheme = (key) => {
|
|
718
|
+
const themeGetter = (theme) => theme[key] || [];
|
|
719
|
+
themeGetter.isThemeGetter = true;
|
|
720
|
+
return themeGetter;
|
|
721
|
+
};
|
|
722
|
+
var arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
|
|
723
|
+
var fractionRegex = /^\d+\/\d+$/;
|
|
724
|
+
var stringLengths = /* @__PURE__ */ new Set(["px", "full", "screen"]);
|
|
725
|
+
var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
|
|
726
|
+
var lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
|
|
727
|
+
var colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
|
|
728
|
+
var shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
|
|
729
|
+
var imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
|
|
730
|
+
var isLength = (value) => isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);
|
|
731
|
+
var isArbitraryLength = (value) => getIsArbitraryValue(value, "length", isLengthOnly);
|
|
732
|
+
var isNumber = (value) => Boolean(value) && !Number.isNaN(Number(value));
|
|
733
|
+
var isArbitraryNumber = (value) => getIsArbitraryValue(value, "number", isNumber);
|
|
734
|
+
var isInteger = (value) => Boolean(value) && Number.isInteger(Number(value));
|
|
735
|
+
var isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
|
|
736
|
+
var isArbitraryValue = (value) => arbitraryValueRegex.test(value);
|
|
737
|
+
var isTshirtSize = (value) => tshirtUnitRegex.test(value);
|
|
738
|
+
var sizeLabels = /* @__PURE__ */ new Set(["length", "size", "percentage"]);
|
|
739
|
+
var isArbitrarySize = (value) => getIsArbitraryValue(value, sizeLabels, isNever);
|
|
740
|
+
var isArbitraryPosition = (value) => getIsArbitraryValue(value, "position", isNever);
|
|
741
|
+
var imageLabels = /* @__PURE__ */ new Set(["image", "url"]);
|
|
742
|
+
var isArbitraryImage = (value) => getIsArbitraryValue(value, imageLabels, isImage);
|
|
743
|
+
var isArbitraryShadow = (value) => getIsArbitraryValue(value, "", isShadow);
|
|
744
|
+
var isAny = () => true;
|
|
745
|
+
var getIsArbitraryValue = (value, label, testValue) => {
|
|
746
|
+
const result = arbitraryValueRegex.exec(value);
|
|
747
|
+
if (result) {
|
|
748
|
+
if (result[1]) {
|
|
749
|
+
return typeof label === "string" ? result[1] === label : label.has(result[1]);
|
|
750
|
+
}
|
|
751
|
+
return testValue(result[2]);
|
|
752
|
+
}
|
|
753
|
+
return false;
|
|
754
|
+
};
|
|
755
|
+
var isLengthOnly = (value) => (
|
|
756
|
+
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
757
|
+
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
758
|
+
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
759
|
+
lengthUnitRegex.test(value) && !colorFunctionRegex.test(value)
|
|
760
|
+
);
|
|
761
|
+
var isNever = () => false;
|
|
762
|
+
var isShadow = (value) => shadowRegex.test(value);
|
|
763
|
+
var isImage = (value) => imageRegex.test(value);
|
|
764
|
+
var getDefaultConfig = () => {
|
|
765
|
+
const colors = fromTheme("colors");
|
|
766
|
+
const spacing = fromTheme("spacing");
|
|
767
|
+
const blur = fromTheme("blur");
|
|
768
|
+
const brightness = fromTheme("brightness");
|
|
769
|
+
const borderColor = fromTheme("borderColor");
|
|
770
|
+
const borderRadius = fromTheme("borderRadius");
|
|
771
|
+
const borderSpacing = fromTheme("borderSpacing");
|
|
772
|
+
const borderWidth = fromTheme("borderWidth");
|
|
773
|
+
const contrast = fromTheme("contrast");
|
|
774
|
+
const grayscale = fromTheme("grayscale");
|
|
775
|
+
const hueRotate = fromTheme("hueRotate");
|
|
776
|
+
const invert = fromTheme("invert");
|
|
777
|
+
const gap = fromTheme("gap");
|
|
778
|
+
const gradientColorStops = fromTheme("gradientColorStops");
|
|
779
|
+
const gradientColorStopPositions = fromTheme("gradientColorStopPositions");
|
|
780
|
+
const inset = fromTheme("inset");
|
|
781
|
+
const margin = fromTheme("margin");
|
|
782
|
+
const opacity = fromTheme("opacity");
|
|
783
|
+
const padding = fromTheme("padding");
|
|
784
|
+
const saturate = fromTheme("saturate");
|
|
785
|
+
const scale = fromTheme("scale");
|
|
786
|
+
const sepia = fromTheme("sepia");
|
|
787
|
+
const skew = fromTheme("skew");
|
|
788
|
+
const space = fromTheme("space");
|
|
789
|
+
const translate = fromTheme("translate");
|
|
790
|
+
const getOverscroll = () => ["auto", "contain", "none"];
|
|
791
|
+
const getOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
|
|
792
|
+
const getSpacingWithAutoAndArbitrary = () => ["auto", isArbitraryValue, spacing];
|
|
793
|
+
const getSpacingWithArbitrary = () => [isArbitraryValue, spacing];
|
|
794
|
+
const getLengthWithEmptyAndArbitrary = () => ["", isLength, isArbitraryLength];
|
|
795
|
+
const getNumberWithAutoAndArbitrary = () => ["auto", isNumber, isArbitraryValue];
|
|
796
|
+
const getPositions = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"];
|
|
797
|
+
const getLineStyles = () => ["solid", "dashed", "dotted", "double", "none"];
|
|
798
|
+
const getBlendModes = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
|
|
799
|
+
const getAlign = () => ["start", "end", "center", "between", "around", "evenly", "stretch"];
|
|
800
|
+
const getZeroAndEmpty = () => ["", "0", isArbitraryValue];
|
|
801
|
+
const getBreaks = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
|
|
802
|
+
const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];
|
|
803
|
+
return {
|
|
804
|
+
cacheSize: 500,
|
|
805
|
+
separator: ":",
|
|
806
|
+
theme: {
|
|
807
|
+
colors: [isAny],
|
|
808
|
+
spacing: [isLength, isArbitraryLength],
|
|
809
|
+
blur: ["none", "", isTshirtSize, isArbitraryValue],
|
|
810
|
+
brightness: getNumberAndArbitrary(),
|
|
811
|
+
borderColor: [colors],
|
|
812
|
+
borderRadius: ["none", "", "full", isTshirtSize, isArbitraryValue],
|
|
813
|
+
borderSpacing: getSpacingWithArbitrary(),
|
|
814
|
+
borderWidth: getLengthWithEmptyAndArbitrary(),
|
|
815
|
+
contrast: getNumberAndArbitrary(),
|
|
816
|
+
grayscale: getZeroAndEmpty(),
|
|
817
|
+
hueRotate: getNumberAndArbitrary(),
|
|
818
|
+
invert: getZeroAndEmpty(),
|
|
819
|
+
gap: getSpacingWithArbitrary(),
|
|
820
|
+
gradientColorStops: [colors],
|
|
821
|
+
gradientColorStopPositions: [isPercent, isArbitraryLength],
|
|
822
|
+
inset: getSpacingWithAutoAndArbitrary(),
|
|
823
|
+
margin: getSpacingWithAutoAndArbitrary(),
|
|
824
|
+
opacity: getNumberAndArbitrary(),
|
|
825
|
+
padding: getSpacingWithArbitrary(),
|
|
826
|
+
saturate: getNumberAndArbitrary(),
|
|
827
|
+
scale: getNumberAndArbitrary(),
|
|
828
|
+
sepia: getZeroAndEmpty(),
|
|
829
|
+
skew: getNumberAndArbitrary(),
|
|
830
|
+
space: getSpacingWithArbitrary(),
|
|
831
|
+
translate: getSpacingWithArbitrary()
|
|
832
|
+
},
|
|
833
|
+
classGroups: {
|
|
834
|
+
// Layout
|
|
835
|
+
/**
|
|
836
|
+
* Aspect Ratio
|
|
837
|
+
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
838
|
+
*/
|
|
839
|
+
aspect: [{
|
|
840
|
+
aspect: ["auto", "square", "video", isArbitraryValue]
|
|
841
|
+
}],
|
|
842
|
+
/**
|
|
843
|
+
* Container
|
|
844
|
+
* @see https://tailwindcss.com/docs/container
|
|
845
|
+
*/
|
|
846
|
+
container: ["container"],
|
|
847
|
+
/**
|
|
848
|
+
* Columns
|
|
849
|
+
* @see https://tailwindcss.com/docs/columns
|
|
850
|
+
*/
|
|
851
|
+
columns: [{
|
|
852
|
+
columns: [isTshirtSize]
|
|
853
|
+
}],
|
|
854
|
+
/**
|
|
855
|
+
* Break After
|
|
856
|
+
* @see https://tailwindcss.com/docs/break-after
|
|
857
|
+
*/
|
|
858
|
+
"break-after": [{
|
|
859
|
+
"break-after": getBreaks()
|
|
860
|
+
}],
|
|
861
|
+
/**
|
|
862
|
+
* Break Before
|
|
863
|
+
* @see https://tailwindcss.com/docs/break-before
|
|
864
|
+
*/
|
|
865
|
+
"break-before": [{
|
|
866
|
+
"break-before": getBreaks()
|
|
867
|
+
}],
|
|
868
|
+
/**
|
|
869
|
+
* Break Inside
|
|
870
|
+
* @see https://tailwindcss.com/docs/break-inside
|
|
871
|
+
*/
|
|
872
|
+
"break-inside": [{
|
|
873
|
+
"break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
|
|
874
|
+
}],
|
|
875
|
+
/**
|
|
876
|
+
* Box Decoration Break
|
|
877
|
+
* @see https://tailwindcss.com/docs/box-decoration-break
|
|
878
|
+
*/
|
|
879
|
+
"box-decoration": [{
|
|
880
|
+
"box-decoration": ["slice", "clone"]
|
|
881
|
+
}],
|
|
882
|
+
/**
|
|
883
|
+
* Box Sizing
|
|
884
|
+
* @see https://tailwindcss.com/docs/box-sizing
|
|
885
|
+
*/
|
|
886
|
+
box: [{
|
|
887
|
+
box: ["border", "content"]
|
|
888
|
+
}],
|
|
889
|
+
/**
|
|
890
|
+
* Display
|
|
891
|
+
* @see https://tailwindcss.com/docs/display
|
|
892
|
+
*/
|
|
893
|
+
display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
|
|
894
|
+
/**
|
|
895
|
+
* Floats
|
|
896
|
+
* @see https://tailwindcss.com/docs/float
|
|
897
|
+
*/
|
|
898
|
+
float: [{
|
|
899
|
+
float: ["right", "left", "none", "start", "end"]
|
|
900
|
+
}],
|
|
901
|
+
/**
|
|
902
|
+
* Clear
|
|
903
|
+
* @see https://tailwindcss.com/docs/clear
|
|
904
|
+
*/
|
|
905
|
+
clear: [{
|
|
906
|
+
clear: ["left", "right", "both", "none", "start", "end"]
|
|
907
|
+
}],
|
|
908
|
+
/**
|
|
909
|
+
* Isolation
|
|
910
|
+
* @see https://tailwindcss.com/docs/isolation
|
|
911
|
+
*/
|
|
912
|
+
isolation: ["isolate", "isolation-auto"],
|
|
913
|
+
/**
|
|
914
|
+
* Object Fit
|
|
915
|
+
* @see https://tailwindcss.com/docs/object-fit
|
|
916
|
+
*/
|
|
917
|
+
"object-fit": [{
|
|
918
|
+
object: ["contain", "cover", "fill", "none", "scale-down"]
|
|
919
|
+
}],
|
|
920
|
+
/**
|
|
921
|
+
* Object Position
|
|
922
|
+
* @see https://tailwindcss.com/docs/object-position
|
|
923
|
+
*/
|
|
924
|
+
"object-position": [{
|
|
925
|
+
object: [...getPositions(), isArbitraryValue]
|
|
926
|
+
}],
|
|
927
|
+
/**
|
|
928
|
+
* Overflow
|
|
929
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
930
|
+
*/
|
|
931
|
+
overflow: [{
|
|
932
|
+
overflow: getOverflow()
|
|
933
|
+
}],
|
|
934
|
+
/**
|
|
935
|
+
* Overflow X
|
|
936
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
937
|
+
*/
|
|
938
|
+
"overflow-x": [{
|
|
939
|
+
"overflow-x": getOverflow()
|
|
940
|
+
}],
|
|
941
|
+
/**
|
|
942
|
+
* Overflow Y
|
|
943
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
944
|
+
*/
|
|
945
|
+
"overflow-y": [{
|
|
946
|
+
"overflow-y": getOverflow()
|
|
947
|
+
}],
|
|
948
|
+
/**
|
|
949
|
+
* Overscroll Behavior
|
|
950
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
951
|
+
*/
|
|
952
|
+
overscroll: [{
|
|
953
|
+
overscroll: getOverscroll()
|
|
954
|
+
}],
|
|
955
|
+
/**
|
|
956
|
+
* Overscroll Behavior X
|
|
957
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
958
|
+
*/
|
|
959
|
+
"overscroll-x": [{
|
|
960
|
+
"overscroll-x": getOverscroll()
|
|
961
|
+
}],
|
|
962
|
+
/**
|
|
963
|
+
* Overscroll Behavior Y
|
|
964
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
965
|
+
*/
|
|
966
|
+
"overscroll-y": [{
|
|
967
|
+
"overscroll-y": getOverscroll()
|
|
968
|
+
}],
|
|
969
|
+
/**
|
|
970
|
+
* Position
|
|
971
|
+
* @see https://tailwindcss.com/docs/position
|
|
972
|
+
*/
|
|
973
|
+
position: ["static", "fixed", "absolute", "relative", "sticky"],
|
|
974
|
+
/**
|
|
975
|
+
* Top / Right / Bottom / Left
|
|
976
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
977
|
+
*/
|
|
978
|
+
inset: [{
|
|
979
|
+
inset: [inset]
|
|
980
|
+
}],
|
|
981
|
+
/**
|
|
982
|
+
* Right / Left
|
|
983
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
984
|
+
*/
|
|
985
|
+
"inset-x": [{
|
|
986
|
+
"inset-x": [inset]
|
|
987
|
+
}],
|
|
988
|
+
/**
|
|
989
|
+
* Top / Bottom
|
|
990
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
991
|
+
*/
|
|
992
|
+
"inset-y": [{
|
|
993
|
+
"inset-y": [inset]
|
|
994
|
+
}],
|
|
995
|
+
/**
|
|
996
|
+
* Start
|
|
997
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
998
|
+
*/
|
|
999
|
+
start: [{
|
|
1000
|
+
start: [inset]
|
|
1001
|
+
}],
|
|
1002
|
+
/**
|
|
1003
|
+
* End
|
|
1004
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1005
|
+
*/
|
|
1006
|
+
end: [{
|
|
1007
|
+
end: [inset]
|
|
1008
|
+
}],
|
|
1009
|
+
/**
|
|
1010
|
+
* Top
|
|
1011
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1012
|
+
*/
|
|
1013
|
+
top: [{
|
|
1014
|
+
top: [inset]
|
|
1015
|
+
}],
|
|
1016
|
+
/**
|
|
1017
|
+
* Right
|
|
1018
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1019
|
+
*/
|
|
1020
|
+
right: [{
|
|
1021
|
+
right: [inset]
|
|
1022
|
+
}],
|
|
1023
|
+
/**
|
|
1024
|
+
* Bottom
|
|
1025
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1026
|
+
*/
|
|
1027
|
+
bottom: [{
|
|
1028
|
+
bottom: [inset]
|
|
1029
|
+
}],
|
|
1030
|
+
/**
|
|
1031
|
+
* Left
|
|
1032
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1033
|
+
*/
|
|
1034
|
+
left: [{
|
|
1035
|
+
left: [inset]
|
|
1036
|
+
}],
|
|
1037
|
+
/**
|
|
1038
|
+
* Visibility
|
|
1039
|
+
* @see https://tailwindcss.com/docs/visibility
|
|
1040
|
+
*/
|
|
1041
|
+
visibility: ["visible", "invisible", "collapse"],
|
|
1042
|
+
/**
|
|
1043
|
+
* Z-Index
|
|
1044
|
+
* @see https://tailwindcss.com/docs/z-index
|
|
1045
|
+
*/
|
|
1046
|
+
z: [{
|
|
1047
|
+
z: ["auto", isInteger, isArbitraryValue]
|
|
1048
|
+
}],
|
|
1049
|
+
// Flexbox and Grid
|
|
1050
|
+
/**
|
|
1051
|
+
* Flex Basis
|
|
1052
|
+
* @see https://tailwindcss.com/docs/flex-basis
|
|
1053
|
+
*/
|
|
1054
|
+
basis: [{
|
|
1055
|
+
basis: getSpacingWithAutoAndArbitrary()
|
|
1056
|
+
}],
|
|
1057
|
+
/**
|
|
1058
|
+
* Flex Direction
|
|
1059
|
+
* @see https://tailwindcss.com/docs/flex-direction
|
|
1060
|
+
*/
|
|
1061
|
+
"flex-direction": [{
|
|
1062
|
+
flex: ["row", "row-reverse", "col", "col-reverse"]
|
|
1063
|
+
}],
|
|
1064
|
+
/**
|
|
1065
|
+
* Flex Wrap
|
|
1066
|
+
* @see https://tailwindcss.com/docs/flex-wrap
|
|
1067
|
+
*/
|
|
1068
|
+
"flex-wrap": [{
|
|
1069
|
+
flex: ["wrap", "wrap-reverse", "nowrap"]
|
|
1070
|
+
}],
|
|
1071
|
+
/**
|
|
1072
|
+
* Flex
|
|
1073
|
+
* @see https://tailwindcss.com/docs/flex
|
|
1074
|
+
*/
|
|
1075
|
+
flex: [{
|
|
1076
|
+
flex: ["1", "auto", "initial", "none", isArbitraryValue]
|
|
1077
|
+
}],
|
|
1078
|
+
/**
|
|
1079
|
+
* Flex Grow
|
|
1080
|
+
* @see https://tailwindcss.com/docs/flex-grow
|
|
1081
|
+
*/
|
|
1082
|
+
grow: [{
|
|
1083
|
+
grow: getZeroAndEmpty()
|
|
1084
|
+
}],
|
|
1085
|
+
/**
|
|
1086
|
+
* Flex Shrink
|
|
1087
|
+
* @see https://tailwindcss.com/docs/flex-shrink
|
|
1088
|
+
*/
|
|
1089
|
+
shrink: [{
|
|
1090
|
+
shrink: getZeroAndEmpty()
|
|
1091
|
+
}],
|
|
1092
|
+
/**
|
|
1093
|
+
* Order
|
|
1094
|
+
* @see https://tailwindcss.com/docs/order
|
|
1095
|
+
*/
|
|
1096
|
+
order: [{
|
|
1097
|
+
order: ["first", "last", "none", isInteger, isArbitraryValue]
|
|
1098
|
+
}],
|
|
1099
|
+
/**
|
|
1100
|
+
* Grid Template Columns
|
|
1101
|
+
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
1102
|
+
*/
|
|
1103
|
+
"grid-cols": [{
|
|
1104
|
+
"grid-cols": [isAny]
|
|
1105
|
+
}],
|
|
1106
|
+
/**
|
|
1107
|
+
* Grid Column Start / End
|
|
1108
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
1109
|
+
*/
|
|
1110
|
+
"col-start-end": [{
|
|
1111
|
+
col: ["auto", {
|
|
1112
|
+
span: ["full", isInteger, isArbitraryValue]
|
|
1113
|
+
}, isArbitraryValue]
|
|
1114
|
+
}],
|
|
1115
|
+
/**
|
|
1116
|
+
* Grid Column Start
|
|
1117
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
1118
|
+
*/
|
|
1119
|
+
"col-start": [{
|
|
1120
|
+
"col-start": getNumberWithAutoAndArbitrary()
|
|
1121
|
+
}],
|
|
1122
|
+
/**
|
|
1123
|
+
* Grid Column End
|
|
1124
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
1125
|
+
*/
|
|
1126
|
+
"col-end": [{
|
|
1127
|
+
"col-end": getNumberWithAutoAndArbitrary()
|
|
1128
|
+
}],
|
|
1129
|
+
/**
|
|
1130
|
+
* Grid Template Rows
|
|
1131
|
+
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
1132
|
+
*/
|
|
1133
|
+
"grid-rows": [{
|
|
1134
|
+
"grid-rows": [isAny]
|
|
1135
|
+
}],
|
|
1136
|
+
/**
|
|
1137
|
+
* Grid Row Start / End
|
|
1138
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
1139
|
+
*/
|
|
1140
|
+
"row-start-end": [{
|
|
1141
|
+
row: ["auto", {
|
|
1142
|
+
span: [isInteger, isArbitraryValue]
|
|
1143
|
+
}, isArbitraryValue]
|
|
1144
|
+
}],
|
|
1145
|
+
/**
|
|
1146
|
+
* Grid Row Start
|
|
1147
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
1148
|
+
*/
|
|
1149
|
+
"row-start": [{
|
|
1150
|
+
"row-start": getNumberWithAutoAndArbitrary()
|
|
1151
|
+
}],
|
|
1152
|
+
/**
|
|
1153
|
+
* Grid Row End
|
|
1154
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
1155
|
+
*/
|
|
1156
|
+
"row-end": [{
|
|
1157
|
+
"row-end": getNumberWithAutoAndArbitrary()
|
|
1158
|
+
}],
|
|
1159
|
+
/**
|
|
1160
|
+
* Grid Auto Flow
|
|
1161
|
+
* @see https://tailwindcss.com/docs/grid-auto-flow
|
|
1162
|
+
*/
|
|
1163
|
+
"grid-flow": [{
|
|
1164
|
+
"grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
|
|
1165
|
+
}],
|
|
1166
|
+
/**
|
|
1167
|
+
* Grid Auto Columns
|
|
1168
|
+
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
1169
|
+
*/
|
|
1170
|
+
"auto-cols": [{
|
|
1171
|
+
"auto-cols": ["auto", "min", "max", "fr", isArbitraryValue]
|
|
1172
|
+
}],
|
|
1173
|
+
/**
|
|
1174
|
+
* Grid Auto Rows
|
|
1175
|
+
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
1176
|
+
*/
|
|
1177
|
+
"auto-rows": [{
|
|
1178
|
+
"auto-rows": ["auto", "min", "max", "fr", isArbitraryValue]
|
|
1179
|
+
}],
|
|
1180
|
+
/**
|
|
1181
|
+
* Gap
|
|
1182
|
+
* @see https://tailwindcss.com/docs/gap
|
|
1183
|
+
*/
|
|
1184
|
+
gap: [{
|
|
1185
|
+
gap: [gap]
|
|
1186
|
+
}],
|
|
1187
|
+
/**
|
|
1188
|
+
* Gap X
|
|
1189
|
+
* @see https://tailwindcss.com/docs/gap
|
|
1190
|
+
*/
|
|
1191
|
+
"gap-x": [{
|
|
1192
|
+
"gap-x": [gap]
|
|
1193
|
+
}],
|
|
1194
|
+
/**
|
|
1195
|
+
* Gap Y
|
|
1196
|
+
* @see https://tailwindcss.com/docs/gap
|
|
1197
|
+
*/
|
|
1198
|
+
"gap-y": [{
|
|
1199
|
+
"gap-y": [gap]
|
|
1200
|
+
}],
|
|
1201
|
+
/**
|
|
1202
|
+
* Justify Content
|
|
1203
|
+
* @see https://tailwindcss.com/docs/justify-content
|
|
1204
|
+
*/
|
|
1205
|
+
"justify-content": [{
|
|
1206
|
+
justify: ["normal", ...getAlign()]
|
|
1207
|
+
}],
|
|
1208
|
+
/**
|
|
1209
|
+
* Justify Items
|
|
1210
|
+
* @see https://tailwindcss.com/docs/justify-items
|
|
1211
|
+
*/
|
|
1212
|
+
"justify-items": [{
|
|
1213
|
+
"justify-items": ["start", "end", "center", "stretch"]
|
|
1214
|
+
}],
|
|
1215
|
+
/**
|
|
1216
|
+
* Justify Self
|
|
1217
|
+
* @see https://tailwindcss.com/docs/justify-self
|
|
1218
|
+
*/
|
|
1219
|
+
"justify-self": [{
|
|
1220
|
+
"justify-self": ["auto", "start", "end", "center", "stretch"]
|
|
1221
|
+
}],
|
|
1222
|
+
/**
|
|
1223
|
+
* Align Content
|
|
1224
|
+
* @see https://tailwindcss.com/docs/align-content
|
|
1225
|
+
*/
|
|
1226
|
+
"align-content": [{
|
|
1227
|
+
content: ["normal", ...getAlign(), "baseline"]
|
|
1228
|
+
}],
|
|
1229
|
+
/**
|
|
1230
|
+
* Align Items
|
|
1231
|
+
* @see https://tailwindcss.com/docs/align-items
|
|
1232
|
+
*/
|
|
1233
|
+
"align-items": [{
|
|
1234
|
+
items: ["start", "end", "center", "baseline", "stretch"]
|
|
1235
|
+
}],
|
|
1236
|
+
/**
|
|
1237
|
+
* Align Self
|
|
1238
|
+
* @see https://tailwindcss.com/docs/align-self
|
|
1239
|
+
*/
|
|
1240
|
+
"align-self": [{
|
|
1241
|
+
self: ["auto", "start", "end", "center", "stretch", "baseline"]
|
|
1242
|
+
}],
|
|
1243
|
+
/**
|
|
1244
|
+
* Place Content
|
|
1245
|
+
* @see https://tailwindcss.com/docs/place-content
|
|
1246
|
+
*/
|
|
1247
|
+
"place-content": [{
|
|
1248
|
+
"place-content": [...getAlign(), "baseline"]
|
|
1249
|
+
}],
|
|
1250
|
+
/**
|
|
1251
|
+
* Place Items
|
|
1252
|
+
* @see https://tailwindcss.com/docs/place-items
|
|
1253
|
+
*/
|
|
1254
|
+
"place-items": [{
|
|
1255
|
+
"place-items": ["start", "end", "center", "baseline", "stretch"]
|
|
1256
|
+
}],
|
|
1257
|
+
/**
|
|
1258
|
+
* Place Self
|
|
1259
|
+
* @see https://tailwindcss.com/docs/place-self
|
|
1260
|
+
*/
|
|
1261
|
+
"place-self": [{
|
|
1262
|
+
"place-self": ["auto", "start", "end", "center", "stretch"]
|
|
1263
|
+
}],
|
|
1264
|
+
// Spacing
|
|
1265
|
+
/**
|
|
1266
|
+
* Padding
|
|
1267
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1268
|
+
*/
|
|
1269
|
+
p: [{
|
|
1270
|
+
p: [padding]
|
|
1271
|
+
}],
|
|
1272
|
+
/**
|
|
1273
|
+
* Padding X
|
|
1274
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1275
|
+
*/
|
|
1276
|
+
px: [{
|
|
1277
|
+
px: [padding]
|
|
1278
|
+
}],
|
|
1279
|
+
/**
|
|
1280
|
+
* Padding Y
|
|
1281
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1282
|
+
*/
|
|
1283
|
+
py: [{
|
|
1284
|
+
py: [padding]
|
|
1285
|
+
}],
|
|
1286
|
+
/**
|
|
1287
|
+
* Padding Start
|
|
1288
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1289
|
+
*/
|
|
1290
|
+
ps: [{
|
|
1291
|
+
ps: [padding]
|
|
1292
|
+
}],
|
|
1293
|
+
/**
|
|
1294
|
+
* Padding End
|
|
1295
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1296
|
+
*/
|
|
1297
|
+
pe: [{
|
|
1298
|
+
pe: [padding]
|
|
1299
|
+
}],
|
|
1300
|
+
/**
|
|
1301
|
+
* Padding Top
|
|
1302
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1303
|
+
*/
|
|
1304
|
+
pt: [{
|
|
1305
|
+
pt: [padding]
|
|
1306
|
+
}],
|
|
1307
|
+
/**
|
|
1308
|
+
* Padding Right
|
|
1309
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1310
|
+
*/
|
|
1311
|
+
pr: [{
|
|
1312
|
+
pr: [padding]
|
|
1313
|
+
}],
|
|
1314
|
+
/**
|
|
1315
|
+
* Padding Bottom
|
|
1316
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1317
|
+
*/
|
|
1318
|
+
pb: [{
|
|
1319
|
+
pb: [padding]
|
|
1320
|
+
}],
|
|
1321
|
+
/**
|
|
1322
|
+
* Padding Left
|
|
1323
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1324
|
+
*/
|
|
1325
|
+
pl: [{
|
|
1326
|
+
pl: [padding]
|
|
1327
|
+
}],
|
|
1328
|
+
/**
|
|
1329
|
+
* Margin
|
|
1330
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1331
|
+
*/
|
|
1332
|
+
m: [{
|
|
1333
|
+
m: [margin]
|
|
1334
|
+
}],
|
|
1335
|
+
/**
|
|
1336
|
+
* Margin X
|
|
1337
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1338
|
+
*/
|
|
1339
|
+
mx: [{
|
|
1340
|
+
mx: [margin]
|
|
1341
|
+
}],
|
|
1342
|
+
/**
|
|
1343
|
+
* Margin Y
|
|
1344
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1345
|
+
*/
|
|
1346
|
+
my: [{
|
|
1347
|
+
my: [margin]
|
|
1348
|
+
}],
|
|
1349
|
+
/**
|
|
1350
|
+
* Margin Start
|
|
1351
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1352
|
+
*/
|
|
1353
|
+
ms: [{
|
|
1354
|
+
ms: [margin]
|
|
1355
|
+
}],
|
|
1356
|
+
/**
|
|
1357
|
+
* Margin End
|
|
1358
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1359
|
+
*/
|
|
1360
|
+
me: [{
|
|
1361
|
+
me: [margin]
|
|
1362
|
+
}],
|
|
1363
|
+
/**
|
|
1364
|
+
* Margin Top
|
|
1365
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1366
|
+
*/
|
|
1367
|
+
mt: [{
|
|
1368
|
+
mt: [margin]
|
|
1369
|
+
}],
|
|
1370
|
+
/**
|
|
1371
|
+
* Margin Right
|
|
1372
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1373
|
+
*/
|
|
1374
|
+
mr: [{
|
|
1375
|
+
mr: [margin]
|
|
1376
|
+
}],
|
|
1377
|
+
/**
|
|
1378
|
+
* Margin Bottom
|
|
1379
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1380
|
+
*/
|
|
1381
|
+
mb: [{
|
|
1382
|
+
mb: [margin]
|
|
1383
|
+
}],
|
|
1384
|
+
/**
|
|
1385
|
+
* Margin Left
|
|
1386
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1387
|
+
*/
|
|
1388
|
+
ml: [{
|
|
1389
|
+
ml: [margin]
|
|
1390
|
+
}],
|
|
1391
|
+
/**
|
|
1392
|
+
* Space Between X
|
|
1393
|
+
* @see https://tailwindcss.com/docs/space
|
|
1394
|
+
*/
|
|
1395
|
+
"space-x": [{
|
|
1396
|
+
"space-x": [space]
|
|
1397
|
+
}],
|
|
1398
|
+
/**
|
|
1399
|
+
* Space Between X Reverse
|
|
1400
|
+
* @see https://tailwindcss.com/docs/space
|
|
1401
|
+
*/
|
|
1402
|
+
"space-x-reverse": ["space-x-reverse"],
|
|
1403
|
+
/**
|
|
1404
|
+
* Space Between Y
|
|
1405
|
+
* @see https://tailwindcss.com/docs/space
|
|
1406
|
+
*/
|
|
1407
|
+
"space-y": [{
|
|
1408
|
+
"space-y": [space]
|
|
1409
|
+
}],
|
|
1410
|
+
/**
|
|
1411
|
+
* Space Between Y Reverse
|
|
1412
|
+
* @see https://tailwindcss.com/docs/space
|
|
1413
|
+
*/
|
|
1414
|
+
"space-y-reverse": ["space-y-reverse"],
|
|
1415
|
+
// Sizing
|
|
1416
|
+
/**
|
|
1417
|
+
* Width
|
|
1418
|
+
* @see https://tailwindcss.com/docs/width
|
|
1419
|
+
*/
|
|
1420
|
+
w: [{
|
|
1421
|
+
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", isArbitraryValue, spacing]
|
|
1422
|
+
}],
|
|
1423
|
+
/**
|
|
1424
|
+
* Min-Width
|
|
1425
|
+
* @see https://tailwindcss.com/docs/min-width
|
|
1426
|
+
*/
|
|
1427
|
+
"min-w": [{
|
|
1428
|
+
"min-w": [isArbitraryValue, spacing, "min", "max", "fit"]
|
|
1429
|
+
}],
|
|
1430
|
+
/**
|
|
1431
|
+
* Max-Width
|
|
1432
|
+
* @see https://tailwindcss.com/docs/max-width
|
|
1433
|
+
*/
|
|
1434
|
+
"max-w": [{
|
|
1435
|
+
"max-w": [isArbitraryValue, spacing, "none", "full", "min", "max", "fit", "prose", {
|
|
1436
|
+
screen: [isTshirtSize]
|
|
1437
|
+
}, isTshirtSize]
|
|
1438
|
+
}],
|
|
1439
|
+
/**
|
|
1440
|
+
* Height
|
|
1441
|
+
* @see https://tailwindcss.com/docs/height
|
|
1442
|
+
*/
|
|
1443
|
+
h: [{
|
|
1444
|
+
h: [isArbitraryValue, spacing, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
1445
|
+
}],
|
|
1446
|
+
/**
|
|
1447
|
+
* Min-Height
|
|
1448
|
+
* @see https://tailwindcss.com/docs/min-height
|
|
1449
|
+
*/
|
|
1450
|
+
"min-h": [{
|
|
1451
|
+
"min-h": [isArbitraryValue, spacing, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
1452
|
+
}],
|
|
1453
|
+
/**
|
|
1454
|
+
* Max-Height
|
|
1455
|
+
* @see https://tailwindcss.com/docs/max-height
|
|
1456
|
+
*/
|
|
1457
|
+
"max-h": [{
|
|
1458
|
+
"max-h": [isArbitraryValue, spacing, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
1459
|
+
}],
|
|
1460
|
+
/**
|
|
1461
|
+
* Size
|
|
1462
|
+
* @see https://tailwindcss.com/docs/size
|
|
1463
|
+
*/
|
|
1464
|
+
size: [{
|
|
1465
|
+
size: [isArbitraryValue, spacing, "auto", "min", "max", "fit"]
|
|
1466
|
+
}],
|
|
1467
|
+
// Typography
|
|
1468
|
+
/**
|
|
1469
|
+
* Font Size
|
|
1470
|
+
* @see https://tailwindcss.com/docs/font-size
|
|
1471
|
+
*/
|
|
1472
|
+
"font-size": [{
|
|
1473
|
+
text: ["base", isTshirtSize, isArbitraryLength]
|
|
1474
|
+
}],
|
|
1475
|
+
/**
|
|
1476
|
+
* Font Smoothing
|
|
1477
|
+
* @see https://tailwindcss.com/docs/font-smoothing
|
|
1478
|
+
*/
|
|
1479
|
+
"font-smoothing": ["antialiased", "subpixel-antialiased"],
|
|
1480
|
+
/**
|
|
1481
|
+
* Font Style
|
|
1482
|
+
* @see https://tailwindcss.com/docs/font-style
|
|
1483
|
+
*/
|
|
1484
|
+
"font-style": ["italic", "not-italic"],
|
|
1485
|
+
/**
|
|
1486
|
+
* Font Weight
|
|
1487
|
+
* @see https://tailwindcss.com/docs/font-weight
|
|
1488
|
+
*/
|
|
1489
|
+
"font-weight": [{
|
|
1490
|
+
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", isArbitraryNumber]
|
|
1491
|
+
}],
|
|
1492
|
+
/**
|
|
1493
|
+
* Font Family
|
|
1494
|
+
* @see https://tailwindcss.com/docs/font-family
|
|
1495
|
+
*/
|
|
1496
|
+
"font-family": [{
|
|
1497
|
+
font: [isAny]
|
|
1498
|
+
}],
|
|
1499
|
+
/**
|
|
1500
|
+
* Font Variant Numeric
|
|
1501
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1502
|
+
*/
|
|
1503
|
+
"fvn-normal": ["normal-nums"],
|
|
1504
|
+
/**
|
|
1505
|
+
* Font Variant Numeric
|
|
1506
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1507
|
+
*/
|
|
1508
|
+
"fvn-ordinal": ["ordinal"],
|
|
1509
|
+
/**
|
|
1510
|
+
* Font Variant Numeric
|
|
1511
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1512
|
+
*/
|
|
1513
|
+
"fvn-slashed-zero": ["slashed-zero"],
|
|
1514
|
+
/**
|
|
1515
|
+
* Font Variant Numeric
|
|
1516
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1517
|
+
*/
|
|
1518
|
+
"fvn-figure": ["lining-nums", "oldstyle-nums"],
|
|
1519
|
+
/**
|
|
1520
|
+
* Font Variant Numeric
|
|
1521
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1522
|
+
*/
|
|
1523
|
+
"fvn-spacing": ["proportional-nums", "tabular-nums"],
|
|
1524
|
+
/**
|
|
1525
|
+
* Font Variant Numeric
|
|
1526
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1527
|
+
*/
|
|
1528
|
+
"fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
|
|
1529
|
+
/**
|
|
1530
|
+
* Letter Spacing
|
|
1531
|
+
* @see https://tailwindcss.com/docs/letter-spacing
|
|
1532
|
+
*/
|
|
1533
|
+
tracking: [{
|
|
1534
|
+
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", isArbitraryValue]
|
|
1535
|
+
}],
|
|
1536
|
+
/**
|
|
1537
|
+
* Line Clamp
|
|
1538
|
+
* @see https://tailwindcss.com/docs/line-clamp
|
|
1539
|
+
*/
|
|
1540
|
+
"line-clamp": [{
|
|
1541
|
+
"line-clamp": ["none", isNumber, isArbitraryNumber]
|
|
1542
|
+
}],
|
|
1543
|
+
/**
|
|
1544
|
+
* Line Height
|
|
1545
|
+
* @see https://tailwindcss.com/docs/line-height
|
|
1546
|
+
*/
|
|
1547
|
+
leading: [{
|
|
1548
|
+
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", isLength, isArbitraryValue]
|
|
1549
|
+
}],
|
|
1550
|
+
/**
|
|
1551
|
+
* List Style Image
|
|
1552
|
+
* @see https://tailwindcss.com/docs/list-style-image
|
|
1553
|
+
*/
|
|
1554
|
+
"list-image": [{
|
|
1555
|
+
"list-image": ["none", isArbitraryValue]
|
|
1556
|
+
}],
|
|
1557
|
+
/**
|
|
1558
|
+
* List Style Type
|
|
1559
|
+
* @see https://tailwindcss.com/docs/list-style-type
|
|
1560
|
+
*/
|
|
1561
|
+
"list-style-type": [{
|
|
1562
|
+
list: ["none", "disc", "decimal", isArbitraryValue]
|
|
1563
|
+
}],
|
|
1564
|
+
/**
|
|
1565
|
+
* List Style Position
|
|
1566
|
+
* @see https://tailwindcss.com/docs/list-style-position
|
|
1567
|
+
*/
|
|
1568
|
+
"list-style-position": [{
|
|
1569
|
+
list: ["inside", "outside"]
|
|
1570
|
+
}],
|
|
1571
|
+
/**
|
|
1572
|
+
* Placeholder Color
|
|
1573
|
+
* @deprecated since Tailwind CSS v3.0.0
|
|
1574
|
+
* @see https://tailwindcss.com/docs/placeholder-color
|
|
1575
|
+
*/
|
|
1576
|
+
"placeholder-color": [{
|
|
1577
|
+
placeholder: [colors]
|
|
1578
|
+
}],
|
|
1579
|
+
/**
|
|
1580
|
+
* Placeholder Opacity
|
|
1581
|
+
* @see https://tailwindcss.com/docs/placeholder-opacity
|
|
1582
|
+
*/
|
|
1583
|
+
"placeholder-opacity": [{
|
|
1584
|
+
"placeholder-opacity": [opacity]
|
|
1585
|
+
}],
|
|
1586
|
+
/**
|
|
1587
|
+
* Text Alignment
|
|
1588
|
+
* @see https://tailwindcss.com/docs/text-align
|
|
1589
|
+
*/
|
|
1590
|
+
"text-alignment": [{
|
|
1591
|
+
text: ["left", "center", "right", "justify", "start", "end"]
|
|
1592
|
+
}],
|
|
1593
|
+
/**
|
|
1594
|
+
* Text Color
|
|
1595
|
+
* @see https://tailwindcss.com/docs/text-color
|
|
1596
|
+
*/
|
|
1597
|
+
"text-color": [{
|
|
1598
|
+
text: [colors]
|
|
1599
|
+
}],
|
|
1600
|
+
/**
|
|
1601
|
+
* Text Opacity
|
|
1602
|
+
* @see https://tailwindcss.com/docs/text-opacity
|
|
1603
|
+
*/
|
|
1604
|
+
"text-opacity": [{
|
|
1605
|
+
"text-opacity": [opacity]
|
|
1606
|
+
}],
|
|
1607
|
+
/**
|
|
1608
|
+
* Text Decoration
|
|
1609
|
+
* @see https://tailwindcss.com/docs/text-decoration
|
|
1610
|
+
*/
|
|
1611
|
+
"text-decoration": ["underline", "overline", "line-through", "no-underline"],
|
|
1612
|
+
/**
|
|
1613
|
+
* Text Decoration Style
|
|
1614
|
+
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
1615
|
+
*/
|
|
1616
|
+
"text-decoration-style": [{
|
|
1617
|
+
decoration: [...getLineStyles(), "wavy"]
|
|
1618
|
+
}],
|
|
1619
|
+
/**
|
|
1620
|
+
* Text Decoration Thickness
|
|
1621
|
+
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
1622
|
+
*/
|
|
1623
|
+
"text-decoration-thickness": [{
|
|
1624
|
+
decoration: ["auto", "from-font", isLength, isArbitraryLength]
|
|
1625
|
+
}],
|
|
1626
|
+
/**
|
|
1627
|
+
* Text Underline Offset
|
|
1628
|
+
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
1629
|
+
*/
|
|
1630
|
+
"underline-offset": [{
|
|
1631
|
+
"underline-offset": ["auto", isLength, isArbitraryValue]
|
|
1632
|
+
}],
|
|
1633
|
+
/**
|
|
1634
|
+
* Text Decoration Color
|
|
1635
|
+
* @see https://tailwindcss.com/docs/text-decoration-color
|
|
1636
|
+
*/
|
|
1637
|
+
"text-decoration-color": [{
|
|
1638
|
+
decoration: [colors]
|
|
1639
|
+
}],
|
|
1640
|
+
/**
|
|
1641
|
+
* Text Transform
|
|
1642
|
+
* @see https://tailwindcss.com/docs/text-transform
|
|
1643
|
+
*/
|
|
1644
|
+
"text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
|
|
1645
|
+
/**
|
|
1646
|
+
* Text Overflow
|
|
1647
|
+
* @see https://tailwindcss.com/docs/text-overflow
|
|
1648
|
+
*/
|
|
1649
|
+
"text-overflow": ["truncate", "text-ellipsis", "text-clip"],
|
|
1650
|
+
/**
|
|
1651
|
+
* Text Wrap
|
|
1652
|
+
* @see https://tailwindcss.com/docs/text-wrap
|
|
1653
|
+
*/
|
|
1654
|
+
"text-wrap": [{
|
|
1655
|
+
text: ["wrap", "nowrap", "balance", "pretty"]
|
|
1656
|
+
}],
|
|
1657
|
+
/**
|
|
1658
|
+
* Text Indent
|
|
1659
|
+
* @see https://tailwindcss.com/docs/text-indent
|
|
1660
|
+
*/
|
|
1661
|
+
indent: [{
|
|
1662
|
+
indent: getSpacingWithArbitrary()
|
|
1663
|
+
}],
|
|
1664
|
+
/**
|
|
1665
|
+
* Vertical Alignment
|
|
1666
|
+
* @see https://tailwindcss.com/docs/vertical-align
|
|
1667
|
+
*/
|
|
1668
|
+
"vertical-align": [{
|
|
1669
|
+
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryValue]
|
|
1670
|
+
}],
|
|
1671
|
+
/**
|
|
1672
|
+
* Whitespace
|
|
1673
|
+
* @see https://tailwindcss.com/docs/whitespace
|
|
1674
|
+
*/
|
|
1675
|
+
whitespace: [{
|
|
1676
|
+
whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
|
|
1677
|
+
}],
|
|
1678
|
+
/**
|
|
1679
|
+
* Word Break
|
|
1680
|
+
* @see https://tailwindcss.com/docs/word-break
|
|
1681
|
+
*/
|
|
1682
|
+
break: [{
|
|
1683
|
+
break: ["normal", "words", "all", "keep"]
|
|
1684
|
+
}],
|
|
1685
|
+
/**
|
|
1686
|
+
* Hyphens
|
|
1687
|
+
* @see https://tailwindcss.com/docs/hyphens
|
|
1688
|
+
*/
|
|
1689
|
+
hyphens: [{
|
|
1690
|
+
hyphens: ["none", "manual", "auto"]
|
|
1691
|
+
}],
|
|
1692
|
+
/**
|
|
1693
|
+
* Content
|
|
1694
|
+
* @see https://tailwindcss.com/docs/content
|
|
1695
|
+
*/
|
|
1696
|
+
content: [{
|
|
1697
|
+
content: ["none", isArbitraryValue]
|
|
1698
|
+
}],
|
|
1699
|
+
// Backgrounds
|
|
1700
|
+
/**
|
|
1701
|
+
* Background Attachment
|
|
1702
|
+
* @see https://tailwindcss.com/docs/background-attachment
|
|
1703
|
+
*/
|
|
1704
|
+
"bg-attachment": [{
|
|
1705
|
+
bg: ["fixed", "local", "scroll"]
|
|
1706
|
+
}],
|
|
1707
|
+
/**
|
|
1708
|
+
* Background Clip
|
|
1709
|
+
* @see https://tailwindcss.com/docs/background-clip
|
|
1710
|
+
*/
|
|
1711
|
+
"bg-clip": [{
|
|
1712
|
+
"bg-clip": ["border", "padding", "content", "text"]
|
|
1713
|
+
}],
|
|
1714
|
+
/**
|
|
1715
|
+
* Background Opacity
|
|
1716
|
+
* @deprecated since Tailwind CSS v3.0.0
|
|
1717
|
+
* @see https://tailwindcss.com/docs/background-opacity
|
|
1718
|
+
*/
|
|
1719
|
+
"bg-opacity": [{
|
|
1720
|
+
"bg-opacity": [opacity]
|
|
1721
|
+
}],
|
|
1722
|
+
/**
|
|
1723
|
+
* Background Origin
|
|
1724
|
+
* @see https://tailwindcss.com/docs/background-origin
|
|
1725
|
+
*/
|
|
1726
|
+
"bg-origin": [{
|
|
1727
|
+
"bg-origin": ["border", "padding", "content"]
|
|
1728
|
+
}],
|
|
1729
|
+
/**
|
|
1730
|
+
* Background Position
|
|
1731
|
+
* @see https://tailwindcss.com/docs/background-position
|
|
1732
|
+
*/
|
|
1733
|
+
"bg-position": [{
|
|
1734
|
+
bg: [...getPositions(), isArbitraryPosition]
|
|
1735
|
+
}],
|
|
1736
|
+
/**
|
|
1737
|
+
* Background Repeat
|
|
1738
|
+
* @see https://tailwindcss.com/docs/background-repeat
|
|
1739
|
+
*/
|
|
1740
|
+
"bg-repeat": [{
|
|
1741
|
+
bg: ["no-repeat", {
|
|
1742
|
+
repeat: ["", "x", "y", "round", "space"]
|
|
1743
|
+
}]
|
|
1744
|
+
}],
|
|
1745
|
+
/**
|
|
1746
|
+
* Background Size
|
|
1747
|
+
* @see https://tailwindcss.com/docs/background-size
|
|
1748
|
+
*/
|
|
1749
|
+
"bg-size": [{
|
|
1750
|
+
bg: ["auto", "cover", "contain", isArbitrarySize]
|
|
1751
|
+
}],
|
|
1752
|
+
/**
|
|
1753
|
+
* Background Image
|
|
1754
|
+
* @see https://tailwindcss.com/docs/background-image
|
|
1755
|
+
*/
|
|
1756
|
+
"bg-image": [{
|
|
1757
|
+
bg: ["none", {
|
|
1758
|
+
"gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
1759
|
+
}, isArbitraryImage]
|
|
1760
|
+
}],
|
|
1761
|
+
/**
|
|
1762
|
+
* Background Color
|
|
1763
|
+
* @see https://tailwindcss.com/docs/background-color
|
|
1764
|
+
*/
|
|
1765
|
+
"bg-color": [{
|
|
1766
|
+
bg: [colors]
|
|
1767
|
+
}],
|
|
1768
|
+
/**
|
|
1769
|
+
* Gradient Color Stops From Position
|
|
1770
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1771
|
+
*/
|
|
1772
|
+
"gradient-from-pos": [{
|
|
1773
|
+
from: [gradientColorStopPositions]
|
|
1774
|
+
}],
|
|
1775
|
+
/**
|
|
1776
|
+
* Gradient Color Stops Via Position
|
|
1777
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1778
|
+
*/
|
|
1779
|
+
"gradient-via-pos": [{
|
|
1780
|
+
via: [gradientColorStopPositions]
|
|
1781
|
+
}],
|
|
1782
|
+
/**
|
|
1783
|
+
* Gradient Color Stops To Position
|
|
1784
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1785
|
+
*/
|
|
1786
|
+
"gradient-to-pos": [{
|
|
1787
|
+
to: [gradientColorStopPositions]
|
|
1788
|
+
}],
|
|
1789
|
+
/**
|
|
1790
|
+
* Gradient Color Stops From
|
|
1791
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1792
|
+
*/
|
|
1793
|
+
"gradient-from": [{
|
|
1794
|
+
from: [gradientColorStops]
|
|
1795
|
+
}],
|
|
1796
|
+
/**
|
|
1797
|
+
* Gradient Color Stops Via
|
|
1798
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1799
|
+
*/
|
|
1800
|
+
"gradient-via": [{
|
|
1801
|
+
via: [gradientColorStops]
|
|
1802
|
+
}],
|
|
1803
|
+
/**
|
|
1804
|
+
* Gradient Color Stops To
|
|
1805
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1806
|
+
*/
|
|
1807
|
+
"gradient-to": [{
|
|
1808
|
+
to: [gradientColorStops]
|
|
1809
|
+
}],
|
|
1810
|
+
// Borders
|
|
1811
|
+
/**
|
|
1812
|
+
* Border Radius
|
|
1813
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1814
|
+
*/
|
|
1815
|
+
rounded: [{
|
|
1816
|
+
rounded: [borderRadius]
|
|
1817
|
+
}],
|
|
1818
|
+
/**
|
|
1819
|
+
* Border Radius Start
|
|
1820
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1821
|
+
*/
|
|
1822
|
+
"rounded-s": [{
|
|
1823
|
+
"rounded-s": [borderRadius]
|
|
1824
|
+
}],
|
|
1825
|
+
/**
|
|
1826
|
+
* Border Radius End
|
|
1827
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1828
|
+
*/
|
|
1829
|
+
"rounded-e": [{
|
|
1830
|
+
"rounded-e": [borderRadius]
|
|
1831
|
+
}],
|
|
1832
|
+
/**
|
|
1833
|
+
* Border Radius Top
|
|
1834
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1835
|
+
*/
|
|
1836
|
+
"rounded-t": [{
|
|
1837
|
+
"rounded-t": [borderRadius]
|
|
1838
|
+
}],
|
|
1839
|
+
/**
|
|
1840
|
+
* Border Radius Right
|
|
1841
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1842
|
+
*/
|
|
1843
|
+
"rounded-r": [{
|
|
1844
|
+
"rounded-r": [borderRadius]
|
|
1845
|
+
}],
|
|
1846
|
+
/**
|
|
1847
|
+
* Border Radius Bottom
|
|
1848
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1849
|
+
*/
|
|
1850
|
+
"rounded-b": [{
|
|
1851
|
+
"rounded-b": [borderRadius]
|
|
1852
|
+
}],
|
|
1853
|
+
/**
|
|
1854
|
+
* Border Radius Left
|
|
1855
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1856
|
+
*/
|
|
1857
|
+
"rounded-l": [{
|
|
1858
|
+
"rounded-l": [borderRadius]
|
|
1859
|
+
}],
|
|
1860
|
+
/**
|
|
1861
|
+
* Border Radius Start Start
|
|
1862
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1863
|
+
*/
|
|
1864
|
+
"rounded-ss": [{
|
|
1865
|
+
"rounded-ss": [borderRadius]
|
|
1866
|
+
}],
|
|
1867
|
+
/**
|
|
1868
|
+
* Border Radius Start End
|
|
1869
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1870
|
+
*/
|
|
1871
|
+
"rounded-se": [{
|
|
1872
|
+
"rounded-se": [borderRadius]
|
|
1873
|
+
}],
|
|
1874
|
+
/**
|
|
1875
|
+
* Border Radius End End
|
|
1876
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1877
|
+
*/
|
|
1878
|
+
"rounded-ee": [{
|
|
1879
|
+
"rounded-ee": [borderRadius]
|
|
1880
|
+
}],
|
|
1881
|
+
/**
|
|
1882
|
+
* Border Radius End Start
|
|
1883
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1884
|
+
*/
|
|
1885
|
+
"rounded-es": [{
|
|
1886
|
+
"rounded-es": [borderRadius]
|
|
1887
|
+
}],
|
|
1888
|
+
/**
|
|
1889
|
+
* Border Radius Top Left
|
|
1890
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1891
|
+
*/
|
|
1892
|
+
"rounded-tl": [{
|
|
1893
|
+
"rounded-tl": [borderRadius]
|
|
1894
|
+
}],
|
|
1895
|
+
/**
|
|
1896
|
+
* Border Radius Top Right
|
|
1897
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1898
|
+
*/
|
|
1899
|
+
"rounded-tr": [{
|
|
1900
|
+
"rounded-tr": [borderRadius]
|
|
1901
|
+
}],
|
|
1902
|
+
/**
|
|
1903
|
+
* Border Radius Bottom Right
|
|
1904
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1905
|
+
*/
|
|
1906
|
+
"rounded-br": [{
|
|
1907
|
+
"rounded-br": [borderRadius]
|
|
1908
|
+
}],
|
|
1909
|
+
/**
|
|
1910
|
+
* Border Radius Bottom Left
|
|
1911
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1912
|
+
*/
|
|
1913
|
+
"rounded-bl": [{
|
|
1914
|
+
"rounded-bl": [borderRadius]
|
|
1915
|
+
}],
|
|
1916
|
+
/**
|
|
1917
|
+
* Border Width
|
|
1918
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1919
|
+
*/
|
|
1920
|
+
"border-w": [{
|
|
1921
|
+
border: [borderWidth]
|
|
1922
|
+
}],
|
|
1923
|
+
/**
|
|
1924
|
+
* Border Width X
|
|
1925
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1926
|
+
*/
|
|
1927
|
+
"border-w-x": [{
|
|
1928
|
+
"border-x": [borderWidth]
|
|
1929
|
+
}],
|
|
1930
|
+
/**
|
|
1931
|
+
* Border Width Y
|
|
1932
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1933
|
+
*/
|
|
1934
|
+
"border-w-y": [{
|
|
1935
|
+
"border-y": [borderWidth]
|
|
1936
|
+
}],
|
|
1937
|
+
/**
|
|
1938
|
+
* Border Width Start
|
|
1939
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1940
|
+
*/
|
|
1941
|
+
"border-w-s": [{
|
|
1942
|
+
"border-s": [borderWidth]
|
|
1943
|
+
}],
|
|
1944
|
+
/**
|
|
1945
|
+
* Border Width End
|
|
1946
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1947
|
+
*/
|
|
1948
|
+
"border-w-e": [{
|
|
1949
|
+
"border-e": [borderWidth]
|
|
1950
|
+
}],
|
|
1951
|
+
/**
|
|
1952
|
+
* Border Width Top
|
|
1953
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1954
|
+
*/
|
|
1955
|
+
"border-w-t": [{
|
|
1956
|
+
"border-t": [borderWidth]
|
|
1957
|
+
}],
|
|
1958
|
+
/**
|
|
1959
|
+
* Border Width Right
|
|
1960
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1961
|
+
*/
|
|
1962
|
+
"border-w-r": [{
|
|
1963
|
+
"border-r": [borderWidth]
|
|
1964
|
+
}],
|
|
1965
|
+
/**
|
|
1966
|
+
* Border Width Bottom
|
|
1967
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1968
|
+
*/
|
|
1969
|
+
"border-w-b": [{
|
|
1970
|
+
"border-b": [borderWidth]
|
|
1971
|
+
}],
|
|
1972
|
+
/**
|
|
1973
|
+
* Border Width Left
|
|
1974
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1975
|
+
*/
|
|
1976
|
+
"border-w-l": [{
|
|
1977
|
+
"border-l": [borderWidth]
|
|
1978
|
+
}],
|
|
1979
|
+
/**
|
|
1980
|
+
* Border Opacity
|
|
1981
|
+
* @see https://tailwindcss.com/docs/border-opacity
|
|
1982
|
+
*/
|
|
1983
|
+
"border-opacity": [{
|
|
1984
|
+
"border-opacity": [opacity]
|
|
1985
|
+
}],
|
|
1986
|
+
/**
|
|
1987
|
+
* Border Style
|
|
1988
|
+
* @see https://tailwindcss.com/docs/border-style
|
|
1989
|
+
*/
|
|
1990
|
+
"border-style": [{
|
|
1991
|
+
border: [...getLineStyles(), "hidden"]
|
|
1992
|
+
}],
|
|
1993
|
+
/**
|
|
1994
|
+
* Divide Width X
|
|
1995
|
+
* @see https://tailwindcss.com/docs/divide-width
|
|
1996
|
+
*/
|
|
1997
|
+
"divide-x": [{
|
|
1998
|
+
"divide-x": [borderWidth]
|
|
1999
|
+
}],
|
|
2000
|
+
/**
|
|
2001
|
+
* Divide Width X Reverse
|
|
2002
|
+
* @see https://tailwindcss.com/docs/divide-width
|
|
2003
|
+
*/
|
|
2004
|
+
"divide-x-reverse": ["divide-x-reverse"],
|
|
2005
|
+
/**
|
|
2006
|
+
* Divide Width Y
|
|
2007
|
+
* @see https://tailwindcss.com/docs/divide-width
|
|
2008
|
+
*/
|
|
2009
|
+
"divide-y": [{
|
|
2010
|
+
"divide-y": [borderWidth]
|
|
2011
|
+
}],
|
|
2012
|
+
/**
|
|
2013
|
+
* Divide Width Y Reverse
|
|
2014
|
+
* @see https://tailwindcss.com/docs/divide-width
|
|
2015
|
+
*/
|
|
2016
|
+
"divide-y-reverse": ["divide-y-reverse"],
|
|
2017
|
+
/**
|
|
2018
|
+
* Divide Opacity
|
|
2019
|
+
* @see https://tailwindcss.com/docs/divide-opacity
|
|
2020
|
+
*/
|
|
2021
|
+
"divide-opacity": [{
|
|
2022
|
+
"divide-opacity": [opacity]
|
|
2023
|
+
}],
|
|
2024
|
+
/**
|
|
2025
|
+
* Divide Style
|
|
2026
|
+
* @see https://tailwindcss.com/docs/divide-style
|
|
2027
|
+
*/
|
|
2028
|
+
"divide-style": [{
|
|
2029
|
+
divide: getLineStyles()
|
|
2030
|
+
}],
|
|
2031
|
+
/**
|
|
2032
|
+
* Border Color
|
|
2033
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2034
|
+
*/
|
|
2035
|
+
"border-color": [{
|
|
2036
|
+
border: [borderColor]
|
|
2037
|
+
}],
|
|
2038
|
+
/**
|
|
2039
|
+
* Border Color X
|
|
2040
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2041
|
+
*/
|
|
2042
|
+
"border-color-x": [{
|
|
2043
|
+
"border-x": [borderColor]
|
|
2044
|
+
}],
|
|
2045
|
+
/**
|
|
2046
|
+
* Border Color Y
|
|
2047
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2048
|
+
*/
|
|
2049
|
+
"border-color-y": [{
|
|
2050
|
+
"border-y": [borderColor]
|
|
2051
|
+
}],
|
|
2052
|
+
/**
|
|
2053
|
+
* Border Color S
|
|
2054
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2055
|
+
*/
|
|
2056
|
+
"border-color-s": [{
|
|
2057
|
+
"border-s": [borderColor]
|
|
2058
|
+
}],
|
|
2059
|
+
/**
|
|
2060
|
+
* Border Color E
|
|
2061
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2062
|
+
*/
|
|
2063
|
+
"border-color-e": [{
|
|
2064
|
+
"border-e": [borderColor]
|
|
2065
|
+
}],
|
|
2066
|
+
/**
|
|
2067
|
+
* Border Color Top
|
|
2068
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2069
|
+
*/
|
|
2070
|
+
"border-color-t": [{
|
|
2071
|
+
"border-t": [borderColor]
|
|
2072
|
+
}],
|
|
2073
|
+
/**
|
|
2074
|
+
* Border Color Right
|
|
2075
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2076
|
+
*/
|
|
2077
|
+
"border-color-r": [{
|
|
2078
|
+
"border-r": [borderColor]
|
|
2079
|
+
}],
|
|
2080
|
+
/**
|
|
2081
|
+
* Border Color Bottom
|
|
2082
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2083
|
+
*/
|
|
2084
|
+
"border-color-b": [{
|
|
2085
|
+
"border-b": [borderColor]
|
|
2086
|
+
}],
|
|
2087
|
+
/**
|
|
2088
|
+
* Border Color Left
|
|
2089
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2090
|
+
*/
|
|
2091
|
+
"border-color-l": [{
|
|
2092
|
+
"border-l": [borderColor]
|
|
2093
|
+
}],
|
|
2094
|
+
/**
|
|
2095
|
+
* Divide Color
|
|
2096
|
+
* @see https://tailwindcss.com/docs/divide-color
|
|
2097
|
+
*/
|
|
2098
|
+
"divide-color": [{
|
|
2099
|
+
divide: [borderColor]
|
|
2100
|
+
}],
|
|
2101
|
+
/**
|
|
2102
|
+
* Outline Style
|
|
2103
|
+
* @see https://tailwindcss.com/docs/outline-style
|
|
2104
|
+
*/
|
|
2105
|
+
"outline-style": [{
|
|
2106
|
+
outline: ["", ...getLineStyles()]
|
|
2107
|
+
}],
|
|
2108
|
+
/**
|
|
2109
|
+
* Outline Offset
|
|
2110
|
+
* @see https://tailwindcss.com/docs/outline-offset
|
|
2111
|
+
*/
|
|
2112
|
+
"outline-offset": [{
|
|
2113
|
+
"outline-offset": [isLength, isArbitraryValue]
|
|
2114
|
+
}],
|
|
2115
|
+
/**
|
|
2116
|
+
* Outline Width
|
|
2117
|
+
* @see https://tailwindcss.com/docs/outline-width
|
|
2118
|
+
*/
|
|
2119
|
+
"outline-w": [{
|
|
2120
|
+
outline: [isLength, isArbitraryLength]
|
|
2121
|
+
}],
|
|
2122
|
+
/**
|
|
2123
|
+
* Outline Color
|
|
2124
|
+
* @see https://tailwindcss.com/docs/outline-color
|
|
2125
|
+
*/
|
|
2126
|
+
"outline-color": [{
|
|
2127
|
+
outline: [colors]
|
|
2128
|
+
}],
|
|
2129
|
+
/**
|
|
2130
|
+
* Ring Width
|
|
2131
|
+
* @see https://tailwindcss.com/docs/ring-width
|
|
2132
|
+
*/
|
|
2133
|
+
"ring-w": [{
|
|
2134
|
+
ring: getLengthWithEmptyAndArbitrary()
|
|
2135
|
+
}],
|
|
2136
|
+
/**
|
|
2137
|
+
* Ring Width Inset
|
|
2138
|
+
* @see https://tailwindcss.com/docs/ring-width
|
|
2139
|
+
*/
|
|
2140
|
+
"ring-w-inset": ["ring-inset"],
|
|
2141
|
+
/**
|
|
2142
|
+
* Ring Color
|
|
2143
|
+
* @see https://tailwindcss.com/docs/ring-color
|
|
2144
|
+
*/
|
|
2145
|
+
"ring-color": [{
|
|
2146
|
+
ring: [colors]
|
|
2147
|
+
}],
|
|
2148
|
+
/**
|
|
2149
|
+
* Ring Opacity
|
|
2150
|
+
* @see https://tailwindcss.com/docs/ring-opacity
|
|
2151
|
+
*/
|
|
2152
|
+
"ring-opacity": [{
|
|
2153
|
+
"ring-opacity": [opacity]
|
|
2154
|
+
}],
|
|
2155
|
+
/**
|
|
2156
|
+
* Ring Offset Width
|
|
2157
|
+
* @see https://tailwindcss.com/docs/ring-offset-width
|
|
2158
|
+
*/
|
|
2159
|
+
"ring-offset-w": [{
|
|
2160
|
+
"ring-offset": [isLength, isArbitraryLength]
|
|
2161
|
+
}],
|
|
2162
|
+
/**
|
|
2163
|
+
* Ring Offset Color
|
|
2164
|
+
* @see https://tailwindcss.com/docs/ring-offset-color
|
|
2165
|
+
*/
|
|
2166
|
+
"ring-offset-color": [{
|
|
2167
|
+
"ring-offset": [colors]
|
|
2168
|
+
}],
|
|
2169
|
+
// Effects
|
|
2170
|
+
/**
|
|
2171
|
+
* Box Shadow
|
|
2172
|
+
* @see https://tailwindcss.com/docs/box-shadow
|
|
2173
|
+
*/
|
|
2174
|
+
shadow: [{
|
|
2175
|
+
shadow: ["", "inner", "none", isTshirtSize, isArbitraryShadow]
|
|
2176
|
+
}],
|
|
2177
|
+
/**
|
|
2178
|
+
* Box Shadow Color
|
|
2179
|
+
* @see https://tailwindcss.com/docs/box-shadow-color
|
|
2180
|
+
*/
|
|
2181
|
+
"shadow-color": [{
|
|
2182
|
+
shadow: [isAny]
|
|
2183
|
+
}],
|
|
2184
|
+
/**
|
|
2185
|
+
* Opacity
|
|
2186
|
+
* @see https://tailwindcss.com/docs/opacity
|
|
2187
|
+
*/
|
|
2188
|
+
opacity: [{
|
|
2189
|
+
opacity: [opacity]
|
|
2190
|
+
}],
|
|
2191
|
+
/**
|
|
2192
|
+
* Mix Blend Mode
|
|
2193
|
+
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
2194
|
+
*/
|
|
2195
|
+
"mix-blend": [{
|
|
2196
|
+
"mix-blend": [...getBlendModes(), "plus-lighter", "plus-darker"]
|
|
2197
|
+
}],
|
|
2198
|
+
/**
|
|
2199
|
+
* Background Blend Mode
|
|
2200
|
+
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
2201
|
+
*/
|
|
2202
|
+
"bg-blend": [{
|
|
2203
|
+
"bg-blend": getBlendModes()
|
|
2204
|
+
}],
|
|
2205
|
+
// Filters
|
|
2206
|
+
/**
|
|
2207
|
+
* Filter
|
|
2208
|
+
* @deprecated since Tailwind CSS v3.0.0
|
|
2209
|
+
* @see https://tailwindcss.com/docs/filter
|
|
2210
|
+
*/
|
|
2211
|
+
filter: [{
|
|
2212
|
+
filter: ["", "none"]
|
|
2213
|
+
}],
|
|
2214
|
+
/**
|
|
2215
|
+
* Blur
|
|
2216
|
+
* @see https://tailwindcss.com/docs/blur
|
|
2217
|
+
*/
|
|
2218
|
+
blur: [{
|
|
2219
|
+
blur: [blur]
|
|
2220
|
+
}],
|
|
2221
|
+
/**
|
|
2222
|
+
* Brightness
|
|
2223
|
+
* @see https://tailwindcss.com/docs/brightness
|
|
2224
|
+
*/
|
|
2225
|
+
brightness: [{
|
|
2226
|
+
brightness: [brightness]
|
|
2227
|
+
}],
|
|
2228
|
+
/**
|
|
2229
|
+
* Contrast
|
|
2230
|
+
* @see https://tailwindcss.com/docs/contrast
|
|
2231
|
+
*/
|
|
2232
|
+
contrast: [{
|
|
2233
|
+
contrast: [contrast]
|
|
2234
|
+
}],
|
|
2235
|
+
/**
|
|
2236
|
+
* Drop Shadow
|
|
2237
|
+
* @see https://tailwindcss.com/docs/drop-shadow
|
|
2238
|
+
*/
|
|
2239
|
+
"drop-shadow": [{
|
|
2240
|
+
"drop-shadow": ["", "none", isTshirtSize, isArbitraryValue]
|
|
2241
|
+
}],
|
|
2242
|
+
/**
|
|
2243
|
+
* Grayscale
|
|
2244
|
+
* @see https://tailwindcss.com/docs/grayscale
|
|
2245
|
+
*/
|
|
2246
|
+
grayscale: [{
|
|
2247
|
+
grayscale: [grayscale]
|
|
2248
|
+
}],
|
|
2249
|
+
/**
|
|
2250
|
+
* Hue Rotate
|
|
2251
|
+
* @see https://tailwindcss.com/docs/hue-rotate
|
|
2252
|
+
*/
|
|
2253
|
+
"hue-rotate": [{
|
|
2254
|
+
"hue-rotate": [hueRotate]
|
|
2255
|
+
}],
|
|
2256
|
+
/**
|
|
2257
|
+
* Invert
|
|
2258
|
+
* @see https://tailwindcss.com/docs/invert
|
|
2259
|
+
*/
|
|
2260
|
+
invert: [{
|
|
2261
|
+
invert: [invert]
|
|
2262
|
+
}],
|
|
2263
|
+
/**
|
|
2264
|
+
* Saturate
|
|
2265
|
+
* @see https://tailwindcss.com/docs/saturate
|
|
2266
|
+
*/
|
|
2267
|
+
saturate: [{
|
|
2268
|
+
saturate: [saturate]
|
|
2269
|
+
}],
|
|
2270
|
+
/**
|
|
2271
|
+
* Sepia
|
|
2272
|
+
* @see https://tailwindcss.com/docs/sepia
|
|
2273
|
+
*/
|
|
2274
|
+
sepia: [{
|
|
2275
|
+
sepia: [sepia]
|
|
2276
|
+
}],
|
|
2277
|
+
/**
|
|
2278
|
+
* Backdrop Filter
|
|
2279
|
+
* @deprecated since Tailwind CSS v3.0.0
|
|
2280
|
+
* @see https://tailwindcss.com/docs/backdrop-filter
|
|
2281
|
+
*/
|
|
2282
|
+
"backdrop-filter": [{
|
|
2283
|
+
"backdrop-filter": ["", "none"]
|
|
2284
|
+
}],
|
|
2285
|
+
/**
|
|
2286
|
+
* Backdrop Blur
|
|
2287
|
+
* @see https://tailwindcss.com/docs/backdrop-blur
|
|
2288
|
+
*/
|
|
2289
|
+
"backdrop-blur": [{
|
|
2290
|
+
"backdrop-blur": [blur]
|
|
2291
|
+
}],
|
|
2292
|
+
/**
|
|
2293
|
+
* Backdrop Brightness
|
|
2294
|
+
* @see https://tailwindcss.com/docs/backdrop-brightness
|
|
2295
|
+
*/
|
|
2296
|
+
"backdrop-brightness": [{
|
|
2297
|
+
"backdrop-brightness": [brightness]
|
|
2298
|
+
}],
|
|
2299
|
+
/**
|
|
2300
|
+
* Backdrop Contrast
|
|
2301
|
+
* @see https://tailwindcss.com/docs/backdrop-contrast
|
|
2302
|
+
*/
|
|
2303
|
+
"backdrop-contrast": [{
|
|
2304
|
+
"backdrop-contrast": [contrast]
|
|
2305
|
+
}],
|
|
2306
|
+
/**
|
|
2307
|
+
* Backdrop Grayscale
|
|
2308
|
+
* @see https://tailwindcss.com/docs/backdrop-grayscale
|
|
2309
|
+
*/
|
|
2310
|
+
"backdrop-grayscale": [{
|
|
2311
|
+
"backdrop-grayscale": [grayscale]
|
|
2312
|
+
}],
|
|
2313
|
+
/**
|
|
2314
|
+
* Backdrop Hue Rotate
|
|
2315
|
+
* @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
|
2316
|
+
*/
|
|
2317
|
+
"backdrop-hue-rotate": [{
|
|
2318
|
+
"backdrop-hue-rotate": [hueRotate]
|
|
2319
|
+
}],
|
|
2320
|
+
/**
|
|
2321
|
+
* Backdrop Invert
|
|
2322
|
+
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
2323
|
+
*/
|
|
2324
|
+
"backdrop-invert": [{
|
|
2325
|
+
"backdrop-invert": [invert]
|
|
2326
|
+
}],
|
|
2327
|
+
/**
|
|
2328
|
+
* Backdrop Opacity
|
|
2329
|
+
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
2330
|
+
*/
|
|
2331
|
+
"backdrop-opacity": [{
|
|
2332
|
+
"backdrop-opacity": [opacity]
|
|
2333
|
+
}],
|
|
2334
|
+
/**
|
|
2335
|
+
* Backdrop Saturate
|
|
2336
|
+
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
2337
|
+
*/
|
|
2338
|
+
"backdrop-saturate": [{
|
|
2339
|
+
"backdrop-saturate": [saturate]
|
|
2340
|
+
}],
|
|
2341
|
+
/**
|
|
2342
|
+
* Backdrop Sepia
|
|
2343
|
+
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
2344
|
+
*/
|
|
2345
|
+
"backdrop-sepia": [{
|
|
2346
|
+
"backdrop-sepia": [sepia]
|
|
2347
|
+
}],
|
|
2348
|
+
// Tables
|
|
2349
|
+
/**
|
|
2350
|
+
* Border Collapse
|
|
2351
|
+
* @see https://tailwindcss.com/docs/border-collapse
|
|
2352
|
+
*/
|
|
2353
|
+
"border-collapse": [{
|
|
2354
|
+
border: ["collapse", "separate"]
|
|
2355
|
+
}],
|
|
2356
|
+
/**
|
|
2357
|
+
* Border Spacing
|
|
2358
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
2359
|
+
*/
|
|
2360
|
+
"border-spacing": [{
|
|
2361
|
+
"border-spacing": [borderSpacing]
|
|
2362
|
+
}],
|
|
2363
|
+
/**
|
|
2364
|
+
* Border Spacing X
|
|
2365
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
2366
|
+
*/
|
|
2367
|
+
"border-spacing-x": [{
|
|
2368
|
+
"border-spacing-x": [borderSpacing]
|
|
2369
|
+
}],
|
|
2370
|
+
/**
|
|
2371
|
+
* Border Spacing Y
|
|
2372
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
2373
|
+
*/
|
|
2374
|
+
"border-spacing-y": [{
|
|
2375
|
+
"border-spacing-y": [borderSpacing]
|
|
2376
|
+
}],
|
|
2377
|
+
/**
|
|
2378
|
+
* Table Layout
|
|
2379
|
+
* @see https://tailwindcss.com/docs/table-layout
|
|
2380
|
+
*/
|
|
2381
|
+
"table-layout": [{
|
|
2382
|
+
table: ["auto", "fixed"]
|
|
2383
|
+
}],
|
|
2384
|
+
/**
|
|
2385
|
+
* Caption Side
|
|
2386
|
+
* @see https://tailwindcss.com/docs/caption-side
|
|
2387
|
+
*/
|
|
2388
|
+
caption: [{
|
|
2389
|
+
caption: ["top", "bottom"]
|
|
2390
|
+
}],
|
|
2391
|
+
// Transitions and Animation
|
|
2392
|
+
/**
|
|
2393
|
+
* Tranisition Property
|
|
2394
|
+
* @see https://tailwindcss.com/docs/transition-property
|
|
2395
|
+
*/
|
|
2396
|
+
transition: [{
|
|
2397
|
+
transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", isArbitraryValue]
|
|
2398
|
+
}],
|
|
2399
|
+
/**
|
|
2400
|
+
* Transition Duration
|
|
2401
|
+
* @see https://tailwindcss.com/docs/transition-duration
|
|
2402
|
+
*/
|
|
2403
|
+
duration: [{
|
|
2404
|
+
duration: getNumberAndArbitrary()
|
|
2405
|
+
}],
|
|
2406
|
+
/**
|
|
2407
|
+
* Transition Timing Function
|
|
2408
|
+
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
2409
|
+
*/
|
|
2410
|
+
ease: [{
|
|
2411
|
+
ease: ["linear", "in", "out", "in-out", isArbitraryValue]
|
|
2412
|
+
}],
|
|
2413
|
+
/**
|
|
2414
|
+
* Transition Delay
|
|
2415
|
+
* @see https://tailwindcss.com/docs/transition-delay
|
|
2416
|
+
*/
|
|
2417
|
+
delay: [{
|
|
2418
|
+
delay: getNumberAndArbitrary()
|
|
2419
|
+
}],
|
|
2420
|
+
/**
|
|
2421
|
+
* Animation
|
|
2422
|
+
* @see https://tailwindcss.com/docs/animation
|
|
2423
|
+
*/
|
|
2424
|
+
animate: [{
|
|
2425
|
+
animate: ["none", "spin", "ping", "pulse", "bounce", isArbitraryValue]
|
|
2426
|
+
}],
|
|
2427
|
+
// Transforms
|
|
2428
|
+
/**
|
|
2429
|
+
* Transform
|
|
2430
|
+
* @see https://tailwindcss.com/docs/transform
|
|
2431
|
+
*/
|
|
2432
|
+
transform: [{
|
|
2433
|
+
transform: ["", "gpu", "none"]
|
|
2434
|
+
}],
|
|
2435
|
+
/**
|
|
2436
|
+
* Scale
|
|
2437
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2438
|
+
*/
|
|
2439
|
+
scale: [{
|
|
2440
|
+
scale: [scale]
|
|
2441
|
+
}],
|
|
2442
|
+
/**
|
|
2443
|
+
* Scale X
|
|
2444
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2445
|
+
*/
|
|
2446
|
+
"scale-x": [{
|
|
2447
|
+
"scale-x": [scale]
|
|
2448
|
+
}],
|
|
2449
|
+
/**
|
|
2450
|
+
* Scale Y
|
|
2451
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2452
|
+
*/
|
|
2453
|
+
"scale-y": [{
|
|
2454
|
+
"scale-y": [scale]
|
|
2455
|
+
}],
|
|
2456
|
+
/**
|
|
2457
|
+
* Rotate
|
|
2458
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
2459
|
+
*/
|
|
2460
|
+
rotate: [{
|
|
2461
|
+
rotate: [isInteger, isArbitraryValue]
|
|
2462
|
+
}],
|
|
2463
|
+
/**
|
|
2464
|
+
* Translate X
|
|
2465
|
+
* @see https://tailwindcss.com/docs/translate
|
|
2466
|
+
*/
|
|
2467
|
+
"translate-x": [{
|
|
2468
|
+
"translate-x": [translate]
|
|
2469
|
+
}],
|
|
2470
|
+
/**
|
|
2471
|
+
* Translate Y
|
|
2472
|
+
* @see https://tailwindcss.com/docs/translate
|
|
2473
|
+
*/
|
|
2474
|
+
"translate-y": [{
|
|
2475
|
+
"translate-y": [translate]
|
|
2476
|
+
}],
|
|
2477
|
+
/**
|
|
2478
|
+
* Skew X
|
|
2479
|
+
* @see https://tailwindcss.com/docs/skew
|
|
2480
|
+
*/
|
|
2481
|
+
"skew-x": [{
|
|
2482
|
+
"skew-x": [skew]
|
|
2483
|
+
}],
|
|
2484
|
+
/**
|
|
2485
|
+
* Skew Y
|
|
2486
|
+
* @see https://tailwindcss.com/docs/skew
|
|
2487
|
+
*/
|
|
2488
|
+
"skew-y": [{
|
|
2489
|
+
"skew-y": [skew]
|
|
2490
|
+
}],
|
|
2491
|
+
/**
|
|
2492
|
+
* Transform Origin
|
|
2493
|
+
* @see https://tailwindcss.com/docs/transform-origin
|
|
2494
|
+
*/
|
|
2495
|
+
"transform-origin": [{
|
|
2496
|
+
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", isArbitraryValue]
|
|
2497
|
+
}],
|
|
2498
|
+
// Interactivity
|
|
2499
|
+
/**
|
|
2500
|
+
* Accent Color
|
|
2501
|
+
* @see https://tailwindcss.com/docs/accent-color
|
|
2502
|
+
*/
|
|
2503
|
+
accent: [{
|
|
2504
|
+
accent: ["auto", colors]
|
|
2505
|
+
}],
|
|
2506
|
+
/**
|
|
2507
|
+
* Appearance
|
|
2508
|
+
* @see https://tailwindcss.com/docs/appearance
|
|
2509
|
+
*/
|
|
2510
|
+
appearance: [{
|
|
2511
|
+
appearance: ["none", "auto"]
|
|
2512
|
+
}],
|
|
2513
|
+
/**
|
|
2514
|
+
* Cursor
|
|
2515
|
+
* @see https://tailwindcss.com/docs/cursor
|
|
2516
|
+
*/
|
|
2517
|
+
cursor: [{
|
|
2518
|
+
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", isArbitraryValue]
|
|
2519
|
+
}],
|
|
2520
|
+
/**
|
|
2521
|
+
* Caret Color
|
|
2522
|
+
* @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
|
|
2523
|
+
*/
|
|
2524
|
+
"caret-color": [{
|
|
2525
|
+
caret: [colors]
|
|
2526
|
+
}],
|
|
2527
|
+
/**
|
|
2528
|
+
* Pointer Events
|
|
2529
|
+
* @see https://tailwindcss.com/docs/pointer-events
|
|
2530
|
+
*/
|
|
2531
|
+
"pointer-events": [{
|
|
2532
|
+
"pointer-events": ["none", "auto"]
|
|
2533
|
+
}],
|
|
2534
|
+
/**
|
|
2535
|
+
* Resize
|
|
2536
|
+
* @see https://tailwindcss.com/docs/resize
|
|
2537
|
+
*/
|
|
2538
|
+
resize: [{
|
|
2539
|
+
resize: ["none", "y", "x", ""]
|
|
2540
|
+
}],
|
|
2541
|
+
/**
|
|
2542
|
+
* Scroll Behavior
|
|
2543
|
+
* @see https://tailwindcss.com/docs/scroll-behavior
|
|
2544
|
+
*/
|
|
2545
|
+
"scroll-behavior": [{
|
|
2546
|
+
scroll: ["auto", "smooth"]
|
|
2547
|
+
}],
|
|
2548
|
+
/**
|
|
2549
|
+
* Scroll Margin
|
|
2550
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2551
|
+
*/
|
|
2552
|
+
"scroll-m": [{
|
|
2553
|
+
"scroll-m": getSpacingWithArbitrary()
|
|
2554
|
+
}],
|
|
2555
|
+
/**
|
|
2556
|
+
* Scroll Margin X
|
|
2557
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2558
|
+
*/
|
|
2559
|
+
"scroll-mx": [{
|
|
2560
|
+
"scroll-mx": getSpacingWithArbitrary()
|
|
2561
|
+
}],
|
|
2562
|
+
/**
|
|
2563
|
+
* Scroll Margin Y
|
|
2564
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2565
|
+
*/
|
|
2566
|
+
"scroll-my": [{
|
|
2567
|
+
"scroll-my": getSpacingWithArbitrary()
|
|
2568
|
+
}],
|
|
2569
|
+
/**
|
|
2570
|
+
* Scroll Margin Start
|
|
2571
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2572
|
+
*/
|
|
2573
|
+
"scroll-ms": [{
|
|
2574
|
+
"scroll-ms": getSpacingWithArbitrary()
|
|
2575
|
+
}],
|
|
2576
|
+
/**
|
|
2577
|
+
* Scroll Margin End
|
|
2578
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2579
|
+
*/
|
|
2580
|
+
"scroll-me": [{
|
|
2581
|
+
"scroll-me": getSpacingWithArbitrary()
|
|
2582
|
+
}],
|
|
2583
|
+
/**
|
|
2584
|
+
* Scroll Margin Top
|
|
2585
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2586
|
+
*/
|
|
2587
|
+
"scroll-mt": [{
|
|
2588
|
+
"scroll-mt": getSpacingWithArbitrary()
|
|
2589
|
+
}],
|
|
2590
|
+
/**
|
|
2591
|
+
* Scroll Margin Right
|
|
2592
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2593
|
+
*/
|
|
2594
|
+
"scroll-mr": [{
|
|
2595
|
+
"scroll-mr": getSpacingWithArbitrary()
|
|
2596
|
+
}],
|
|
2597
|
+
/**
|
|
2598
|
+
* Scroll Margin Bottom
|
|
2599
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2600
|
+
*/
|
|
2601
|
+
"scroll-mb": [{
|
|
2602
|
+
"scroll-mb": getSpacingWithArbitrary()
|
|
2603
|
+
}],
|
|
2604
|
+
/**
|
|
2605
|
+
* Scroll Margin Left
|
|
2606
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2607
|
+
*/
|
|
2608
|
+
"scroll-ml": [{
|
|
2609
|
+
"scroll-ml": getSpacingWithArbitrary()
|
|
2610
|
+
}],
|
|
2611
|
+
/**
|
|
2612
|
+
* Scroll Padding
|
|
2613
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2614
|
+
*/
|
|
2615
|
+
"scroll-p": [{
|
|
2616
|
+
"scroll-p": getSpacingWithArbitrary()
|
|
2617
|
+
}],
|
|
2618
|
+
/**
|
|
2619
|
+
* Scroll Padding X
|
|
2620
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2621
|
+
*/
|
|
2622
|
+
"scroll-px": [{
|
|
2623
|
+
"scroll-px": getSpacingWithArbitrary()
|
|
2624
|
+
}],
|
|
2625
|
+
/**
|
|
2626
|
+
* Scroll Padding Y
|
|
2627
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2628
|
+
*/
|
|
2629
|
+
"scroll-py": [{
|
|
2630
|
+
"scroll-py": getSpacingWithArbitrary()
|
|
2631
|
+
}],
|
|
2632
|
+
/**
|
|
2633
|
+
* Scroll Padding Start
|
|
2634
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2635
|
+
*/
|
|
2636
|
+
"scroll-ps": [{
|
|
2637
|
+
"scroll-ps": getSpacingWithArbitrary()
|
|
2638
|
+
}],
|
|
2639
|
+
/**
|
|
2640
|
+
* Scroll Padding End
|
|
2641
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2642
|
+
*/
|
|
2643
|
+
"scroll-pe": [{
|
|
2644
|
+
"scroll-pe": getSpacingWithArbitrary()
|
|
2645
|
+
}],
|
|
2646
|
+
/**
|
|
2647
|
+
* Scroll Padding Top
|
|
2648
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2649
|
+
*/
|
|
2650
|
+
"scroll-pt": [{
|
|
2651
|
+
"scroll-pt": getSpacingWithArbitrary()
|
|
2652
|
+
}],
|
|
2653
|
+
/**
|
|
2654
|
+
* Scroll Padding Right
|
|
2655
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2656
|
+
*/
|
|
2657
|
+
"scroll-pr": [{
|
|
2658
|
+
"scroll-pr": getSpacingWithArbitrary()
|
|
2659
|
+
}],
|
|
2660
|
+
/**
|
|
2661
|
+
* Scroll Padding Bottom
|
|
2662
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2663
|
+
*/
|
|
2664
|
+
"scroll-pb": [{
|
|
2665
|
+
"scroll-pb": getSpacingWithArbitrary()
|
|
2666
|
+
}],
|
|
2667
|
+
/**
|
|
2668
|
+
* Scroll Padding Left
|
|
2669
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2670
|
+
*/
|
|
2671
|
+
"scroll-pl": [{
|
|
2672
|
+
"scroll-pl": getSpacingWithArbitrary()
|
|
2673
|
+
}],
|
|
2674
|
+
/**
|
|
2675
|
+
* Scroll Snap Align
|
|
2676
|
+
* @see https://tailwindcss.com/docs/scroll-snap-align
|
|
2677
|
+
*/
|
|
2678
|
+
"snap-align": [{
|
|
2679
|
+
snap: ["start", "end", "center", "align-none"]
|
|
2680
|
+
}],
|
|
2681
|
+
/**
|
|
2682
|
+
* Scroll Snap Stop
|
|
2683
|
+
* @see https://tailwindcss.com/docs/scroll-snap-stop
|
|
2684
|
+
*/
|
|
2685
|
+
"snap-stop": [{
|
|
2686
|
+
snap: ["normal", "always"]
|
|
2687
|
+
}],
|
|
2688
|
+
/**
|
|
2689
|
+
* Scroll Snap Type
|
|
2690
|
+
* @see https://tailwindcss.com/docs/scroll-snap-type
|
|
2691
|
+
*/
|
|
2692
|
+
"snap-type": [{
|
|
2693
|
+
snap: ["none", "x", "y", "both"]
|
|
2694
|
+
}],
|
|
2695
|
+
/**
|
|
2696
|
+
* Scroll Snap Type Strictness
|
|
2697
|
+
* @see https://tailwindcss.com/docs/scroll-snap-type
|
|
2698
|
+
*/
|
|
2699
|
+
"snap-strictness": [{
|
|
2700
|
+
snap: ["mandatory", "proximity"]
|
|
2701
|
+
}],
|
|
2702
|
+
/**
|
|
2703
|
+
* Touch Action
|
|
2704
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
2705
|
+
*/
|
|
2706
|
+
touch: [{
|
|
2707
|
+
touch: ["auto", "none", "manipulation"]
|
|
2708
|
+
}],
|
|
2709
|
+
/**
|
|
2710
|
+
* Touch Action X
|
|
2711
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
2712
|
+
*/
|
|
2713
|
+
"touch-x": [{
|
|
2714
|
+
"touch-pan": ["x", "left", "right"]
|
|
2715
|
+
}],
|
|
2716
|
+
/**
|
|
2717
|
+
* Touch Action Y
|
|
2718
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
2719
|
+
*/
|
|
2720
|
+
"touch-y": [{
|
|
2721
|
+
"touch-pan": ["y", "up", "down"]
|
|
2722
|
+
}],
|
|
2723
|
+
/**
|
|
2724
|
+
* Touch Action Pinch Zoom
|
|
2725
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
2726
|
+
*/
|
|
2727
|
+
"touch-pz": ["touch-pinch-zoom"],
|
|
2728
|
+
/**
|
|
2729
|
+
* User Select
|
|
2730
|
+
* @see https://tailwindcss.com/docs/user-select
|
|
2731
|
+
*/
|
|
2732
|
+
select: [{
|
|
2733
|
+
select: ["none", "text", "all", "auto"]
|
|
2734
|
+
}],
|
|
2735
|
+
/**
|
|
2736
|
+
* Will Change
|
|
2737
|
+
* @see https://tailwindcss.com/docs/will-change
|
|
2738
|
+
*/
|
|
2739
|
+
"will-change": [{
|
|
2740
|
+
"will-change": ["auto", "scroll", "contents", "transform", isArbitraryValue]
|
|
2741
|
+
}],
|
|
2742
|
+
// SVG
|
|
2743
|
+
/**
|
|
2744
|
+
* Fill
|
|
2745
|
+
* @see https://tailwindcss.com/docs/fill
|
|
2746
|
+
*/
|
|
2747
|
+
fill: [{
|
|
2748
|
+
fill: [colors, "none"]
|
|
2749
|
+
}],
|
|
2750
|
+
/**
|
|
2751
|
+
* Stroke Width
|
|
2752
|
+
* @see https://tailwindcss.com/docs/stroke-width
|
|
2753
|
+
*/
|
|
2754
|
+
"stroke-w": [{
|
|
2755
|
+
stroke: [isLength, isArbitraryLength, isArbitraryNumber]
|
|
2756
|
+
}],
|
|
2757
|
+
/**
|
|
2758
|
+
* Stroke
|
|
2759
|
+
* @see https://tailwindcss.com/docs/stroke
|
|
2760
|
+
*/
|
|
2761
|
+
stroke: [{
|
|
2762
|
+
stroke: [colors, "none"]
|
|
2763
|
+
}],
|
|
2764
|
+
// Accessibility
|
|
2765
|
+
/**
|
|
2766
|
+
* Screen Readers
|
|
2767
|
+
* @see https://tailwindcss.com/docs/screen-readers
|
|
2768
|
+
*/
|
|
2769
|
+
sr: ["sr-only", "not-sr-only"],
|
|
2770
|
+
/**
|
|
2771
|
+
* Forced Color Adjust
|
|
2772
|
+
* @see https://tailwindcss.com/docs/forced-color-adjust
|
|
2773
|
+
*/
|
|
2774
|
+
"forced-color-adjust": [{
|
|
2775
|
+
"forced-color-adjust": ["auto", "none"]
|
|
2776
|
+
}]
|
|
2777
|
+
},
|
|
2778
|
+
conflictingClassGroups: {
|
|
2779
|
+
overflow: ["overflow-x", "overflow-y"],
|
|
2780
|
+
overscroll: ["overscroll-x", "overscroll-y"],
|
|
2781
|
+
inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
|
|
2782
|
+
"inset-x": ["right", "left"],
|
|
2783
|
+
"inset-y": ["top", "bottom"],
|
|
2784
|
+
flex: ["basis", "grow", "shrink"],
|
|
2785
|
+
gap: ["gap-x", "gap-y"],
|
|
2786
|
+
p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
|
|
2787
|
+
px: ["pr", "pl"],
|
|
2788
|
+
py: ["pt", "pb"],
|
|
2789
|
+
m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
|
|
2790
|
+
mx: ["mr", "ml"],
|
|
2791
|
+
my: ["mt", "mb"],
|
|
2792
|
+
size: ["w", "h"],
|
|
2793
|
+
"font-size": ["leading"],
|
|
2794
|
+
"fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
|
|
2795
|
+
"fvn-ordinal": ["fvn-normal"],
|
|
2796
|
+
"fvn-slashed-zero": ["fvn-normal"],
|
|
2797
|
+
"fvn-figure": ["fvn-normal"],
|
|
2798
|
+
"fvn-spacing": ["fvn-normal"],
|
|
2799
|
+
"fvn-fraction": ["fvn-normal"],
|
|
2800
|
+
"line-clamp": ["display", "overflow"],
|
|
2801
|
+
rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"],
|
|
2802
|
+
"rounded-s": ["rounded-ss", "rounded-es"],
|
|
2803
|
+
"rounded-e": ["rounded-se", "rounded-ee"],
|
|
2804
|
+
"rounded-t": ["rounded-tl", "rounded-tr"],
|
|
2805
|
+
"rounded-r": ["rounded-tr", "rounded-br"],
|
|
2806
|
+
"rounded-b": ["rounded-br", "rounded-bl"],
|
|
2807
|
+
"rounded-l": ["rounded-tl", "rounded-bl"],
|
|
2808
|
+
"border-spacing": ["border-spacing-x", "border-spacing-y"],
|
|
2809
|
+
"border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
|
|
2810
|
+
"border-w-x": ["border-w-r", "border-w-l"],
|
|
2811
|
+
"border-w-y": ["border-w-t", "border-w-b"],
|
|
2812
|
+
"border-color": ["border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
|
|
2813
|
+
"border-color-x": ["border-color-r", "border-color-l"],
|
|
2814
|
+
"border-color-y": ["border-color-t", "border-color-b"],
|
|
2815
|
+
"scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
|
|
2816
|
+
"scroll-mx": ["scroll-mr", "scroll-ml"],
|
|
2817
|
+
"scroll-my": ["scroll-mt", "scroll-mb"],
|
|
2818
|
+
"scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
|
|
2819
|
+
"scroll-px": ["scroll-pr", "scroll-pl"],
|
|
2820
|
+
"scroll-py": ["scroll-pt", "scroll-pb"],
|
|
2821
|
+
touch: ["touch-x", "touch-y", "touch-pz"],
|
|
2822
|
+
"touch-x": ["touch"],
|
|
2823
|
+
"touch-y": ["touch"],
|
|
2824
|
+
"touch-pz": ["touch"]
|
|
2825
|
+
},
|
|
2826
|
+
conflictingClassGroupModifiers: {
|
|
2827
|
+
"font-size": ["leading"]
|
|
2828
|
+
}
|
|
2829
|
+
};
|
|
2830
|
+
};
|
|
2831
|
+
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
2832
|
+
|
|
2833
|
+
// src/theme/lib/utils.ts
|
|
2834
|
+
function cn(...inputs) {
|
|
2835
|
+
return twMerge(clsx(inputs));
|
|
2836
|
+
}
|
|
2837
|
+
|
|
2838
|
+
// src/components/Button/index.tsx
|
|
2839
|
+
import { jsx } from "react/jsx-runtime";
|
|
2840
|
+
var buttonVariants = cva(
|
|
2841
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
2842
|
+
{
|
|
2843
|
+
variants: {
|
|
2844
|
+
variant: {
|
|
2845
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
2846
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
2847
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
2848
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
2849
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
2850
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
2851
|
+
borderNone: "border-none"
|
|
2852
|
+
},
|
|
2853
|
+
size: {
|
|
2854
|
+
default: "h-9 px-4 py-2",
|
|
2855
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
2856
|
+
lg: "h-10 rounded-md px-8",
|
|
2857
|
+
icon: "h-9 w-9"
|
|
2858
|
+
}
|
|
2859
|
+
},
|
|
2860
|
+
defaultVariants: {
|
|
2861
|
+
variant: "default",
|
|
2862
|
+
size: "default"
|
|
2863
|
+
}
|
|
2864
|
+
}
|
|
2865
|
+
);
|
|
2866
|
+
var Button = React.forwardRef(
|
|
2867
|
+
({ className, variant, size, ...props }, ref) => {
|
|
2868
|
+
return /* @__PURE__ */ jsx(
|
|
2869
|
+
"button",
|
|
2870
|
+
{
|
|
2871
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
2872
|
+
ref,
|
|
2873
|
+
...props
|
|
2874
|
+
}
|
|
2875
|
+
);
|
|
2876
|
+
}
|
|
2877
|
+
);
|
|
2878
|
+
Button.displayName = "Button";
|
|
24
2879
|
var Button_default = Button;
|
|
25
2880
|
|
|
26
2881
|
// src/components/Heading/index.tsx
|
|
@@ -69,22 +2924,22 @@ function SubTitle({ children, title, className = "" }) {
|
|
|
69
2924
|
initial: { opacity: 0 },
|
|
70
2925
|
animate: { opacity: 1 },
|
|
71
2926
|
transition: { duration: 0.5 },
|
|
72
|
-
className: `text-lg font-semibold
|
|
2927
|
+
className: `text-lg font-semibold ${className}`,
|
|
73
2928
|
children: title || children
|
|
74
2929
|
}
|
|
75
2930
|
);
|
|
76
2931
|
}
|
|
77
2932
|
|
|
78
2933
|
// src/layout/Header/index.tsx
|
|
79
|
-
import { useState } from "react";
|
|
80
|
-
import classNames from "classnames";
|
|
2934
|
+
import { useState as useState2 } from "react";
|
|
81
2935
|
import Link from "next/link";
|
|
82
2936
|
import { motion as motion2, AnimatePresence } from "framer-motion";
|
|
83
2937
|
|
|
84
2938
|
// src/layout/Header/BreadIcon.tsx
|
|
85
2939
|
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
86
|
-
var
|
|
87
|
-
var
|
|
2940
|
+
var commonCls = "w-full h-0.5 bg-primary duration-300";
|
|
2941
|
+
var spanDefaultCls = `${commonCls} transition-transform`;
|
|
2942
|
+
var spanOpacityCls = `${commonCls} transition-opacity`;
|
|
88
2943
|
function BreadIcon({ isMenuOpen }) {
|
|
89
2944
|
return /* @__PURE__ */ jsxs("div", { className: "w-6 h-5 relative flex flex-col justify-between", children: [
|
|
90
2945
|
/* @__PURE__ */ jsx3("span", { className: `${spanDefaultCls} ${isMenuOpen ? "rotate-45 translate-y-2" : ""}` }),
|
|
@@ -95,10 +2950,129 @@ function BreadIcon({ isMenuOpen }) {
|
|
|
95
2950
|
|
|
96
2951
|
// src/layout/Header/index.tsx
|
|
97
2952
|
import { usePathname } from "next/navigation";
|
|
2953
|
+
|
|
2954
|
+
// ../node_modules/next-themes/dist/index.mjs
|
|
2955
|
+
import * as t from "react";
|
|
2956
|
+
var M = (e3, i2, s2, u2, m2, a3, l2, h) => {
|
|
2957
|
+
let d2 = document.documentElement, w = ["light", "dark"];
|
|
2958
|
+
function p2(n3) {
|
|
2959
|
+
(Array.isArray(e3) ? e3 : [e3]).forEach((y3) => {
|
|
2960
|
+
let k2 = y3 === "class", S = k2 && a3 ? m2.map((f3) => a3[f3] || f3) : m2;
|
|
2961
|
+
k2 ? (d2.classList.remove(...S), d2.classList.add(a3 && a3[n3] ? a3[n3] : n3)) : d2.setAttribute(y3, n3);
|
|
2962
|
+
}), R(n3);
|
|
2963
|
+
}
|
|
2964
|
+
function R(n3) {
|
|
2965
|
+
h && w.includes(n3) && (d2.style.colorScheme = n3);
|
|
2966
|
+
}
|
|
2967
|
+
function c2() {
|
|
2968
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
2969
|
+
}
|
|
2970
|
+
if (u2) p2(u2);
|
|
2971
|
+
else try {
|
|
2972
|
+
let n3 = localStorage.getItem(i2) || s2, y3 = l2 && n3 === "system" ? c2() : n3;
|
|
2973
|
+
p2(y3);
|
|
2974
|
+
} catch (n3) {
|
|
2975
|
+
}
|
|
2976
|
+
};
|
|
2977
|
+
var b = ["light", "dark"];
|
|
2978
|
+
var I = "(prefers-color-scheme: dark)";
|
|
2979
|
+
var O = typeof window == "undefined";
|
|
2980
|
+
var x = t.createContext(void 0);
|
|
2981
|
+
var U = { setTheme: (e3) => {
|
|
2982
|
+
}, themes: [] };
|
|
2983
|
+
var z = () => {
|
|
2984
|
+
var e3;
|
|
2985
|
+
return (e3 = t.useContext(x)) != null ? e3 : U;
|
|
2986
|
+
};
|
|
2987
|
+
var J = (e3) => t.useContext(x) ? t.createElement(t.Fragment, null, e3.children) : t.createElement(V, { ...e3 });
|
|
2988
|
+
var N = ["light", "dark"];
|
|
2989
|
+
var V = ({ forcedTheme: e3, disableTransitionOnChange: i2 = false, enableSystem: s2 = true, enableColorScheme: u2 = true, storageKey: m2 = "theme", themes: a3 = N, defaultTheme: l2 = s2 ? "system" : "light", attribute: h = "data-theme", value: d2, children: w, nonce: p2, scriptProps: R }) => {
|
|
2990
|
+
let [c2, n3] = t.useState(() => H(m2, l2)), [T, y3] = t.useState(() => c2 === "system" ? E() : c2), k2 = d2 ? Object.values(d2) : a3, S = t.useCallback((o3) => {
|
|
2991
|
+
let r3 = o3;
|
|
2992
|
+
if (!r3) return;
|
|
2993
|
+
o3 === "system" && s2 && (r3 = E());
|
|
2994
|
+
let v = d2 ? d2[r3] : r3, C = i2 ? W(p2) : null, P2 = document.documentElement, L2 = (g2) => {
|
|
2995
|
+
g2 === "class" ? (P2.classList.remove(...k2), v && P2.classList.add(v)) : g2.startsWith("data-") && (v ? P2.setAttribute(g2, v) : P2.removeAttribute(g2));
|
|
2996
|
+
};
|
|
2997
|
+
if (Array.isArray(h) ? h.forEach(L2) : L2(h), u2) {
|
|
2998
|
+
let g2 = b.includes(l2) ? l2 : null, D = b.includes(r3) ? r3 : g2;
|
|
2999
|
+
P2.style.colorScheme = D;
|
|
3000
|
+
}
|
|
3001
|
+
C == null || C();
|
|
3002
|
+
}, [p2]), f3 = t.useCallback((o3) => {
|
|
3003
|
+
let r3 = typeof o3 == "function" ? o3(c2) : o3;
|
|
3004
|
+
n3(r3);
|
|
3005
|
+
try {
|
|
3006
|
+
localStorage.setItem(m2, r3);
|
|
3007
|
+
} catch (v) {
|
|
3008
|
+
}
|
|
3009
|
+
}, [c2]), A = t.useCallback((o3) => {
|
|
3010
|
+
let r3 = E(o3);
|
|
3011
|
+
y3(r3), c2 === "system" && s2 && !e3 && S("system");
|
|
3012
|
+
}, [c2, e3]);
|
|
3013
|
+
t.useEffect(() => {
|
|
3014
|
+
let o3 = window.matchMedia(I);
|
|
3015
|
+
return o3.addListener(A), A(o3), () => o3.removeListener(A);
|
|
3016
|
+
}, [A]), t.useEffect(() => {
|
|
3017
|
+
let o3 = (r3) => {
|
|
3018
|
+
r3.key === m2 && (r3.newValue ? n3(r3.newValue) : f3(l2));
|
|
3019
|
+
};
|
|
3020
|
+
return window.addEventListener("storage", o3), () => window.removeEventListener("storage", o3);
|
|
3021
|
+
}, [f3]), t.useEffect(() => {
|
|
3022
|
+
S(e3 != null ? e3 : c2);
|
|
3023
|
+
}, [e3, c2]);
|
|
3024
|
+
let Q = t.useMemo(() => ({ theme: c2, setTheme: f3, forcedTheme: e3, resolvedTheme: c2 === "system" ? T : c2, themes: s2 ? [...a3, "system"] : a3, systemTheme: s2 ? T : void 0 }), [c2, f3, e3, T, s2, a3]);
|
|
3025
|
+
return t.createElement(x.Provider, { value: Q }, t.createElement(_, { forcedTheme: e3, storageKey: m2, attribute: h, enableSystem: s2, enableColorScheme: u2, defaultTheme: l2, value: d2, themes: a3, nonce: p2, scriptProps: R }), w);
|
|
3026
|
+
};
|
|
3027
|
+
var _ = t.memo(({ forcedTheme: e3, storageKey: i2, attribute: s2, enableSystem: u2, enableColorScheme: m2, defaultTheme: a3, value: l2, themes: h, nonce: d2, scriptProps: w }) => {
|
|
3028
|
+
let p2 = JSON.stringify([s2, i2, a3, e3, h, l2, u2, m2]).slice(1, -1);
|
|
3029
|
+
return t.createElement("script", { ...w, suppressHydrationWarning: true, nonce: typeof window == "undefined" ? d2 : "", dangerouslySetInnerHTML: { __html: `(${M.toString()})(${p2})` } });
|
|
3030
|
+
});
|
|
3031
|
+
var H = (e3, i2) => {
|
|
3032
|
+
if (O) return;
|
|
3033
|
+
let s2;
|
|
3034
|
+
try {
|
|
3035
|
+
s2 = localStorage.getItem(e3) || void 0;
|
|
3036
|
+
} catch (u2) {
|
|
3037
|
+
}
|
|
3038
|
+
return s2 || i2;
|
|
3039
|
+
};
|
|
3040
|
+
var W = (e3) => {
|
|
3041
|
+
let i2 = document.createElement("style");
|
|
3042
|
+
return e3 && i2.setAttribute("nonce", e3), i2.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")), document.head.appendChild(i2), () => {
|
|
3043
|
+
window.getComputedStyle(document.body), setTimeout(() => {
|
|
3044
|
+
document.head.removeChild(i2);
|
|
3045
|
+
}, 1);
|
|
3046
|
+
};
|
|
3047
|
+
};
|
|
3048
|
+
var E = (e3) => (e3 || (e3 = window.matchMedia(I)), e3.matches ? "dark" : "light");
|
|
3049
|
+
|
|
3050
|
+
// src/theme/providers/theme-toggle.tsx
|
|
3051
|
+
import { Moon, Sun } from "lucide-react";
|
|
98
3052
|
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
99
|
-
|
|
3053
|
+
function ThemeToggle() {
|
|
3054
|
+
const { theme, setTheme } = z();
|
|
3055
|
+
return /* @__PURE__ */ jsxs2(
|
|
3056
|
+
Button,
|
|
3057
|
+
{
|
|
3058
|
+
variant: "borderNone",
|
|
3059
|
+
size: "icon",
|
|
3060
|
+
onClick: () => setTheme(theme === "light" ? "dark" : "light"),
|
|
3061
|
+
children: [
|
|
3062
|
+
/* @__PURE__ */ jsx4(Sun, { className: "h-5 w-5 rotate-0 scale-100 transition-all dark:rotate-90 dark:scale-0" }),
|
|
3063
|
+
/* @__PURE__ */ jsx4(Moon, { className: "absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" }),
|
|
3064
|
+
/* @__PURE__ */ jsx4("span", { className: "sr-only", children: "Toggle theme" })
|
|
3065
|
+
]
|
|
3066
|
+
}
|
|
3067
|
+
);
|
|
3068
|
+
}
|
|
3069
|
+
var theme_toggle_default = ThemeToggle;
|
|
3070
|
+
|
|
3071
|
+
// src/layout/Header/index.tsx
|
|
3072
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
3073
|
+
var getActivedCls = (href, selectedKey, activeClassName = "text-primary") => {
|
|
100
3074
|
if (href.includes(selectedKey) || href === "/" && selectedKey === "home") {
|
|
101
|
-
return
|
|
3075
|
+
return activeClassName;
|
|
102
3076
|
}
|
|
103
3077
|
return "";
|
|
104
3078
|
};
|
|
@@ -106,11 +3080,12 @@ var Header = ({
|
|
|
106
3080
|
logo,
|
|
107
3081
|
menuItems,
|
|
108
3082
|
className = "",
|
|
109
|
-
enableAnimation = true
|
|
3083
|
+
enableAnimation = true,
|
|
3084
|
+
theme = {}
|
|
110
3085
|
}) => {
|
|
111
|
-
const [isMenuOpen, setIsMenuOpen] =
|
|
3086
|
+
const [isMenuOpen, setIsMenuOpen] = useState2(false);
|
|
112
3087
|
const selectedKey = usePathname().split("/")[2] || "home";
|
|
113
|
-
const baseNavClassName =
|
|
3088
|
+
const baseNavClassName = `fixed top-0 left-0 right-0 z-50 backdrop-blur-lg ${className}`;
|
|
114
3089
|
const navVariants = {
|
|
115
3090
|
hidden: { y: -20, opacity: 0 },
|
|
116
3091
|
visible: {
|
|
@@ -123,7 +3098,7 @@ var Header = ({
|
|
|
123
3098
|
}
|
|
124
3099
|
};
|
|
125
3100
|
const HeaderWrapper = enableAnimation ? motion2.header : "header";
|
|
126
|
-
return /* @__PURE__ */
|
|
3101
|
+
return /* @__PURE__ */ jsxs3(
|
|
127
3102
|
HeaderWrapper,
|
|
128
3103
|
{
|
|
129
3104
|
className: baseNavClassName,
|
|
@@ -133,20 +3108,70 @@ var Header = ({
|
|
|
133
3108
|
variants: navVariants
|
|
134
3109
|
},
|
|
135
3110
|
children: [
|
|
136
|
-
/* @__PURE__ */
|
|
3111
|
+
/* @__PURE__ */ jsxs3("div", { className: "container flex items-center justify-between p-4", children: [
|
|
137
3112
|
logo,
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
|
|
3113
|
+
/* @__PURE__ */ jsx5(
|
|
3114
|
+
DesktopNav,
|
|
3115
|
+
{
|
|
3116
|
+
menuItems,
|
|
3117
|
+
selectedKey,
|
|
3118
|
+
enableAnimation,
|
|
3119
|
+
activeClassName: theme.activeClassName
|
|
3120
|
+
}
|
|
3121
|
+
),
|
|
3122
|
+
/* @__PURE__ */ jsx5(
|
|
3123
|
+
MobileMenuBtn,
|
|
3124
|
+
{
|
|
3125
|
+
menuItems,
|
|
3126
|
+
selectedKey,
|
|
3127
|
+
setIsMenuOpen,
|
|
3128
|
+
isMenuOpen,
|
|
3129
|
+
className: theme.mobileMenu?.button
|
|
3130
|
+
}
|
|
3131
|
+
)
|
|
140
3132
|
] }),
|
|
141
|
-
/* @__PURE__ */
|
|
3133
|
+
/* @__PURE__ */ jsx5(AnimatePresence, { children: isMenuOpen && /* @__PURE__ */ jsx5(
|
|
3134
|
+
MobileNav,
|
|
3135
|
+
{
|
|
3136
|
+
menuItems,
|
|
3137
|
+
selectedKey,
|
|
3138
|
+
enableAnimation,
|
|
3139
|
+
className: theme.mobileMenu?.nav,
|
|
3140
|
+
activeClassName: theme.activeClassName
|
|
3141
|
+
}
|
|
3142
|
+
) })
|
|
142
3143
|
]
|
|
143
3144
|
}
|
|
144
3145
|
);
|
|
145
3146
|
};
|
|
146
|
-
var DesktopNav = ({
|
|
147
|
-
|
|
3147
|
+
var DesktopNav = ({
|
|
3148
|
+
menuItems,
|
|
3149
|
+
selectedKey,
|
|
3150
|
+
enableAnimation,
|
|
3151
|
+
activeClassName
|
|
3152
|
+
}) => {
|
|
3153
|
+
return /* @__PURE__ */ jsxs3("nav", { className: "hidden md:flex items-center space-x-8", children: [
|
|
3154
|
+
/* @__PURE__ */ jsx5(ThemeToggle, {}),
|
|
3155
|
+
menuItems.map((item) => /* @__PURE__ */ jsx5(
|
|
3156
|
+
NavLink,
|
|
3157
|
+
{
|
|
3158
|
+
href: item.href,
|
|
3159
|
+
selectedKey,
|
|
3160
|
+
className: item.className?.pc,
|
|
3161
|
+
activeClassName,
|
|
3162
|
+
children: item.label
|
|
3163
|
+
},
|
|
3164
|
+
item.key
|
|
3165
|
+
))
|
|
3166
|
+
] });
|
|
148
3167
|
};
|
|
149
|
-
var MobileNav = ({
|
|
3168
|
+
var MobileNav = ({
|
|
3169
|
+
menuItems,
|
|
3170
|
+
selectedKey,
|
|
3171
|
+
enableAnimation,
|
|
3172
|
+
className,
|
|
3173
|
+
activeClassName
|
|
3174
|
+
}) => {
|
|
150
3175
|
const MobileMenuComponent = enableAnimation ? motion2.div : "div";
|
|
151
3176
|
const mobileMenuVariants = {
|
|
152
3177
|
hidden: {
|
|
@@ -166,67 +3191,92 @@ var MobileNav = ({ menuItems, selectedKey, enableAnimation }) => {
|
|
|
166
3191
|
}
|
|
167
3192
|
}
|
|
168
3193
|
};
|
|
169
|
-
return /* @__PURE__ */
|
|
3194
|
+
return /* @__PURE__ */ jsx5(
|
|
170
3195
|
MobileMenuComponent,
|
|
171
3196
|
{
|
|
172
|
-
className:
|
|
3197
|
+
className: `md:hidden overflow-hidden ${className || ""}`,
|
|
173
3198
|
...enableAnimation && {
|
|
174
3199
|
initial: "hidden",
|
|
175
3200
|
animate: "visible",
|
|
176
3201
|
exit: "hidden",
|
|
177
3202
|
variants: mobileMenuVariants
|
|
178
3203
|
},
|
|
179
|
-
children: /* @__PURE__ */
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
3204
|
+
children: /* @__PURE__ */ jsxs3("nav", { className: "flex flex-col space-y-4 py-4 items-center", children: [
|
|
3205
|
+
/* @__PURE__ */ jsx5(ThemeToggle, {}),
|
|
3206
|
+
menuItems.map((item) => /* @__PURE__ */ jsx5(MobileMenuComponent, { ...enableAnimation && {
|
|
3207
|
+
initial: { x: -20, opacity: 0 },
|
|
3208
|
+
animate: { x: 0, opacity: 1 },
|
|
3209
|
+
transition: { delay: 0.1 }
|
|
3210
|
+
}, children: /* @__PURE__ */ jsx5(
|
|
3211
|
+
MobileNavLink,
|
|
3212
|
+
{
|
|
3213
|
+
href: item.href,
|
|
3214
|
+
selectedKey,
|
|
3215
|
+
className: item.className?.mobile,
|
|
3216
|
+
activeClassName,
|
|
3217
|
+
children: item.label
|
|
3218
|
+
}
|
|
3219
|
+
) }, item.key))
|
|
3220
|
+
] })
|
|
184
3221
|
}
|
|
185
3222
|
);
|
|
186
3223
|
};
|
|
187
|
-
var MobileMenuBtn = ({
|
|
188
|
-
|
|
3224
|
+
var MobileMenuBtn = ({
|
|
3225
|
+
setIsMenuOpen,
|
|
3226
|
+
isMenuOpen,
|
|
3227
|
+
className = "p-2 hover:bg-accent rounded-lg transition-colors"
|
|
3228
|
+
}) => {
|
|
3229
|
+
return /* @__PURE__ */ jsx5(
|
|
189
3230
|
"button",
|
|
190
3231
|
{
|
|
191
3232
|
onClick: () => setIsMenuOpen(!isMenuOpen),
|
|
192
|
-
className:
|
|
193
|
-
children: /* @__PURE__ */
|
|
3233
|
+
className: `md:hidden ${className}`,
|
|
3234
|
+
children: /* @__PURE__ */ jsx5(BreadIcon, { isMenuOpen })
|
|
194
3235
|
}
|
|
195
3236
|
);
|
|
196
3237
|
};
|
|
197
|
-
var NavLink = ({
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
3238
|
+
var NavLink = ({
|
|
3239
|
+
href,
|
|
3240
|
+
children,
|
|
3241
|
+
className,
|
|
3242
|
+
selectedKey,
|
|
3243
|
+
activeClassName
|
|
3244
|
+
}) => {
|
|
3245
|
+
const combinedClassName = `${className || "hover:text-foreground transition-colors"} ${getActivedCls(href, selectedKey, activeClassName)}`;
|
|
3246
|
+
return /* @__PURE__ */ jsx5(Link, { href, legacyBehavior: true, children: /* @__PURE__ */ jsx5("a", { className: combinedClassName, children }) });
|
|
203
3247
|
};
|
|
204
|
-
var MobileNavLink = ({
|
|
205
|
-
|
|
206
|
-
|
|
3248
|
+
var MobileNavLink = ({
|
|
3249
|
+
href,
|
|
3250
|
+
children,
|
|
3251
|
+
className,
|
|
3252
|
+
selectedKey,
|
|
3253
|
+
activeClassName
|
|
3254
|
+
}) => {
|
|
3255
|
+
const combinedClassName = `${className || "text-lg font-medium text-center hover:text-primary transition-colors"} ${getActivedCls(href, selectedKey, activeClassName)}`;
|
|
3256
|
+
return /* @__PURE__ */ jsx5(Link, { href, legacyBehavior: true, children: /* @__PURE__ */ jsx5("a", { className: combinedClassName, children }) });
|
|
207
3257
|
};
|
|
208
3258
|
var Header_default = Header;
|
|
209
3259
|
|
|
210
3260
|
// src/layout/Footer/index.tsx
|
|
211
3261
|
import Link2 from "next/link";
|
|
212
|
-
import { jsx as
|
|
3262
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
213
3263
|
var Footer = ({
|
|
214
3264
|
site,
|
|
215
3265
|
navigation,
|
|
216
3266
|
texts,
|
|
217
3267
|
className = ""
|
|
218
3268
|
}) => {
|
|
219
|
-
return /* @__PURE__ */
|
|
220
|
-
/* @__PURE__ */
|
|
221
|
-
/* @__PURE__ */
|
|
222
|
-
/* @__PURE__ */
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
-
/* @__PURE__ */
|
|
3269
|
+
return /* @__PURE__ */ jsxs4("footer", { className: `relative bg-gradient-to-b from-gray-50 to-gray-100 pt-16 pb-6 ${className}`, children: [
|
|
3270
|
+
/* @__PURE__ */ jsx6("div", { className: "absolute inset-0 bg-grid-gray-200/25 [mask-image:linear-gradient(0deg,white,rgba(255,255,255,0.6))]" }),
|
|
3271
|
+
/* @__PURE__ */ jsxs4("div", { className: "container mx-auto p-4 relative", children: [
|
|
3272
|
+
/* @__PURE__ */ jsxs4("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8 mb-12", children: [
|
|
3273
|
+
/* @__PURE__ */ jsxs4("div", { className: "space-y-4", children: [
|
|
3274
|
+
/* @__PURE__ */ jsx6("h3", { className: "text-xl font-bold bg-gradient-to-r from-purple-600 to-pink-500 bg-clip-text text-transparent", children: site.name }),
|
|
3275
|
+
/* @__PURE__ */ jsx6("p", { className: "text-gray-600 max-w-xs hover-text-foreground", children: site.description })
|
|
226
3276
|
] }),
|
|
227
|
-
/* @__PURE__ */
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */
|
|
3277
|
+
/* @__PURE__ */ jsxs4("div", { className: "space-y-4 ", children: [
|
|
3278
|
+
/* @__PURE__ */ jsx6("h4", { className: "text-sm font-semibold uppercase text-foreground", children: navigation.quickLinks.title }),
|
|
3279
|
+
/* @__PURE__ */ jsx6("nav", { className: "flex flex-col space-y-2", children: navigation.quickLinks.items.map((item) => /* @__PURE__ */ jsx6(
|
|
230
3280
|
Link2,
|
|
231
3281
|
{
|
|
232
3282
|
href: item.href,
|
|
@@ -236,9 +3286,9 @@ var Footer = ({
|
|
|
236
3286
|
item.href
|
|
237
3287
|
)) })
|
|
238
3288
|
] }),
|
|
239
|
-
/* @__PURE__ */
|
|
240
|
-
/* @__PURE__ */
|
|
241
|
-
/* @__PURE__ */
|
|
3289
|
+
/* @__PURE__ */ jsxs4("div", { className: "space-y-4", children: [
|
|
3290
|
+
/* @__PURE__ */ jsx6("h4", { className: "text-sm font-semibold uppercase text-foreground", children: texts.social }),
|
|
3291
|
+
/* @__PURE__ */ jsx6("div", { className: "flex space-x-4", children: navigation.socialLinks.map((link) => /* @__PURE__ */ jsx6(
|
|
242
3292
|
"a",
|
|
243
3293
|
{
|
|
244
3294
|
href: link.href,
|
|
@@ -251,37 +3301,637 @@ var Footer = ({
|
|
|
251
3301
|
)) })
|
|
252
3302
|
] })
|
|
253
3303
|
] }),
|
|
254
|
-
/* @__PURE__ */
|
|
255
|
-
/* @__PURE__ */
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
-
/* @__PURE__ */
|
|
258
|
-
/* @__PURE__ */
|
|
3304
|
+
/* @__PURE__ */ jsx6("div", { className: "border-t pt-4", children: /* @__PURE__ */ jsxs4("div", { className: "flex flex-col md:flex-row justify-between items-center space-y-4 md:space-y-0", children: [
|
|
3305
|
+
/* @__PURE__ */ jsx6("p", { className: "text-sm text-gray-600", children: texts.copyright }),
|
|
3306
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex space-x-6", children: [
|
|
3307
|
+
/* @__PURE__ */ jsx6(Link2, { href: "/privacy", className: "text-sm px-8 text-gray-600 hover:text-purple-600 transition-colors", children: texts.privacy }),
|
|
3308
|
+
/* @__PURE__ */ jsx6(Link2, { href: "/terms", className: "text-sm px-8 text-gray-600 hover:text-purple-600 transition-colors", children: texts.terms })
|
|
259
3309
|
] })
|
|
260
3310
|
] }) })
|
|
261
|
-
] })
|
|
262
|
-
/* @__PURE__ */ jsx5("div", { className: "absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-purple-600 via-pink-500 to-purple-600" })
|
|
3311
|
+
] })
|
|
263
3312
|
] });
|
|
264
3313
|
};
|
|
265
3314
|
var Footer_default = Footer;
|
|
266
3315
|
|
|
3316
|
+
// src/layout/BasicLayout/index.tsx
|
|
3317
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
3318
|
+
function BasicLayout({ children }) {
|
|
3319
|
+
return /* @__PURE__ */ jsx7("div", { children });
|
|
3320
|
+
}
|
|
3321
|
+
|
|
267
3322
|
// src/hooks/useForceRerender.ts
|
|
268
|
-
import { useState as
|
|
3323
|
+
import { useState as useState3, useCallback as useCallback2 } from "react";
|
|
269
3324
|
var useForceRerender = () => {
|
|
270
|
-
const [key, setKey] =
|
|
271
|
-
const forceRerender =
|
|
3325
|
+
const [key, setKey] = useState3(0);
|
|
3326
|
+
const forceRerender = useCallback2(() => {
|
|
272
3327
|
setKey((prevKey) => prevKey + 1);
|
|
273
3328
|
}, []);
|
|
274
3329
|
return [key, forceRerender];
|
|
275
3330
|
};
|
|
276
3331
|
var useForceRerender_default = useForceRerender;
|
|
3332
|
+
|
|
3333
|
+
// ../node_modules/@studio-freight/hamo/dist/hamo.modern.mjs
|
|
3334
|
+
import { useCallback as e, useEffect as t2, useState as n, useMemo as r2, useRef as o } from "react";
|
|
3335
|
+
|
|
3336
|
+
// ../node_modules/@studio-freight/tempus/dist/tempus.modern.mjs
|
|
3337
|
+
var a = "undefined" != typeof window && new class {
|
|
3338
|
+
constructor() {
|
|
3339
|
+
this.raf = (a3) => {
|
|
3340
|
+
requestAnimationFrame(this.raf);
|
|
3341
|
+
const t4 = a3 - this.now;
|
|
3342
|
+
this.now = a3;
|
|
3343
|
+
for (let s2 = 0; s2 < this.callbacks.length; s2++) this.callbacks[s2].callback(a3, t4);
|
|
3344
|
+
}, this.callbacks = [], this.now = performance.now(), requestAnimationFrame(this.raf);
|
|
3345
|
+
}
|
|
3346
|
+
add(a3, t4 = 0) {
|
|
3347
|
+
return this.callbacks.push({ callback: a3, priority: t4 }), this.callbacks.sort((a4, t5) => a4.priority - t5.priority), () => this.remove(a3);
|
|
3348
|
+
}
|
|
3349
|
+
remove(a3) {
|
|
3350
|
+
this.callbacks = this.callbacks.filter(({ callback: t4 }) => a3 !== t4);
|
|
3351
|
+
}
|
|
3352
|
+
}();
|
|
3353
|
+
|
|
3354
|
+
// ../node_modules/just-debounce-it/index.mjs
|
|
3355
|
+
var functionDebounce = debounce;
|
|
3356
|
+
function debounce(fn, wait, callFirst) {
|
|
3357
|
+
var timeout = null;
|
|
3358
|
+
var debouncedFn = null;
|
|
3359
|
+
var clear = function() {
|
|
3360
|
+
if (timeout) {
|
|
3361
|
+
clearTimeout(timeout);
|
|
3362
|
+
debouncedFn = null;
|
|
3363
|
+
timeout = null;
|
|
3364
|
+
}
|
|
3365
|
+
};
|
|
3366
|
+
var flush = function() {
|
|
3367
|
+
var call = debouncedFn;
|
|
3368
|
+
clear();
|
|
3369
|
+
if (call) {
|
|
3370
|
+
call();
|
|
3371
|
+
}
|
|
3372
|
+
};
|
|
3373
|
+
var debounceWrapper = function() {
|
|
3374
|
+
if (!wait) {
|
|
3375
|
+
return fn.apply(this, arguments);
|
|
3376
|
+
}
|
|
3377
|
+
var context = this;
|
|
3378
|
+
var args = arguments;
|
|
3379
|
+
var callNow = callFirst && !timeout;
|
|
3380
|
+
clear();
|
|
3381
|
+
debouncedFn = function() {
|
|
3382
|
+
fn.apply(context, args);
|
|
3383
|
+
};
|
|
3384
|
+
timeout = setTimeout(function() {
|
|
3385
|
+
timeout = null;
|
|
3386
|
+
if (!callNow) {
|
|
3387
|
+
var call = debouncedFn;
|
|
3388
|
+
debouncedFn = null;
|
|
3389
|
+
return call();
|
|
3390
|
+
}
|
|
3391
|
+
}, wait);
|
|
3392
|
+
if (callNow) {
|
|
3393
|
+
return debouncedFn();
|
|
3394
|
+
}
|
|
3395
|
+
};
|
|
3396
|
+
debounceWrapper.cancel = clear;
|
|
3397
|
+
debounceWrapper.flush = flush;
|
|
3398
|
+
return debounceWrapper;
|
|
3399
|
+
}
|
|
3400
|
+
|
|
3401
|
+
// ../node_modules/nanoevents/index.js
|
|
3402
|
+
var createNanoEvents = () => ({
|
|
3403
|
+
emit(event, ...args) {
|
|
3404
|
+
for (let callbacks = this.events[event] || [], i2 = 0, length = callbacks.length; i2 < length; i2++) {
|
|
3405
|
+
callbacks[i2](...args);
|
|
3406
|
+
}
|
|
3407
|
+
},
|
|
3408
|
+
events: {},
|
|
3409
|
+
on(event, cb) {
|
|
3410
|
+
var _a;
|
|
3411
|
+
;
|
|
3412
|
+
((_a = this.events)[event] || (_a[event] = [])).push(cb);
|
|
3413
|
+
return () => {
|
|
3414
|
+
this.events[event] = this.events[event]?.filter((i2) => cb !== i2);
|
|
3415
|
+
};
|
|
3416
|
+
}
|
|
3417
|
+
});
|
|
3418
|
+
|
|
3419
|
+
// ../node_modules/@studio-freight/hamo/dist/hamo.modern.mjs
|
|
3420
|
+
function f(e3, n3 = 0) {
|
|
3421
|
+
t2(() => {
|
|
3422
|
+
if (e3) return a.add(e3, n3), () => a.remove(e3);
|
|
3423
|
+
}, [e3, n3]);
|
|
3424
|
+
}
|
|
3425
|
+
function g() {
|
|
3426
|
+
return g = Object.assign ? Object.assign.bind() : function(e3) {
|
|
3427
|
+
for (var t4 = 1; t4 < arguments.length; t4++) {
|
|
3428
|
+
var n3 = arguments[t4];
|
|
3429
|
+
for (var r3 in n3) Object.prototype.hasOwnProperty.call(n3, r3) && (e3[r3] = n3[r3]);
|
|
3430
|
+
}
|
|
3431
|
+
return e3;
|
|
3432
|
+
}, g.apply(this, arguments);
|
|
3433
|
+
}
|
|
3434
|
+
function p(e3) {
|
|
3435
|
+
"sticky" === getComputedStyle(e3).position && (e3.style.setProperty("position", "static"), e3.dataset.sticky = "true"), e3.offsetParent && p(e3.offsetParent);
|
|
3436
|
+
}
|
|
3437
|
+
function b2(e3) {
|
|
3438
|
+
var t4;
|
|
3439
|
+
"true" === (null == e3 || null == (t4 = e3.dataset) ? void 0 : t4.sticky) && (e3.style.removeProperty("position"), e3.dataset.sticky = "true", delete e3.dataset.sticky), e3.parentNode && b2(e3.parentNode);
|
|
3440
|
+
}
|
|
3441
|
+
function y(e3, t4 = 0) {
|
|
3442
|
+
const n3 = t4 + e3.offsetTop;
|
|
3443
|
+
return e3.offsetParent ? y(e3.offsetParent, n3) : n3;
|
|
3444
|
+
}
|
|
3445
|
+
function z2(e3, t4 = 0) {
|
|
3446
|
+
const n3 = t4 + e3.offsetLeft;
|
|
3447
|
+
return e3.offsetParent ? z2(e3.offsetParent, n3) : n3;
|
|
3448
|
+
}
|
|
3449
|
+
function P(e3, t4 = 0) {
|
|
3450
|
+
const n3 = t4 + e3.scrollTop;
|
|
3451
|
+
return e3.offsetParent ? P(e3.offsetParent, n3) : n3 + window.scrollY;
|
|
3452
|
+
}
|
|
3453
|
+
function E2(e3, t4 = 0) {
|
|
3454
|
+
const n3 = t4 + e3.scrollLeft;
|
|
3455
|
+
return e3.offsetParent ? E2(e3.offsetParent, n3) : n3 + window.scrollX;
|
|
3456
|
+
}
|
|
3457
|
+
var L = createNanoEvents();
|
|
3458
|
+
function k({ ignoreTransform: r3 = false, ignoreSticky: c2 = true, debounce: u2 = 500, lazy: s2 = false, callback: a3 } = {}) {
|
|
3459
|
+
const [d2, l2] = n(), f3 = o({}), [h, m2] = n({}), v = e(({ top: e3, left: t4, width: n3, height: r4, element: o3 }) => {
|
|
3460
|
+
var c3, i2, u3, d3, l3;
|
|
3461
|
+
e3 = null != (c3 = e3) ? c3 : f3.current.top, t4 = null != (i2 = t4) ? i2 : f3.current.left, n3 = null != (u3 = n3) ? u3 : f3.current.width, r4 = null != (d3 = r4) ? d3 : f3.current.height, o3 = null != (l3 = o3) ? l3 : f3.current.element, e3 === f3.current.top && t4 === f3.current.left && n3 === f3.current.width && r4 === f3.current.height && o3 === f3.current.element || (f3.current.top = e3, f3.current.y = e3, f3.current.width = n3, f3.current.height = r4, f3.current.left = t4, f3.current.x = t4, f3.current.bottom = e3 + r4, f3.current.right = t4 + n3, f3.current.element = o3, null == a3 || a3(f3.current), s2 || m2(g({}, f3.current)));
|
|
3462
|
+
}, [s2]);
|
|
3463
|
+
t2(() => {
|
|
3464
|
+
if (!d2) return;
|
|
3465
|
+
const e3 = d2.getBoundingClientRect();
|
|
3466
|
+
v({ width: e3.width, height: e3.height });
|
|
3467
|
+
const t4 = functionDebounce(([e4]) => {
|
|
3468
|
+
v({ width: e4.borderBoxSize[0].inlineSize, height: e4.borderBoxSize[0].blockSize });
|
|
3469
|
+
}, u2), n3 = new ResizeObserver(t4);
|
|
3470
|
+
return n3.observe(d2), () => {
|
|
3471
|
+
n3.disconnect(), t4.cancel();
|
|
3472
|
+
};
|
|
3473
|
+
}, [d2, u2, v]);
|
|
3474
|
+
const [w, k2] = n(), x2 = e(() => {
|
|
3475
|
+
if (!d2) return;
|
|
3476
|
+
let e3, t4;
|
|
3477
|
+
if (c2 && p(d2), r3) e3 = y(d2), t4 = z2(d2);
|
|
3478
|
+
else {
|
|
3479
|
+
const n3 = d2.getBoundingClientRect();
|
|
3480
|
+
e3 = n3.top + P(d2), t4 = n3.left + E2(d2);
|
|
3481
|
+
}
|
|
3482
|
+
c2 && b2(d2), v({ top: e3, left: t4, element: d2 });
|
|
3483
|
+
}, [r3, c2, d2, v]);
|
|
3484
|
+
t2(() => {
|
|
3485
|
+
x2();
|
|
3486
|
+
const e3 = functionDebounce(x2, u2), t4 = new ResizeObserver(e3);
|
|
3487
|
+
return t4.observe(null != w ? w : document.body), () => {
|
|
3488
|
+
t4.disconnect(), e3.cancel();
|
|
3489
|
+
};
|
|
3490
|
+
}, [w, u2, x2]), t2(() => L.on("resize", function() {
|
|
3491
|
+
if (!d2) return;
|
|
3492
|
+
const e3 = d2.getBoundingClientRect();
|
|
3493
|
+
v({ width: e3.width, height: e3.height }), x2();
|
|
3494
|
+
}), [d2, x2, v]);
|
|
3495
|
+
const O2 = e(() => f3.current, []);
|
|
3496
|
+
return [l2, s2 ? O2 : h, k2];
|
|
3497
|
+
}
|
|
3498
|
+
k.resize = () => {
|
|
3499
|
+
L.emit("resize");
|
|
3500
|
+
};
|
|
3501
|
+
|
|
3502
|
+
// ../node_modules/@studio-freight/lenis/dist/lenis.mjs
|
|
3503
|
+
function t3(t4, e3, i2) {
|
|
3504
|
+
return Math.max(t4, Math.min(e3, i2));
|
|
3505
|
+
}
|
|
3506
|
+
var Animate = class {
|
|
3507
|
+
advance(e3) {
|
|
3508
|
+
if (!this.isRunning) return;
|
|
3509
|
+
let i2 = false;
|
|
3510
|
+
if (this.lerp) this.value = (s2 = this.value, o3 = this.to, n3 = 60 * this.lerp, r3 = e3, function(t4, e4, i3) {
|
|
3511
|
+
return (1 - i3) * t4 + i3 * e4;
|
|
3512
|
+
}(s2, o3, 1 - Math.exp(-n3 * r3))), Math.round(this.value) === this.to && (this.value = this.to, i2 = true);
|
|
3513
|
+
else {
|
|
3514
|
+
this.currentTime += e3;
|
|
3515
|
+
const s3 = t3(0, this.currentTime / this.duration, 1);
|
|
3516
|
+
i2 = s3 >= 1;
|
|
3517
|
+
const o4 = i2 ? 1 : this.easing(s3);
|
|
3518
|
+
this.value = this.from + (this.to - this.from) * o4;
|
|
3519
|
+
}
|
|
3520
|
+
var s2, o3, n3, r3;
|
|
3521
|
+
this.onUpdate?.(this.value, i2), i2 && this.stop();
|
|
3522
|
+
}
|
|
3523
|
+
stop() {
|
|
3524
|
+
this.isRunning = false;
|
|
3525
|
+
}
|
|
3526
|
+
fromTo(t4, e3, { lerp: i2 = 0.1, duration: s2 = 1, easing: o3 = (t5) => t5, onStart: n3, onUpdate: r3 }) {
|
|
3527
|
+
this.from = this.value = t4, this.to = e3, this.lerp = i2, this.duration = s2, this.easing = o3, this.currentTime = 0, this.isRunning = true, n3?.(), this.onUpdate = r3;
|
|
3528
|
+
}
|
|
3529
|
+
};
|
|
3530
|
+
var Dimensions = class {
|
|
3531
|
+
constructor({ wrapper: t4, content: e3, autoResize: i2 = true, debounce: s2 = 250 } = {}) {
|
|
3532
|
+
__publicField(this, "resize", () => {
|
|
3533
|
+
this.onWrapperResize(), this.onContentResize();
|
|
3534
|
+
});
|
|
3535
|
+
__publicField(this, "onWrapperResize", () => {
|
|
3536
|
+
this.wrapper === window ? (this.width = window.innerWidth, this.height = window.innerHeight) : (this.width = this.wrapper.clientWidth, this.height = this.wrapper.clientHeight);
|
|
3537
|
+
});
|
|
3538
|
+
__publicField(this, "onContentResize", () => {
|
|
3539
|
+
this.wrapper === window ? (this.scrollHeight = this.content.scrollHeight, this.scrollWidth = this.content.scrollWidth) : (this.scrollHeight = this.wrapper.scrollHeight, this.scrollWidth = this.wrapper.scrollWidth);
|
|
3540
|
+
});
|
|
3541
|
+
this.wrapper = t4, this.content = e3, i2 && (this.debouncedResize = /* @__PURE__ */ function(t5, e4) {
|
|
3542
|
+
let i3;
|
|
3543
|
+
return function() {
|
|
3544
|
+
let s3 = arguments, o3 = this;
|
|
3545
|
+
clearTimeout(i3), i3 = setTimeout(function() {
|
|
3546
|
+
t5.apply(o3, s3);
|
|
3547
|
+
}, e4);
|
|
3548
|
+
};
|
|
3549
|
+
}(this.resize, s2), this.wrapper === window ? window.addEventListener("resize", this.debouncedResize, false) : (this.wrapperResizeObserver = new ResizeObserver(this.debouncedResize), this.wrapperResizeObserver.observe(this.wrapper)), this.contentResizeObserver = new ResizeObserver(this.debouncedResize), this.contentResizeObserver.observe(this.content)), this.resize();
|
|
3550
|
+
}
|
|
3551
|
+
destroy() {
|
|
3552
|
+
this.wrapperResizeObserver?.disconnect(), this.contentResizeObserver?.disconnect(), window.removeEventListener("resize", this.debouncedResize, false);
|
|
3553
|
+
}
|
|
3554
|
+
get limit() {
|
|
3555
|
+
return { x: this.scrollWidth - this.width, y: this.scrollHeight - this.height };
|
|
3556
|
+
}
|
|
3557
|
+
};
|
|
3558
|
+
var Emitter = class {
|
|
3559
|
+
constructor() {
|
|
3560
|
+
this.events = {};
|
|
3561
|
+
}
|
|
3562
|
+
emit(t4, ...e3) {
|
|
3563
|
+
let i2 = this.events[t4] || [];
|
|
3564
|
+
for (let t5 = 0, s2 = i2.length; t5 < s2; t5++) i2[t5](...e3);
|
|
3565
|
+
}
|
|
3566
|
+
on(t4, e3) {
|
|
3567
|
+
return this.events[t4]?.push(e3) || (this.events[t4] = [e3]), () => {
|
|
3568
|
+
this.events[t4] = this.events[t4]?.filter((t5) => e3 !== t5);
|
|
3569
|
+
};
|
|
3570
|
+
}
|
|
3571
|
+
off(t4, e3) {
|
|
3572
|
+
this.events[t4] = this.events[t4]?.filter((t5) => e3 !== t5);
|
|
3573
|
+
}
|
|
3574
|
+
destroy() {
|
|
3575
|
+
this.events = {};
|
|
3576
|
+
}
|
|
3577
|
+
};
|
|
3578
|
+
var e2 = 100 / 6;
|
|
3579
|
+
var VirtualScroll = class {
|
|
3580
|
+
constructor(t4, { wheelMultiplier: e3 = 1, touchMultiplier: i2 = 1 }) {
|
|
3581
|
+
__publicField(this, "onTouchStart", (t4) => {
|
|
3582
|
+
const { clientX: e3, clientY: i2 } = t4.targetTouches ? t4.targetTouches[0] : t4;
|
|
3583
|
+
this.touchStart.x = e3, this.touchStart.y = i2, this.lastDelta = { x: 0, y: 0 }, this.emitter.emit("scroll", { deltaX: 0, deltaY: 0, event: t4 });
|
|
3584
|
+
});
|
|
3585
|
+
__publicField(this, "onTouchMove", (t4) => {
|
|
3586
|
+
const { clientX: e3, clientY: i2 } = t4.targetTouches ? t4.targetTouches[0] : t4, s2 = -(e3 - this.touchStart.x) * this.touchMultiplier, o3 = -(i2 - this.touchStart.y) * this.touchMultiplier;
|
|
3587
|
+
this.touchStart.x = e3, this.touchStart.y = i2, this.lastDelta = { x: s2, y: o3 }, this.emitter.emit("scroll", { deltaX: s2, deltaY: o3, event: t4 });
|
|
3588
|
+
});
|
|
3589
|
+
__publicField(this, "onTouchEnd", (t4) => {
|
|
3590
|
+
this.emitter.emit("scroll", { deltaX: this.lastDelta.x, deltaY: this.lastDelta.y, event: t4 });
|
|
3591
|
+
});
|
|
3592
|
+
__publicField(this, "onWheel", (t4) => {
|
|
3593
|
+
let { deltaX: i2, deltaY: s2, deltaMode: o3 } = t4;
|
|
3594
|
+
i2 *= 1 === o3 ? e2 : 2 === o3 ? this.windowWidth : 1, s2 *= 1 === o3 ? e2 : 2 === o3 ? this.windowHeight : 1, i2 *= this.wheelMultiplier, s2 *= this.wheelMultiplier, this.emitter.emit("scroll", { deltaX: i2, deltaY: s2, event: t4 });
|
|
3595
|
+
});
|
|
3596
|
+
__publicField(this, "onWindowResize", () => {
|
|
3597
|
+
this.windowWidth = window.innerWidth, this.windowHeight = window.innerHeight;
|
|
3598
|
+
});
|
|
3599
|
+
this.element = t4, this.wheelMultiplier = e3, this.touchMultiplier = i2, this.touchStart = { x: null, y: null }, this.emitter = new Emitter(), window.addEventListener("resize", this.onWindowResize, false), this.onWindowResize(), this.element.addEventListener("wheel", this.onWheel, { passive: false }), this.element.addEventListener("touchstart", this.onTouchStart, { passive: false }), this.element.addEventListener("touchmove", this.onTouchMove, { passive: false }), this.element.addEventListener("touchend", this.onTouchEnd, { passive: false });
|
|
3600
|
+
}
|
|
3601
|
+
on(t4, e3) {
|
|
3602
|
+
return this.emitter.on(t4, e3);
|
|
3603
|
+
}
|
|
3604
|
+
destroy() {
|
|
3605
|
+
this.emitter.destroy(), window.removeEventListener("resize", this.onWindowResize, false), this.element.removeEventListener("wheel", this.onWheel, { passive: false }), this.element.removeEventListener("touchstart", this.onTouchStart, { passive: false }), this.element.removeEventListener("touchmove", this.onTouchMove, { passive: false }), this.element.removeEventListener("touchend", this.onTouchEnd, { passive: false });
|
|
3606
|
+
}
|
|
3607
|
+
};
|
|
3608
|
+
var Lenis = class {
|
|
3609
|
+
constructor({ wrapper: t4 = window, content: e3 = document.documentElement, wheelEventsTarget: i2 = t4, eventsTarget: s2 = i2, smoothWheel: o3 = true, syncTouch: n3 = false, syncTouchLerp: r3 = 0.075, touchInertiaMultiplier: l2 = 35, duration: h, easing: a3 = (t5) => Math.min(1, 1.001 - Math.pow(2, -10 * t5)), lerp: c2 = !h && 0.1, infinite: d2 = false, orientation: p2 = "vertical", gestureOrientation: u2 = "vertical", touchMultiplier: m2 = 1, wheelMultiplier: v = 1, autoResize: g2 = true, __experimental__naiveDimensions: S = false } = {}) {
|
|
3610
|
+
this.__isSmooth = false, this.__isScrolling = false, this.__isStopped = false, this.__isLocked = false, this.onVirtualScroll = ({ deltaX: t5, deltaY: e4, event: i3 }) => {
|
|
3611
|
+
if (i3.ctrlKey) return;
|
|
3612
|
+
const s3 = i3.type.includes("touch"), o4 = i3.type.includes("wheel");
|
|
3613
|
+
if (this.options.syncTouch && s3 && "touchstart" === i3.type && !this.isStopped && !this.isLocked) return void this.reset();
|
|
3614
|
+
const n4 = 0 === t5 && 0 === e4, r4 = "vertical" === this.options.gestureOrientation && 0 === e4 || "horizontal" === this.options.gestureOrientation && 0 === t5;
|
|
3615
|
+
if (n4 || r4) return;
|
|
3616
|
+
let l3 = i3.composedPath();
|
|
3617
|
+
if (l3 = l3.slice(0, l3.indexOf(this.rootElement)), l3.find((t6) => {
|
|
3618
|
+
var e5, i4, n5, r5, l4;
|
|
3619
|
+
return (null === (e5 = t6.hasAttribute) || void 0 === e5 ? void 0 : e5.call(t6, "data-lenis-prevent")) || s3 && (null === (i4 = t6.hasAttribute) || void 0 === i4 ? void 0 : i4.call(t6, "data-lenis-prevent-touch")) || o4 && (null === (n5 = t6.hasAttribute) || void 0 === n5 ? void 0 : n5.call(t6, "data-lenis-prevent-wheel")) || (null === (r5 = t6.classList) || void 0 === r5 ? void 0 : r5.contains("lenis")) && !(null === (l4 = t6.classList) || void 0 === l4 ? void 0 : l4.contains("lenis-stopped"));
|
|
3620
|
+
})) return;
|
|
3621
|
+
if (this.isStopped || this.isLocked) return void i3.preventDefault();
|
|
3622
|
+
if (this.isSmooth = this.options.syncTouch && s3 || this.options.smoothWheel && o4, !this.isSmooth) return this.isScrolling = false, void this.animate.stop();
|
|
3623
|
+
i3.preventDefault();
|
|
3624
|
+
let h2 = e4;
|
|
3625
|
+
"both" === this.options.gestureOrientation ? h2 = Math.abs(e4) > Math.abs(t5) ? e4 : t5 : "horizontal" === this.options.gestureOrientation && (h2 = t5);
|
|
3626
|
+
const a4 = s3 && this.options.syncTouch, c3 = s3 && "touchend" === i3.type && Math.abs(h2) > 5;
|
|
3627
|
+
c3 && (h2 = this.velocity * this.options.touchInertiaMultiplier), this.scrollTo(this.targetScroll + h2, Object.assign({ programmatic: false }, a4 ? { lerp: c3 ? this.options.syncTouchLerp : 1 } : { lerp: this.options.lerp, duration: this.options.duration, easing: this.options.easing }));
|
|
3628
|
+
}, this.onNativeScroll = () => {
|
|
3629
|
+
if (!this.__preventNextScrollEvent && !this.isScrolling) {
|
|
3630
|
+
const t5 = this.animatedScroll;
|
|
3631
|
+
this.animatedScroll = this.targetScroll = this.actualScroll, this.velocity = 0, this.direction = Math.sign(this.animatedScroll - t5), this.emit();
|
|
3632
|
+
}
|
|
3633
|
+
}, window.lenisVersion = "1.0.42", t4 !== document.documentElement && t4 !== document.body || (t4 = window), this.options = { wrapper: t4, content: e3, wheelEventsTarget: i2, eventsTarget: s2, smoothWheel: o3, syncTouch: n3, syncTouchLerp: r3, touchInertiaMultiplier: l2, duration: h, easing: a3, lerp: c2, infinite: d2, gestureOrientation: u2, orientation: p2, touchMultiplier: m2, wheelMultiplier: v, autoResize: g2, __experimental__naiveDimensions: S }, this.animate = new Animate(), this.emitter = new Emitter(), this.dimensions = new Dimensions({ wrapper: t4, content: e3, autoResize: g2 }), this.toggleClassName("lenis", true), this.velocity = 0, this.isLocked = false, this.isStopped = false, this.isSmooth = n3 || o3, this.isScrolling = false, this.targetScroll = this.animatedScroll = this.actualScroll, this.options.wrapper.addEventListener("scroll", this.onNativeScroll, false), this.virtualScroll = new VirtualScroll(s2, { touchMultiplier: m2, wheelMultiplier: v }), this.virtualScroll.on("scroll", this.onVirtualScroll);
|
|
3634
|
+
}
|
|
3635
|
+
destroy() {
|
|
3636
|
+
this.emitter.destroy(), this.options.wrapper.removeEventListener("scroll", this.onNativeScroll, false), this.virtualScroll.destroy(), this.dimensions.destroy(), this.toggleClassName("lenis", false), this.toggleClassName("lenis-smooth", false), this.toggleClassName("lenis-scrolling", false), this.toggleClassName("lenis-stopped", false), this.toggleClassName("lenis-locked", false);
|
|
3637
|
+
}
|
|
3638
|
+
on(t4, e3) {
|
|
3639
|
+
return this.emitter.on(t4, e3);
|
|
3640
|
+
}
|
|
3641
|
+
off(t4, e3) {
|
|
3642
|
+
return this.emitter.off(t4, e3);
|
|
3643
|
+
}
|
|
3644
|
+
setScroll(t4) {
|
|
3645
|
+
this.isHorizontal ? this.rootElement.scrollLeft = t4 : this.rootElement.scrollTop = t4;
|
|
3646
|
+
}
|
|
3647
|
+
resize() {
|
|
3648
|
+
this.dimensions.resize();
|
|
3649
|
+
}
|
|
3650
|
+
emit() {
|
|
3651
|
+
this.emitter.emit("scroll", this);
|
|
3652
|
+
}
|
|
3653
|
+
reset() {
|
|
3654
|
+
this.isLocked = false, this.isScrolling = false, this.animatedScroll = this.targetScroll = this.actualScroll, this.velocity = 0, this.animate.stop();
|
|
3655
|
+
}
|
|
3656
|
+
start() {
|
|
3657
|
+
this.isStopped && (this.isStopped = false, this.reset());
|
|
3658
|
+
}
|
|
3659
|
+
stop() {
|
|
3660
|
+
this.isStopped || (this.isStopped = true, this.animate.stop(), this.reset());
|
|
3661
|
+
}
|
|
3662
|
+
raf(t4) {
|
|
3663
|
+
const e3 = t4 - (this.time || t4);
|
|
3664
|
+
this.time = t4, this.animate.advance(1e-3 * e3);
|
|
3665
|
+
}
|
|
3666
|
+
scrollTo(e3, { offset: i2 = 0, immediate: s2 = false, lock: o3 = false, duration: n3 = this.options.duration, easing: r3 = this.options.easing, lerp: l2 = !n3 && this.options.lerp, onComplete: h, force: a3 = false, programmatic: c2 = true } = {}) {
|
|
3667
|
+
if (!this.isStopped && !this.isLocked || a3) {
|
|
3668
|
+
if (["top", "left", "start"].includes(e3)) e3 = 0;
|
|
3669
|
+
else if (["bottom", "right", "end"].includes(e3)) e3 = this.limit;
|
|
3670
|
+
else {
|
|
3671
|
+
let t4;
|
|
3672
|
+
if ("string" == typeof e3 ? t4 = document.querySelector(e3) : (null == e3 ? void 0 : e3.nodeType) && (t4 = e3), t4) {
|
|
3673
|
+
if (this.options.wrapper !== window) {
|
|
3674
|
+
const t5 = this.options.wrapper.getBoundingClientRect();
|
|
3675
|
+
i2 -= this.isHorizontal ? t5.left : t5.top;
|
|
3676
|
+
}
|
|
3677
|
+
const s3 = t4.getBoundingClientRect();
|
|
3678
|
+
e3 = (this.isHorizontal ? s3.left : s3.top) + this.animatedScroll;
|
|
3679
|
+
}
|
|
3680
|
+
}
|
|
3681
|
+
if ("number" == typeof e3) {
|
|
3682
|
+
if (e3 += i2, e3 = Math.round(e3), this.options.infinite ? c2 && (this.targetScroll = this.animatedScroll = this.scroll) : e3 = t3(0, e3, this.limit), s2) return this.animatedScroll = this.targetScroll = e3, this.setScroll(this.scroll), this.reset(), void (null == h || h(this));
|
|
3683
|
+
if (!c2) {
|
|
3684
|
+
if (e3 === this.targetScroll) return;
|
|
3685
|
+
this.targetScroll = e3;
|
|
3686
|
+
}
|
|
3687
|
+
this.animate.fromTo(this.animatedScroll, e3, { duration: n3, easing: r3, lerp: l2, onStart: () => {
|
|
3688
|
+
o3 && (this.isLocked = true), this.isScrolling = true;
|
|
3689
|
+
}, onUpdate: (t4, e4) => {
|
|
3690
|
+
this.isScrolling = true, this.velocity = t4 - this.animatedScroll, this.direction = Math.sign(this.velocity), this.animatedScroll = t4, this.setScroll(this.scroll), c2 && (this.targetScroll = t4), e4 || this.emit(), e4 && (this.reset(), this.emit(), null == h || h(this), this.__preventNextScrollEvent = true, requestAnimationFrame(() => {
|
|
3691
|
+
delete this.__preventNextScrollEvent;
|
|
3692
|
+
}));
|
|
3693
|
+
} });
|
|
3694
|
+
}
|
|
3695
|
+
}
|
|
3696
|
+
}
|
|
3697
|
+
get rootElement() {
|
|
3698
|
+
return this.options.wrapper === window ? document.documentElement : this.options.wrapper;
|
|
3699
|
+
}
|
|
3700
|
+
get limit() {
|
|
3701
|
+
return this.options.__experimental__naiveDimensions ? this.isHorizontal ? this.rootElement.scrollWidth - this.rootElement.clientWidth : this.rootElement.scrollHeight - this.rootElement.clientHeight : this.dimensions.limit[this.isHorizontal ? "x" : "y"];
|
|
3702
|
+
}
|
|
3703
|
+
get isHorizontal() {
|
|
3704
|
+
return "horizontal" === this.options.orientation;
|
|
3705
|
+
}
|
|
3706
|
+
get actualScroll() {
|
|
3707
|
+
return this.isHorizontal ? this.rootElement.scrollLeft : this.rootElement.scrollTop;
|
|
3708
|
+
}
|
|
3709
|
+
get scroll() {
|
|
3710
|
+
return this.options.infinite ? (t4 = this.animatedScroll, e3 = this.limit, (t4 % e3 + e3) % e3) : this.animatedScroll;
|
|
3711
|
+
var t4, e3;
|
|
3712
|
+
}
|
|
3713
|
+
get progress() {
|
|
3714
|
+
return 0 === this.limit ? 1 : this.scroll / this.limit;
|
|
3715
|
+
}
|
|
3716
|
+
get isSmooth() {
|
|
3717
|
+
return this.__isSmooth;
|
|
3718
|
+
}
|
|
3719
|
+
set isSmooth(t4) {
|
|
3720
|
+
this.__isSmooth !== t4 && (this.__isSmooth = t4, this.toggleClassName("lenis-smooth", t4));
|
|
3721
|
+
}
|
|
3722
|
+
get isScrolling() {
|
|
3723
|
+
return this.__isScrolling;
|
|
3724
|
+
}
|
|
3725
|
+
set isScrolling(t4) {
|
|
3726
|
+
this.__isScrolling !== t4 && (this.__isScrolling = t4, this.toggleClassName("lenis-scrolling", t4));
|
|
3727
|
+
}
|
|
3728
|
+
get isStopped() {
|
|
3729
|
+
return this.__isStopped;
|
|
3730
|
+
}
|
|
3731
|
+
set isStopped(t4) {
|
|
3732
|
+
this.__isStopped !== t4 && (this.__isStopped = t4, this.toggleClassName("lenis-stopped", t4));
|
|
3733
|
+
}
|
|
3734
|
+
get isLocked() {
|
|
3735
|
+
return this.__isLocked;
|
|
3736
|
+
}
|
|
3737
|
+
set isLocked(t4) {
|
|
3738
|
+
this.__isLocked !== t4 && (this.__isLocked = t4, this.toggleClassName("lenis-locked", t4));
|
|
3739
|
+
}
|
|
3740
|
+
get className() {
|
|
3741
|
+
let t4 = "lenis";
|
|
3742
|
+
return this.isStopped && (t4 += " lenis-stopped"), this.isLocked && (t4 += " lenis-locked"), this.isScrolling && (t4 += " lenis-scrolling"), this.isSmooth && (t4 += " lenis-smooth"), t4;
|
|
3743
|
+
}
|
|
3744
|
+
toggleClassName(t4, e3) {
|
|
3745
|
+
this.rootElement.classList.toggle(t4, e3), this.emitter.emit("className change", this);
|
|
3746
|
+
}
|
|
3747
|
+
};
|
|
3748
|
+
|
|
3749
|
+
// ../node_modules/@studio-freight/react-lenis/dist/react-lenis.mjs
|
|
3750
|
+
import n2, { createContext as o2, useEffect as l, forwardRef as a2, useRef as c, useState as s, useCallback as i, useImperativeHandle as u, useContext as f2 } from "react";
|
|
3751
|
+
|
|
3752
|
+
// ../node_modules/zustand/esm/vanilla.mjs
|
|
3753
|
+
var createStoreImpl = (createState) => {
|
|
3754
|
+
let state;
|
|
3755
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
3756
|
+
const setState = (partial, replace) => {
|
|
3757
|
+
const nextState = typeof partial === "function" ? partial(state) : partial;
|
|
3758
|
+
if (!Object.is(nextState, state)) {
|
|
3759
|
+
const previousState = state;
|
|
3760
|
+
state = (replace != null ? replace : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState);
|
|
3761
|
+
listeners.forEach((listener) => listener(state, previousState));
|
|
3762
|
+
}
|
|
3763
|
+
};
|
|
3764
|
+
const getState = () => state;
|
|
3765
|
+
const getInitialState = () => initialState;
|
|
3766
|
+
const subscribe = (listener) => {
|
|
3767
|
+
listeners.add(listener);
|
|
3768
|
+
return () => listeners.delete(listener);
|
|
3769
|
+
};
|
|
3770
|
+
const destroy = () => {
|
|
3771
|
+
if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production") {
|
|
3772
|
+
console.warn(
|
|
3773
|
+
"[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."
|
|
3774
|
+
);
|
|
3775
|
+
}
|
|
3776
|
+
listeners.clear();
|
|
3777
|
+
};
|
|
3778
|
+
const api = { setState, getState, getInitialState, subscribe, destroy };
|
|
3779
|
+
const initialState = state = createState(setState, getState, api);
|
|
3780
|
+
return api;
|
|
3781
|
+
};
|
|
3782
|
+
var createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
|
|
3783
|
+
|
|
3784
|
+
// ../node_modules/zustand/esm/index.mjs
|
|
3785
|
+
var import_with_selector = __toESM(require_with_selector(), 1);
|
|
3786
|
+
import ReactExports from "react";
|
|
3787
|
+
var { useDebugValue } = ReactExports;
|
|
3788
|
+
var { useSyncExternalStoreWithSelector } = import_with_selector.default;
|
|
3789
|
+
var didWarnAboutEqualityFn = false;
|
|
3790
|
+
var identity = (arg) => arg;
|
|
3791
|
+
function useStore(api, selector = identity, equalityFn) {
|
|
3792
|
+
if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production" && equalityFn && !didWarnAboutEqualityFn) {
|
|
3793
|
+
console.warn(
|
|
3794
|
+
"[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"
|
|
3795
|
+
);
|
|
3796
|
+
didWarnAboutEqualityFn = true;
|
|
3797
|
+
}
|
|
3798
|
+
const slice = useSyncExternalStoreWithSelector(
|
|
3799
|
+
api.subscribe,
|
|
3800
|
+
api.getState,
|
|
3801
|
+
api.getServerState || api.getInitialState,
|
|
3802
|
+
selector,
|
|
3803
|
+
equalityFn
|
|
3804
|
+
);
|
|
3805
|
+
useDebugValue(slice);
|
|
3806
|
+
return slice;
|
|
3807
|
+
}
|
|
3808
|
+
var createImpl = (createState) => {
|
|
3809
|
+
if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production" && typeof createState !== "function") {
|
|
3810
|
+
console.warn(
|
|
3811
|
+
"[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`."
|
|
3812
|
+
);
|
|
3813
|
+
}
|
|
3814
|
+
const api = typeof createState === "function" ? createStore(createState) : createState;
|
|
3815
|
+
const useBoundStore = (selector, equalityFn) => useStore(api, selector, equalityFn);
|
|
3816
|
+
Object.assign(useBoundStore, api);
|
|
3817
|
+
return useBoundStore;
|
|
3818
|
+
};
|
|
3819
|
+
var create = (createState) => createState ? createImpl(createState) : createImpl;
|
|
3820
|
+
|
|
3821
|
+
// ../node_modules/@studio-freight/react-lenis/dist/react-lenis.mjs
|
|
3822
|
+
"undefined" != typeof window && (window.reactLenisVersion = "0.0.47");
|
|
3823
|
+
var d = o2(null);
|
|
3824
|
+
var m = create(() => ({}));
|
|
3825
|
+
var y2 = a2((o3, a3) => {
|
|
3826
|
+
var { children: f3, root: p2 = false, options: b3 = {}, autoRaf: y3 = true, rafPriority: v = 0, className: O2 } = o3, g2 = function(r3, e3) {
|
|
3827
|
+
var t4 = {};
|
|
3828
|
+
for (var n3 in r3) Object.prototype.hasOwnProperty.call(r3, n3) && e3.indexOf(n3) < 0 && (t4[n3] = r3[n3]);
|
|
3829
|
+
if (null != r3 && "function" == typeof Object.getOwnPropertySymbols) {
|
|
3830
|
+
var o4 = 0;
|
|
3831
|
+
for (n3 = Object.getOwnPropertySymbols(r3); o4 < n3.length; o4++) e3.indexOf(n3[o4]) < 0 && Object.prototype.propertyIsEnumerable.call(r3, n3[o4]) && (t4[n3[o4]] = r3[n3[o4]]);
|
|
3832
|
+
}
|
|
3833
|
+
return t4;
|
|
3834
|
+
}(o3, ["children", "root", "options", "autoRaf", "rafPriority", "className"]);
|
|
3835
|
+
const h = c(null), w = c(null), [k2, N2] = s(void 0), j = c([]), C = i((r3, e3) => {
|
|
3836
|
+
j.current.push({ callback: r3, priority: e3 }), j.current.sort((r4, e4) => r4.priority - e4.priority);
|
|
3837
|
+
}, []), E3 = i((r3) => {
|
|
3838
|
+
j.current = j.current.filter((e3) => e3.callback !== r3);
|
|
3839
|
+
}, []);
|
|
3840
|
+
u(a3, () => ({ wrapper: h.current, content: w.current, lenis: k2 }), [k2]), l(() => {
|
|
3841
|
+
const r3 = new Lenis(Object.assign(Object.assign({}, b3), !p2 && { wrapper: h.current, content: w.current }));
|
|
3842
|
+
return N2(r3), () => {
|
|
3843
|
+
r3.destroy(), N2(void 0);
|
|
3844
|
+
};
|
|
3845
|
+
}, [p2, JSON.stringify(b3)]), f((r3) => {
|
|
3846
|
+
y3 && (null == k2 || k2.raf(r3));
|
|
3847
|
+
}, v), l(() => {
|
|
3848
|
+
p2 && k2 && m.setState({ lenis: k2, addCallback: C, removeCallback: E3 });
|
|
3849
|
+
}, [p2, k2, C, E3]);
|
|
3850
|
+
const P2 = i((r3) => {
|
|
3851
|
+
for (let e3 = 0; e3 < j.current.length; e3++) j.current[e3].callback(r3);
|
|
3852
|
+
}, []);
|
|
3853
|
+
l(() => (null == k2 || k2.on("scroll", P2), () => {
|
|
3854
|
+
null == k2 || k2.off("scroll", P2);
|
|
3855
|
+
}), [k2, P2]);
|
|
3856
|
+
const S = i(() => {
|
|
3857
|
+
h.current && (h.current.className = clsx_default(null == k2 ? void 0 : k2.className, O2));
|
|
3858
|
+
}, [k2, O2]);
|
|
3859
|
+
return l(() => (S(), null == k2 || k2.on("className change", S), () => {
|
|
3860
|
+
null == k2 || k2.off("className change", S);
|
|
3861
|
+
}), [k2, S]), n2.createElement(d.Provider, { value: { lenis: k2, addCallback: C, removeCallback: E3 } }, p2 ? f3 : n2.createElement("div", Object.assign({ ref: h, className: clsx_default(null == k2 ? void 0 : k2.className, O2) }, g2), n2.createElement("div", { ref: w }, f3)));
|
|
3862
|
+
});
|
|
3863
|
+
|
|
3864
|
+
// src/providers/smooth-scroll-provider.tsx
|
|
3865
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
3866
|
+
function SmoothScrollProvider({ children }) {
|
|
3867
|
+
return /* @__PURE__ */ jsx8(y2, { root: true, options: { lerp: 0.1, duration: 1.5, syncTouch: true }, children: /* @__PURE__ */ jsx8("div", { className: "smooth-scroll", children }) });
|
|
3868
|
+
}
|
|
3869
|
+
|
|
3870
|
+
// src/theme/providers/theme-provider.tsx
|
|
3871
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
3872
|
+
function ThemeProvider({ children, ...props }) {
|
|
3873
|
+
return /* @__PURE__ */ jsx9(J, { ...props, children });
|
|
3874
|
+
}
|
|
3875
|
+
var theme_provider_default = ThemeProvider;
|
|
277
3876
|
export {
|
|
3877
|
+
BasicLayout,
|
|
278
3878
|
Button_default as Button,
|
|
279
3879
|
CardTitle,
|
|
280
3880
|
Footer_default as Footer,
|
|
281
3881
|
Header_default as Header,
|
|
282
3882
|
PageTitle,
|
|
283
3883
|
SectionTitle,
|
|
3884
|
+
SmoothScrollProvider,
|
|
284
3885
|
SubTitle,
|
|
3886
|
+
theme_provider_default as ThemeProvider,
|
|
3887
|
+
theme_toggle_default as ThemeToggle,
|
|
3888
|
+
cn,
|
|
285
3889
|
useForceRerender_default as useForceRerender
|
|
286
3890
|
};
|
|
3891
|
+
/*! Bundled license information:
|
|
3892
|
+
|
|
3893
|
+
use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
|
|
3894
|
+
(**
|
|
3895
|
+
* @license React
|
|
3896
|
+
* use-sync-external-store-shim.production.js
|
|
3897
|
+
*
|
|
3898
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3899
|
+
*
|
|
3900
|
+
* This source code is licensed under the MIT license found in the
|
|
3901
|
+
* LICENSE file in the root directory of this source tree.
|
|
3902
|
+
*)
|
|
3903
|
+
|
|
3904
|
+
use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
|
|
3905
|
+
(**
|
|
3906
|
+
* @license React
|
|
3907
|
+
* use-sync-external-store-shim.development.js
|
|
3908
|
+
*
|
|
3909
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3910
|
+
*
|
|
3911
|
+
* This source code is licensed under the MIT license found in the
|
|
3912
|
+
* LICENSE file in the root directory of this source tree.
|
|
3913
|
+
*)
|
|
3914
|
+
|
|
3915
|
+
use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
|
|
3916
|
+
(**
|
|
3917
|
+
* @license React
|
|
3918
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
3919
|
+
*
|
|
3920
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3921
|
+
*
|
|
3922
|
+
* This source code is licensed under the MIT license found in the
|
|
3923
|
+
* LICENSE file in the root directory of this source tree.
|
|
3924
|
+
*)
|
|
3925
|
+
|
|
3926
|
+
use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
|
|
3927
|
+
(**
|
|
3928
|
+
* @license React
|
|
3929
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
3930
|
+
*
|
|
3931
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3932
|
+
*
|
|
3933
|
+
* This source code is licensed under the MIT license found in the
|
|
3934
|
+
* LICENSE file in the root directory of this source tree.
|
|
3935
|
+
*)
|
|
3936
|
+
*/
|
|
287
3937
|
//# sourceMappingURL=index.mjs.map
|