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