jean-react-utils 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +157 -19
- package/dist/index.d.mts +187 -14
- package/dist/index.d.ts +187 -14
- package/dist/index.js +3735 -108
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3762 -113
- package/dist/index.mjs.map +1 -1
- package/package.json +23 -20
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,2872 @@ 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
|
-
Footer: () =>
|
|
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
|
+
}
|
|
58
554
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
+
};
|
|
63
599
|
};
|
|
64
|
-
|
|
65
|
-
|
|
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;
|
|
66
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));
|
|
734
|
+
};
|
|
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
|
+
}
|
|
2848
|
+
};
|
|
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
|
+
console.log(">>>>> button props >>> ", props);
|
|
2888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2889
|
+
"button",
|
|
2890
|
+
{
|
|
2891
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
2892
|
+
ref,
|
|
2893
|
+
...props
|
|
2894
|
+
}
|
|
2895
|
+
);
|
|
2896
|
+
}
|
|
2897
|
+
);
|
|
2898
|
+
Button.displayName = "Button";
|
|
67
2899
|
var Button_default = Button;
|
|
68
2900
|
|
|
69
2901
|
// src/components/Heading/index.tsx
|
|
@@ -112,7 +2944,7 @@ function SubTitle({ children, title, className = "" }) {
|
|
|
112
2944
|
initial: { opacity: 0 },
|
|
113
2945
|
animate: { opacity: 1 },
|
|
114
2946
|
transition: { duration: 0.5 },
|
|
115
|
-
className: `text-lg font-semibold
|
|
2947
|
+
className: `text-lg font-semibold ${className}`,
|
|
116
2948
|
children: title || children
|
|
117
2949
|
}
|
|
118
2950
|
);
|
|
@@ -125,33 +2957,155 @@ var import_framer_motion2 = require("framer-motion");
|
|
|
125
2957
|
|
|
126
2958
|
// src/layout/Header/BreadIcon.tsx
|
|
127
2959
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
2960
|
+
var commonCls = "w-full h-0.5 bg-primary duration-300";
|
|
2961
|
+
var spanDefaultCls = `${commonCls} transition-transform`;
|
|
2962
|
+
var spanOpacityCls = `${commonCls} transition-opacity`;
|
|
128
2963
|
function BreadIcon({ isMenuOpen }) {
|
|
129
2964
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "w-6 h-5 relative flex flex-col justify-between", children: [
|
|
130
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className:
|
|
131
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className:
|
|
132
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className:
|
|
2965
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: `${spanDefaultCls} ${isMenuOpen ? "rotate-45 translate-y-2" : ""}` }),
|
|
2966
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: `${spanOpacityCls} ${isMenuOpen ? "opacity-0" : ""}` }),
|
|
2967
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: `${spanDefaultCls} ${isMenuOpen ? "-rotate-45 -translate-y-2" : ""}` })
|
|
133
2968
|
] });
|
|
134
2969
|
}
|
|
135
2970
|
|
|
136
2971
|
// src/layout/Header/index.tsx
|
|
137
2972
|
var import_navigation = require("next/navigation");
|
|
2973
|
+
|
|
2974
|
+
// ../node_modules/next-themes/dist/index.mjs
|
|
2975
|
+
var t = __toESM(require("react"), 1);
|
|
2976
|
+
var M = (e3, i2, s2, u2, m2, a3, l2, h) => {
|
|
2977
|
+
let d2 = document.documentElement, w = ["light", "dark"];
|
|
2978
|
+
function p2(n3) {
|
|
2979
|
+
(Array.isArray(e3) ? e3 : [e3]).forEach((y3) => {
|
|
2980
|
+
let k2 = y3 === "class", S = k2 && a3 ? m2.map((f3) => a3[f3] || f3) : m2;
|
|
2981
|
+
k2 ? (d2.classList.remove(...S), d2.classList.add(a3 && a3[n3] ? a3[n3] : n3)) : d2.setAttribute(y3, n3);
|
|
2982
|
+
}), R(n3);
|
|
2983
|
+
}
|
|
2984
|
+
function R(n3) {
|
|
2985
|
+
h && w.includes(n3) && (d2.style.colorScheme = n3);
|
|
2986
|
+
}
|
|
2987
|
+
function c2() {
|
|
2988
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
2989
|
+
}
|
|
2990
|
+
if (u2) p2(u2);
|
|
2991
|
+
else try {
|
|
2992
|
+
let n3 = localStorage.getItem(i2) || s2, y3 = l2 && n3 === "system" ? c2() : n3;
|
|
2993
|
+
p2(y3);
|
|
2994
|
+
} catch (n3) {
|
|
2995
|
+
}
|
|
2996
|
+
};
|
|
2997
|
+
var b = ["light", "dark"];
|
|
2998
|
+
var I = "(prefers-color-scheme: dark)";
|
|
2999
|
+
var O = typeof window == "undefined";
|
|
3000
|
+
var x = t.createContext(void 0);
|
|
3001
|
+
var U = { setTheme: (e3) => {
|
|
3002
|
+
}, themes: [] };
|
|
3003
|
+
var z = () => {
|
|
3004
|
+
var e3;
|
|
3005
|
+
return (e3 = t.useContext(x)) != null ? e3 : U;
|
|
3006
|
+
};
|
|
3007
|
+
var J = (e3) => t.useContext(x) ? t.createElement(t.Fragment, null, e3.children) : t.createElement(V, { ...e3 });
|
|
3008
|
+
var N = ["light", "dark"];
|
|
3009
|
+
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 }) => {
|
|
3010
|
+
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) => {
|
|
3011
|
+
let r3 = o3;
|
|
3012
|
+
if (!r3) return;
|
|
3013
|
+
o3 === "system" && s2 && (r3 = E());
|
|
3014
|
+
let v = d2 ? d2[r3] : r3, C = i2 ? W(p2) : null, P2 = document.documentElement, L2 = (g2) => {
|
|
3015
|
+
g2 === "class" ? (P2.classList.remove(...k2), v && P2.classList.add(v)) : g2.startsWith("data-") && (v ? P2.setAttribute(g2, v) : P2.removeAttribute(g2));
|
|
3016
|
+
};
|
|
3017
|
+
if (Array.isArray(h) ? h.forEach(L2) : L2(h), u2) {
|
|
3018
|
+
let g2 = b.includes(l2) ? l2 : null, D = b.includes(r3) ? r3 : g2;
|
|
3019
|
+
P2.style.colorScheme = D;
|
|
3020
|
+
}
|
|
3021
|
+
C == null || C();
|
|
3022
|
+
}, [p2]), f3 = t.useCallback((o3) => {
|
|
3023
|
+
let r3 = typeof o3 == "function" ? o3(c2) : o3;
|
|
3024
|
+
n3(r3);
|
|
3025
|
+
try {
|
|
3026
|
+
localStorage.setItem(m2, r3);
|
|
3027
|
+
} catch (v) {
|
|
3028
|
+
}
|
|
3029
|
+
}, [c2]), A = t.useCallback((o3) => {
|
|
3030
|
+
let r3 = E(o3);
|
|
3031
|
+
y3(r3), c2 === "system" && s2 && !e3 && S("system");
|
|
3032
|
+
}, [c2, e3]);
|
|
3033
|
+
t.useEffect(() => {
|
|
3034
|
+
let o3 = window.matchMedia(I);
|
|
3035
|
+
return o3.addListener(A), A(o3), () => o3.removeListener(A);
|
|
3036
|
+
}, [A]), t.useEffect(() => {
|
|
3037
|
+
let o3 = (r3) => {
|
|
3038
|
+
r3.key === m2 && (r3.newValue ? n3(r3.newValue) : f3(l2));
|
|
3039
|
+
};
|
|
3040
|
+
return window.addEventListener("storage", o3), () => window.removeEventListener("storage", o3);
|
|
3041
|
+
}, [f3]), t.useEffect(() => {
|
|
3042
|
+
S(e3 != null ? e3 : c2);
|
|
3043
|
+
}, [e3, c2]);
|
|
3044
|
+
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]);
|
|
3045
|
+
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);
|
|
3046
|
+
};
|
|
3047
|
+
var _ = t.memo(({ forcedTheme: e3, storageKey: i2, attribute: s2, enableSystem: u2, enableColorScheme: m2, defaultTheme: a3, value: l2, themes: h, nonce: d2, scriptProps: w }) => {
|
|
3048
|
+
let p2 = JSON.stringify([s2, i2, a3, e3, h, l2, u2, m2]).slice(1, -1);
|
|
3049
|
+
return t.createElement("script", { ...w, suppressHydrationWarning: true, nonce: typeof window == "undefined" ? d2 : "", dangerouslySetInnerHTML: { __html: `(${M.toString()})(${p2})` } });
|
|
3050
|
+
});
|
|
3051
|
+
var H = (e3, i2) => {
|
|
3052
|
+
if (O) return;
|
|
3053
|
+
let s2;
|
|
3054
|
+
try {
|
|
3055
|
+
s2 = localStorage.getItem(e3) || void 0;
|
|
3056
|
+
} catch (u2) {
|
|
3057
|
+
}
|
|
3058
|
+
return s2 || i2;
|
|
3059
|
+
};
|
|
3060
|
+
var W = (e3) => {
|
|
3061
|
+
let i2 = document.createElement("style");
|
|
3062
|
+
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), () => {
|
|
3063
|
+
window.getComputedStyle(document.body), setTimeout(() => {
|
|
3064
|
+
document.head.removeChild(i2);
|
|
3065
|
+
}, 1);
|
|
3066
|
+
};
|
|
3067
|
+
};
|
|
3068
|
+
var E = (e3) => (e3 || (e3 = window.matchMedia(I)), e3.matches ? "dark" : "light");
|
|
3069
|
+
|
|
3070
|
+
// src/theme/providers/theme-toggle.tsx
|
|
3071
|
+
var import_lucide_react = require("lucide-react");
|
|
138
3072
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
139
|
-
|
|
3073
|
+
function ThemeToggle() {
|
|
3074
|
+
const { theme, setTheme } = z();
|
|
3075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
3076
|
+
Button,
|
|
3077
|
+
{
|
|
3078
|
+
variant: "borderNone",
|
|
3079
|
+
size: "icon",
|
|
3080
|
+
onClick: () => setTheme(theme === "light" ? "dark" : "light"),
|
|
3081
|
+
children: [
|
|
3082
|
+
/* @__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" }),
|
|
3083
|
+
/* @__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" }),
|
|
3084
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "sr-only", children: "Toggle theme" })
|
|
3085
|
+
]
|
|
3086
|
+
}
|
|
3087
|
+
);
|
|
3088
|
+
}
|
|
3089
|
+
var theme_toggle_default = ThemeToggle;
|
|
3090
|
+
|
|
3091
|
+
// src/layout/Header/index.tsx
|
|
3092
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
3093
|
+
var getActivedCls = (href, selectedKey, activeClassName = "text-primary") => {
|
|
140
3094
|
if (href.includes(selectedKey) || href === "/" && selectedKey === "home") {
|
|
141
|
-
return
|
|
3095
|
+
return activeClassName;
|
|
142
3096
|
}
|
|
143
|
-
return "
|
|
3097
|
+
return "";
|
|
144
3098
|
};
|
|
145
3099
|
var Header = ({
|
|
146
3100
|
logo,
|
|
147
3101
|
menuItems,
|
|
148
3102
|
className = "",
|
|
149
|
-
enableAnimation = true
|
|
3103
|
+
enableAnimation = true,
|
|
3104
|
+
theme = {}
|
|
150
3105
|
}) => {
|
|
151
3106
|
const [isMenuOpen, setIsMenuOpen] = (0, import_react.useState)(false);
|
|
152
3107
|
const selectedKey = (0, import_navigation.usePathname)().split("/")[2] || "home";
|
|
153
|
-
|
|
154
|
-
const baseNavClassName = `fixed top-0 left-0 right-0 z-50 bg-white/80 backdrop-blur-lg border-b border-purple-100 ${className}`;
|
|
3108
|
+
const baseNavClassName = `fixed top-0 left-0 right-0 z-50 backdrop-blur-lg ${className}`;
|
|
155
3109
|
const navVariants = {
|
|
156
3110
|
hidden: { y: -20, opacity: 0 },
|
|
157
3111
|
visible: {
|
|
@@ -163,6 +3117,82 @@ var Header = ({
|
|
|
163
3117
|
}
|
|
164
3118
|
}
|
|
165
3119
|
};
|
|
3120
|
+
const HeaderWrapper = enableAnimation ? import_framer_motion2.motion.header : "header";
|
|
3121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
3122
|
+
HeaderWrapper,
|
|
3123
|
+
{
|
|
3124
|
+
className: baseNavClassName,
|
|
3125
|
+
...enableAnimation && {
|
|
3126
|
+
initial: "hidden",
|
|
3127
|
+
animate: "visible",
|
|
3128
|
+
variants: navVariants
|
|
3129
|
+
},
|
|
3130
|
+
children: [
|
|
3131
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "container flex items-center justify-between p-4", children: [
|
|
3132
|
+
logo,
|
|
3133
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
3134
|
+
DesktopNav,
|
|
3135
|
+
{
|
|
3136
|
+
menuItems,
|
|
3137
|
+
selectedKey,
|
|
3138
|
+
enableAnimation,
|
|
3139
|
+
activeClassName: theme.activeClassName
|
|
3140
|
+
}
|
|
3141
|
+
),
|
|
3142
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
3143
|
+
MobileMenuBtn,
|
|
3144
|
+
{
|
|
3145
|
+
menuItems,
|
|
3146
|
+
selectedKey,
|
|
3147
|
+
setIsMenuOpen,
|
|
3148
|
+
isMenuOpen,
|
|
3149
|
+
className: theme.mobileMenu?.button
|
|
3150
|
+
}
|
|
3151
|
+
)
|
|
3152
|
+
] }),
|
|
3153
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_framer_motion2.AnimatePresence, { children: isMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
3154
|
+
MobileNav,
|
|
3155
|
+
{
|
|
3156
|
+
menuItems,
|
|
3157
|
+
selectedKey,
|
|
3158
|
+
enableAnimation,
|
|
3159
|
+
className: theme.mobileMenu?.nav,
|
|
3160
|
+
activeClassName: theme.activeClassName
|
|
3161
|
+
}
|
|
3162
|
+
) })
|
|
3163
|
+
]
|
|
3164
|
+
}
|
|
3165
|
+
);
|
|
3166
|
+
};
|
|
3167
|
+
var DesktopNav = ({
|
|
3168
|
+
menuItems,
|
|
3169
|
+
selectedKey,
|
|
3170
|
+
enableAnimation,
|
|
3171
|
+
activeClassName
|
|
3172
|
+
}) => {
|
|
3173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("nav", { className: "hidden md:flex items-center space-x-8", children: [
|
|
3174
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ThemeToggle, {}),
|
|
3175
|
+
menuItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
3176
|
+
NavLink,
|
|
3177
|
+
{
|
|
3178
|
+
href: item.href,
|
|
3179
|
+
selectedKey,
|
|
3180
|
+
className: item.className?.pc,
|
|
3181
|
+
activeClassName,
|
|
3182
|
+
children: item.label
|
|
3183
|
+
},
|
|
3184
|
+
item.key
|
|
3185
|
+
))
|
|
3186
|
+
] });
|
|
3187
|
+
};
|
|
3188
|
+
var MobileNav = ({
|
|
3189
|
+
menuItems,
|
|
3190
|
+
selectedKey,
|
|
3191
|
+
enableAnimation,
|
|
3192
|
+
className,
|
|
3193
|
+
activeClassName
|
|
3194
|
+
}) => {
|
|
3195
|
+
const MobileMenuComponent = enableAnimation ? import_framer_motion2.motion.div : "div";
|
|
166
3196
|
const mobileMenuVariants = {
|
|
167
3197
|
hidden: {
|
|
168
3198
|
height: 0,
|
|
@@ -181,98 +3211,92 @@ var Header = ({
|
|
|
181
3211
|
}
|
|
182
3212
|
}
|
|
183
3213
|
};
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
console.log("menuItems>>>", menuItems);
|
|
187
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
188
|
-
NavComponent,
|
|
3214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
3215
|
+
MobileMenuComponent,
|
|
189
3216
|
{
|
|
190
|
-
className:
|
|
3217
|
+
className: `md:hidden overflow-hidden ${className || ""}`,
|
|
191
3218
|
...enableAnimation && {
|
|
192
3219
|
initial: "hidden",
|
|
193
3220
|
animate: "visible",
|
|
194
|
-
|
|
3221
|
+
exit: "hidden",
|
|
3222
|
+
variants: mobileMenuVariants
|
|
195
3223
|
},
|
|
196
|
-
children: /* @__PURE__ */ (0,
|
|
197
|
-
/* @__PURE__ */ (0,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
// >
|
|
205
|
-
// {item.label}
|
|
206
|
-
// </Link>
|
|
207
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(NavLink, { href: item.href, className: item.className?.pc, selectedKey, children: item.label }, item.key)
|
|
208
|
-
)) }),
|
|
209
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
210
|
-
"button",
|
|
211
|
-
{
|
|
212
|
-
onClick: () => setIsMenuOpen(!isMenuOpen),
|
|
213
|
-
className: "md:hidden p-2 hover:bg-purple-50 rounded-lg transition-colors",
|
|
214
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(BreadIcon, { isMenuOpen })
|
|
215
|
-
}
|
|
216
|
-
)
|
|
217
|
-
] }),
|
|
218
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_framer_motion2.AnimatePresence, { children: isMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
219
|
-
MobileMenuComponent,
|
|
3224
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("nav", { className: "flex flex-col space-y-4 py-4 items-center", children: [
|
|
3225
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ThemeToggle, {}),
|
|
3226
|
+
menuItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(MobileMenuComponent, { ...enableAnimation && {
|
|
3227
|
+
initial: { x: -20, opacity: 0 },
|
|
3228
|
+
animate: { x: 0, opacity: 1 },
|
|
3229
|
+
transition: { delay: 0.1 }
|
|
3230
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
3231
|
+
MobileNavLink,
|
|
220
3232
|
{
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
variants: mobileMenuVariants
|
|
227
|
-
},
|
|
228
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex flex-col space-y-4 py-4 items-center", children: menuItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
229
|
-
import_framer_motion2.motion.div,
|
|
230
|
-
{
|
|
231
|
-
...enableAnimation && {
|
|
232
|
-
initial: { x: -20, opacity: 0 },
|
|
233
|
-
animate: { x: 0, opacity: 1 },
|
|
234
|
-
transition: { delay: 0.1 }
|
|
235
|
-
},
|
|
236
|
-
children: menuItems.map((item2) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(MobileNavLink, { href: item2.href, className: item2.className?.mobile, selectedKey, children: item2.label }, item2.key))
|
|
237
|
-
},
|
|
238
|
-
item.key
|
|
239
|
-
)) })
|
|
3233
|
+
href: item.href,
|
|
3234
|
+
selectedKey,
|
|
3235
|
+
className: item.className?.mobile,
|
|
3236
|
+
activeClassName,
|
|
3237
|
+
children: item.label
|
|
240
3238
|
}
|
|
241
|
-
) })
|
|
3239
|
+
) }, item.key))
|
|
242
3240
|
] })
|
|
243
3241
|
}
|
|
244
3242
|
);
|
|
245
3243
|
};
|
|
246
|
-
var
|
|
247
|
-
|
|
248
|
-
|
|
3244
|
+
var MobileMenuBtn = ({
|
|
3245
|
+
setIsMenuOpen,
|
|
3246
|
+
isMenuOpen,
|
|
3247
|
+
className = "p-2 hover:bg-accent rounded-lg transition-colors"
|
|
3248
|
+
}) => {
|
|
3249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
3250
|
+
"button",
|
|
3251
|
+
{
|
|
3252
|
+
onClick: () => setIsMenuOpen(!isMenuOpen),
|
|
3253
|
+
className: `md:hidden ${className}`,
|
|
3254
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(BreadIcon, { isMenuOpen })
|
|
3255
|
+
}
|
|
3256
|
+
);
|
|
249
3257
|
};
|
|
250
|
-
var
|
|
251
|
-
|
|
252
|
-
|
|
3258
|
+
var NavLink = ({
|
|
3259
|
+
href,
|
|
3260
|
+
children,
|
|
3261
|
+
className,
|
|
3262
|
+
selectedKey,
|
|
3263
|
+
activeClassName
|
|
3264
|
+
}) => {
|
|
3265
|
+
const combinedClassName = `${className || "hover:text-foreground transition-colors"} ${getActivedCls(href, selectedKey, activeClassName)}`;
|
|
3266
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_link.default, { href, legacyBehavior: true, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("a", { className: combinedClassName, children }) });
|
|
3267
|
+
};
|
|
3268
|
+
var MobileNavLink = ({
|
|
3269
|
+
href,
|
|
3270
|
+
children,
|
|
3271
|
+
className,
|
|
3272
|
+
selectedKey,
|
|
3273
|
+
activeClassName
|
|
3274
|
+
}) => {
|
|
3275
|
+
const combinedClassName = `${className || "text-lg font-medium text-center hover:text-primary transition-colors"} ${getActivedCls(href, selectedKey, activeClassName)}`;
|
|
3276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_link.default, { href, legacyBehavior: true, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("a", { className: combinedClassName, children }) });
|
|
253
3277
|
};
|
|
254
3278
|
var Header_default = Header;
|
|
255
3279
|
|
|
256
3280
|
// src/layout/Footer/index.tsx
|
|
257
3281
|
var import_link2 = __toESM(require("next/link"));
|
|
258
|
-
var
|
|
3282
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
259
3283
|
var Footer = ({
|
|
260
3284
|
site,
|
|
261
3285
|
navigation,
|
|
262
3286
|
texts,
|
|
263
3287
|
className = ""
|
|
264
3288
|
}) => {
|
|
265
|
-
return /* @__PURE__ */ (0,
|
|
266
|
-
/* @__PURE__ */ (0,
|
|
267
|
-
/* @__PURE__ */ (0,
|
|
268
|
-
/* @__PURE__ */ (0,
|
|
269
|
-
/* @__PURE__ */ (0,
|
|
270
|
-
/* @__PURE__ */ (0,
|
|
271
|
-
/* @__PURE__ */ (0,
|
|
3289
|
+
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: [
|
|
3290
|
+
/* @__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))]" }),
|
|
3291
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "container mx-auto p-4 relative", children: [
|
|
3292
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8 mb-12", children: [
|
|
3293
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "space-y-4", children: [
|
|
3294
|
+
/* @__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 }),
|
|
3295
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-gray-600 max-w-xs hover-text-foreground", children: site.description })
|
|
272
3296
|
] }),
|
|
273
|
-
/* @__PURE__ */ (0,
|
|
274
|
-
/* @__PURE__ */ (0,
|
|
275
|
-
/* @__PURE__ */ (0,
|
|
3297
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "space-y-4 ", children: [
|
|
3298
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h4", { className: "text-sm font-semibold uppercase text-foreground", children: navigation.quickLinks.title }),
|
|
3299
|
+
/* @__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)(
|
|
276
3300
|
import_link2.default,
|
|
277
3301
|
{
|
|
278
3302
|
href: item.href,
|
|
@@ -282,9 +3306,9 @@ var Footer = ({
|
|
|
282
3306
|
item.href
|
|
283
3307
|
)) })
|
|
284
3308
|
] }),
|
|
285
|
-
/* @__PURE__ */ (0,
|
|
286
|
-
/* @__PURE__ */ (0,
|
|
287
|
-
/* @__PURE__ */ (0,
|
|
3309
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "space-y-4", children: [
|
|
3310
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h4", { className: "text-sm font-semibold uppercase text-foreground", children: texts.social }),
|
|
3311
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex space-x-4", children: navigation.socialLinks.map((link) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
288
3312
|
"a",
|
|
289
3313
|
{
|
|
290
3314
|
href: link.href,
|
|
@@ -297,17 +3321,23 @@ var Footer = ({
|
|
|
297
3321
|
)) })
|
|
298
3322
|
] })
|
|
299
3323
|
] }),
|
|
300
|
-
/* @__PURE__ */ (0,
|
|
301
|
-
/* @__PURE__ */ (0,
|
|
302
|
-
/* @__PURE__ */ (0,
|
|
303
|
-
/* @__PURE__ */ (0,
|
|
304
|
-
/* @__PURE__ */ (0,
|
|
3324
|
+
/* @__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: [
|
|
3325
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-sm text-gray-600", children: texts.copyright }),
|
|
3326
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex space-x-6", children: [
|
|
3327
|
+
/* @__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 }),
|
|
3328
|
+
/* @__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 })
|
|
305
3329
|
] })
|
|
306
3330
|
] }) })
|
|
307
|
-
] })
|
|
308
|
-
/* @__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" })
|
|
3331
|
+
] })
|
|
309
3332
|
] });
|
|
310
3333
|
};
|
|
3334
|
+
var Footer_default = Footer;
|
|
3335
|
+
|
|
3336
|
+
// src/layout/BasicLayout/index.tsx
|
|
3337
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
3338
|
+
function BasicLayout({ children }) {
|
|
3339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children });
|
|
3340
|
+
}
|
|
311
3341
|
|
|
312
3342
|
// src/hooks/useForceRerender.ts
|
|
313
3343
|
var import_react2 = require("react");
|
|
@@ -319,15 +3349,612 @@ var useForceRerender = () => {
|
|
|
319
3349
|
return [key, forceRerender];
|
|
320
3350
|
};
|
|
321
3351
|
var useForceRerender_default = useForceRerender;
|
|
3352
|
+
|
|
3353
|
+
// ../node_modules/@studio-freight/hamo/dist/hamo.modern.mjs
|
|
3354
|
+
var import_react3 = require("react");
|
|
3355
|
+
|
|
3356
|
+
// ../node_modules/@studio-freight/tempus/dist/tempus.modern.mjs
|
|
3357
|
+
var a = "undefined" != typeof window && new class {
|
|
3358
|
+
constructor() {
|
|
3359
|
+
this.raf = (a3) => {
|
|
3360
|
+
requestAnimationFrame(this.raf);
|
|
3361
|
+
const t4 = a3 - this.now;
|
|
3362
|
+
this.now = a3;
|
|
3363
|
+
for (let s2 = 0; s2 < this.callbacks.length; s2++) this.callbacks[s2].callback(a3, t4);
|
|
3364
|
+
}, this.callbacks = [], this.now = performance.now(), requestAnimationFrame(this.raf);
|
|
3365
|
+
}
|
|
3366
|
+
add(a3, t4 = 0) {
|
|
3367
|
+
return this.callbacks.push({ callback: a3, priority: t4 }), this.callbacks.sort((a4, t5) => a4.priority - t5.priority), () => this.remove(a3);
|
|
3368
|
+
}
|
|
3369
|
+
remove(a3) {
|
|
3370
|
+
this.callbacks = this.callbacks.filter(({ callback: t4 }) => a3 !== t4);
|
|
3371
|
+
}
|
|
3372
|
+
}();
|
|
3373
|
+
|
|
3374
|
+
// ../node_modules/just-debounce-it/index.mjs
|
|
3375
|
+
var functionDebounce = debounce;
|
|
3376
|
+
function debounce(fn, wait, callFirst) {
|
|
3377
|
+
var timeout = null;
|
|
3378
|
+
var debouncedFn = null;
|
|
3379
|
+
var clear = function() {
|
|
3380
|
+
if (timeout) {
|
|
3381
|
+
clearTimeout(timeout);
|
|
3382
|
+
debouncedFn = null;
|
|
3383
|
+
timeout = null;
|
|
3384
|
+
}
|
|
3385
|
+
};
|
|
3386
|
+
var flush = function() {
|
|
3387
|
+
var call = debouncedFn;
|
|
3388
|
+
clear();
|
|
3389
|
+
if (call) {
|
|
3390
|
+
call();
|
|
3391
|
+
}
|
|
3392
|
+
};
|
|
3393
|
+
var debounceWrapper = function() {
|
|
3394
|
+
if (!wait) {
|
|
3395
|
+
return fn.apply(this, arguments);
|
|
3396
|
+
}
|
|
3397
|
+
var context = this;
|
|
3398
|
+
var args = arguments;
|
|
3399
|
+
var callNow = callFirst && !timeout;
|
|
3400
|
+
clear();
|
|
3401
|
+
debouncedFn = function() {
|
|
3402
|
+
fn.apply(context, args);
|
|
3403
|
+
};
|
|
3404
|
+
timeout = setTimeout(function() {
|
|
3405
|
+
timeout = null;
|
|
3406
|
+
if (!callNow) {
|
|
3407
|
+
var call = debouncedFn;
|
|
3408
|
+
debouncedFn = null;
|
|
3409
|
+
return call();
|
|
3410
|
+
}
|
|
3411
|
+
}, wait);
|
|
3412
|
+
if (callNow) {
|
|
3413
|
+
return debouncedFn();
|
|
3414
|
+
}
|
|
3415
|
+
};
|
|
3416
|
+
debounceWrapper.cancel = clear;
|
|
3417
|
+
debounceWrapper.flush = flush;
|
|
3418
|
+
return debounceWrapper;
|
|
3419
|
+
}
|
|
3420
|
+
|
|
3421
|
+
// ../node_modules/nanoevents/index.js
|
|
3422
|
+
var createNanoEvents = () => ({
|
|
3423
|
+
emit(event, ...args) {
|
|
3424
|
+
for (let callbacks = this.events[event] || [], i2 = 0, length = callbacks.length; i2 < length; i2++) {
|
|
3425
|
+
callbacks[i2](...args);
|
|
3426
|
+
}
|
|
3427
|
+
},
|
|
3428
|
+
events: {},
|
|
3429
|
+
on(event, cb) {
|
|
3430
|
+
var _a;
|
|
3431
|
+
;
|
|
3432
|
+
((_a = this.events)[event] || (_a[event] = [])).push(cb);
|
|
3433
|
+
return () => {
|
|
3434
|
+
this.events[event] = this.events[event]?.filter((i2) => cb !== i2);
|
|
3435
|
+
};
|
|
3436
|
+
}
|
|
3437
|
+
});
|
|
3438
|
+
|
|
3439
|
+
// ../node_modules/@studio-freight/hamo/dist/hamo.modern.mjs
|
|
3440
|
+
function f(e3, n3 = 0) {
|
|
3441
|
+
(0, import_react3.useEffect)(() => {
|
|
3442
|
+
if (e3) return a.add(e3, n3), () => a.remove(e3);
|
|
3443
|
+
}, [e3, n3]);
|
|
3444
|
+
}
|
|
3445
|
+
function g() {
|
|
3446
|
+
return g = Object.assign ? Object.assign.bind() : function(e3) {
|
|
3447
|
+
for (var t4 = 1; t4 < arguments.length; t4++) {
|
|
3448
|
+
var n3 = arguments[t4];
|
|
3449
|
+
for (var r3 in n3) Object.prototype.hasOwnProperty.call(n3, r3) && (e3[r3] = n3[r3]);
|
|
3450
|
+
}
|
|
3451
|
+
return e3;
|
|
3452
|
+
}, g.apply(this, arguments);
|
|
3453
|
+
}
|
|
3454
|
+
function p(e3) {
|
|
3455
|
+
"sticky" === getComputedStyle(e3).position && (e3.style.setProperty("position", "static"), e3.dataset.sticky = "true"), e3.offsetParent && p(e3.offsetParent);
|
|
3456
|
+
}
|
|
3457
|
+
function b2(e3) {
|
|
3458
|
+
var t4;
|
|
3459
|
+
"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);
|
|
3460
|
+
}
|
|
3461
|
+
function y(e3, t4 = 0) {
|
|
3462
|
+
const n3 = t4 + e3.offsetTop;
|
|
3463
|
+
return e3.offsetParent ? y(e3.offsetParent, n3) : n3;
|
|
3464
|
+
}
|
|
3465
|
+
function z2(e3, t4 = 0) {
|
|
3466
|
+
const n3 = t4 + e3.offsetLeft;
|
|
3467
|
+
return e3.offsetParent ? z2(e3.offsetParent, n3) : n3;
|
|
3468
|
+
}
|
|
3469
|
+
function P(e3, t4 = 0) {
|
|
3470
|
+
const n3 = t4 + e3.scrollTop;
|
|
3471
|
+
return e3.offsetParent ? P(e3.offsetParent, n3) : n3 + window.scrollY;
|
|
3472
|
+
}
|
|
3473
|
+
function E2(e3, t4 = 0) {
|
|
3474
|
+
const n3 = t4 + e3.scrollLeft;
|
|
3475
|
+
return e3.offsetParent ? E2(e3.offsetParent, n3) : n3 + window.scrollX;
|
|
3476
|
+
}
|
|
3477
|
+
var L = createNanoEvents();
|
|
3478
|
+
function k({ ignoreTransform: r3 = false, ignoreSticky: c2 = true, debounce: u2 = 500, lazy: s2 = false, callback: a3 } = {}) {
|
|
3479
|
+
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 }) => {
|
|
3480
|
+
var c3, i2, u3, d3, l3;
|
|
3481
|
+
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)));
|
|
3482
|
+
}, [s2]);
|
|
3483
|
+
(0, import_react3.useEffect)(() => {
|
|
3484
|
+
if (!d2) return;
|
|
3485
|
+
const e3 = d2.getBoundingClientRect();
|
|
3486
|
+
v({ width: e3.width, height: e3.height });
|
|
3487
|
+
const t4 = functionDebounce(([e4]) => {
|
|
3488
|
+
v({ width: e4.borderBoxSize[0].inlineSize, height: e4.borderBoxSize[0].blockSize });
|
|
3489
|
+
}, u2), n3 = new ResizeObserver(t4);
|
|
3490
|
+
return n3.observe(d2), () => {
|
|
3491
|
+
n3.disconnect(), t4.cancel();
|
|
3492
|
+
};
|
|
3493
|
+
}, [d2, u2, v]);
|
|
3494
|
+
const [w, k2] = (0, import_react3.useState)(), x2 = (0, import_react3.useCallback)(() => {
|
|
3495
|
+
if (!d2) return;
|
|
3496
|
+
let e3, t4;
|
|
3497
|
+
if (c2 && p(d2), r3) e3 = y(d2), t4 = z2(d2);
|
|
3498
|
+
else {
|
|
3499
|
+
const n3 = d2.getBoundingClientRect();
|
|
3500
|
+
e3 = n3.top + P(d2), t4 = n3.left + E2(d2);
|
|
3501
|
+
}
|
|
3502
|
+
c2 && b2(d2), v({ top: e3, left: t4, element: d2 });
|
|
3503
|
+
}, [r3, c2, d2, v]);
|
|
3504
|
+
(0, import_react3.useEffect)(() => {
|
|
3505
|
+
x2();
|
|
3506
|
+
const e3 = functionDebounce(x2, u2), t4 = new ResizeObserver(e3);
|
|
3507
|
+
return t4.observe(null != w ? w : document.body), () => {
|
|
3508
|
+
t4.disconnect(), e3.cancel();
|
|
3509
|
+
};
|
|
3510
|
+
}, [w, u2, x2]), (0, import_react3.useEffect)(() => L.on("resize", function() {
|
|
3511
|
+
if (!d2) return;
|
|
3512
|
+
const e3 = d2.getBoundingClientRect();
|
|
3513
|
+
v({ width: e3.width, height: e3.height }), x2();
|
|
3514
|
+
}), [d2, x2, v]);
|
|
3515
|
+
const O2 = (0, import_react3.useCallback)(() => f3.current, []);
|
|
3516
|
+
return [l2, s2 ? O2 : h, k2];
|
|
3517
|
+
}
|
|
3518
|
+
k.resize = () => {
|
|
3519
|
+
L.emit("resize");
|
|
3520
|
+
};
|
|
3521
|
+
|
|
3522
|
+
// ../node_modules/@studio-freight/lenis/dist/lenis.mjs
|
|
3523
|
+
function t3(t4, e3, i2) {
|
|
3524
|
+
return Math.max(t4, Math.min(e3, i2));
|
|
3525
|
+
}
|
|
3526
|
+
var Animate = class {
|
|
3527
|
+
advance(e3) {
|
|
3528
|
+
if (!this.isRunning) return;
|
|
3529
|
+
let i2 = false;
|
|
3530
|
+
if (this.lerp) this.value = (s2 = this.value, o3 = this.to, n3 = 60 * this.lerp, r3 = e3, function(t4, e4, i3) {
|
|
3531
|
+
return (1 - i3) * t4 + i3 * e4;
|
|
3532
|
+
}(s2, o3, 1 - Math.exp(-n3 * r3))), Math.round(this.value) === this.to && (this.value = this.to, i2 = true);
|
|
3533
|
+
else {
|
|
3534
|
+
this.currentTime += e3;
|
|
3535
|
+
const s3 = t3(0, this.currentTime / this.duration, 1);
|
|
3536
|
+
i2 = s3 >= 1;
|
|
3537
|
+
const o4 = i2 ? 1 : this.easing(s3);
|
|
3538
|
+
this.value = this.from + (this.to - this.from) * o4;
|
|
3539
|
+
}
|
|
3540
|
+
var s2, o3, n3, r3;
|
|
3541
|
+
this.onUpdate?.(this.value, i2), i2 && this.stop();
|
|
3542
|
+
}
|
|
3543
|
+
stop() {
|
|
3544
|
+
this.isRunning = false;
|
|
3545
|
+
}
|
|
3546
|
+
fromTo(t4, e3, { lerp: i2 = 0.1, duration: s2 = 1, easing: o3 = (t5) => t5, onStart: n3, onUpdate: r3 }) {
|
|
3547
|
+
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;
|
|
3548
|
+
}
|
|
3549
|
+
};
|
|
3550
|
+
var Dimensions = class {
|
|
3551
|
+
constructor({ wrapper: t4, content: e3, autoResize: i2 = true, debounce: s2 = 250 } = {}) {
|
|
3552
|
+
__publicField(this, "resize", () => {
|
|
3553
|
+
this.onWrapperResize(), this.onContentResize();
|
|
3554
|
+
});
|
|
3555
|
+
__publicField(this, "onWrapperResize", () => {
|
|
3556
|
+
this.wrapper === window ? (this.width = window.innerWidth, this.height = window.innerHeight) : (this.width = this.wrapper.clientWidth, this.height = this.wrapper.clientHeight);
|
|
3557
|
+
});
|
|
3558
|
+
__publicField(this, "onContentResize", () => {
|
|
3559
|
+
this.wrapper === window ? (this.scrollHeight = this.content.scrollHeight, this.scrollWidth = this.content.scrollWidth) : (this.scrollHeight = this.wrapper.scrollHeight, this.scrollWidth = this.wrapper.scrollWidth);
|
|
3560
|
+
});
|
|
3561
|
+
this.wrapper = t4, this.content = e3, i2 && (this.debouncedResize = /* @__PURE__ */ function(t5, e4) {
|
|
3562
|
+
let i3;
|
|
3563
|
+
return function() {
|
|
3564
|
+
let s3 = arguments, o3 = this;
|
|
3565
|
+
clearTimeout(i3), i3 = setTimeout(function() {
|
|
3566
|
+
t5.apply(o3, s3);
|
|
3567
|
+
}, e4);
|
|
3568
|
+
};
|
|
3569
|
+
}(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();
|
|
3570
|
+
}
|
|
3571
|
+
destroy() {
|
|
3572
|
+
this.wrapperResizeObserver?.disconnect(), this.contentResizeObserver?.disconnect(), window.removeEventListener("resize", this.debouncedResize, false);
|
|
3573
|
+
}
|
|
3574
|
+
get limit() {
|
|
3575
|
+
return { x: this.scrollWidth - this.width, y: this.scrollHeight - this.height };
|
|
3576
|
+
}
|
|
3577
|
+
};
|
|
3578
|
+
var Emitter = class {
|
|
3579
|
+
constructor() {
|
|
3580
|
+
this.events = {};
|
|
3581
|
+
}
|
|
3582
|
+
emit(t4, ...e3) {
|
|
3583
|
+
let i2 = this.events[t4] || [];
|
|
3584
|
+
for (let t5 = 0, s2 = i2.length; t5 < s2; t5++) i2[t5](...e3);
|
|
3585
|
+
}
|
|
3586
|
+
on(t4, e3) {
|
|
3587
|
+
return this.events[t4]?.push(e3) || (this.events[t4] = [e3]), () => {
|
|
3588
|
+
this.events[t4] = this.events[t4]?.filter((t5) => e3 !== t5);
|
|
3589
|
+
};
|
|
3590
|
+
}
|
|
3591
|
+
off(t4, e3) {
|
|
3592
|
+
this.events[t4] = this.events[t4]?.filter((t5) => e3 !== t5);
|
|
3593
|
+
}
|
|
3594
|
+
destroy() {
|
|
3595
|
+
this.events = {};
|
|
3596
|
+
}
|
|
3597
|
+
};
|
|
3598
|
+
var e2 = 100 / 6;
|
|
3599
|
+
var VirtualScroll = class {
|
|
3600
|
+
constructor(t4, { wheelMultiplier: e3 = 1, touchMultiplier: i2 = 1 }) {
|
|
3601
|
+
__publicField(this, "onTouchStart", (t4) => {
|
|
3602
|
+
const { clientX: e3, clientY: i2 } = t4.targetTouches ? t4.targetTouches[0] : t4;
|
|
3603
|
+
this.touchStart.x = e3, this.touchStart.y = i2, this.lastDelta = { x: 0, y: 0 }, this.emitter.emit("scroll", { deltaX: 0, deltaY: 0, event: t4 });
|
|
3604
|
+
});
|
|
3605
|
+
__publicField(this, "onTouchMove", (t4) => {
|
|
3606
|
+
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;
|
|
3607
|
+
this.touchStart.x = e3, this.touchStart.y = i2, this.lastDelta = { x: s2, y: o3 }, this.emitter.emit("scroll", { deltaX: s2, deltaY: o3, event: t4 });
|
|
3608
|
+
});
|
|
3609
|
+
__publicField(this, "onTouchEnd", (t4) => {
|
|
3610
|
+
this.emitter.emit("scroll", { deltaX: this.lastDelta.x, deltaY: this.lastDelta.y, event: t4 });
|
|
3611
|
+
});
|
|
3612
|
+
__publicField(this, "onWheel", (t4) => {
|
|
3613
|
+
let { deltaX: i2, deltaY: s2, deltaMode: o3 } = t4;
|
|
3614
|
+
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 });
|
|
3615
|
+
});
|
|
3616
|
+
__publicField(this, "onWindowResize", () => {
|
|
3617
|
+
this.windowWidth = window.innerWidth, this.windowHeight = window.innerHeight;
|
|
3618
|
+
});
|
|
3619
|
+
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 });
|
|
3620
|
+
}
|
|
3621
|
+
on(t4, e3) {
|
|
3622
|
+
return this.emitter.on(t4, e3);
|
|
3623
|
+
}
|
|
3624
|
+
destroy() {
|
|
3625
|
+
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 });
|
|
3626
|
+
}
|
|
3627
|
+
};
|
|
3628
|
+
var Lenis = class {
|
|
3629
|
+
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 } = {}) {
|
|
3630
|
+
this.__isSmooth = false, this.__isScrolling = false, this.__isStopped = false, this.__isLocked = false, this.onVirtualScroll = ({ deltaX: t5, deltaY: e4, event: i3 }) => {
|
|
3631
|
+
if (i3.ctrlKey) return;
|
|
3632
|
+
const s3 = i3.type.includes("touch"), o4 = i3.type.includes("wheel");
|
|
3633
|
+
if (this.options.syncTouch && s3 && "touchstart" === i3.type && !this.isStopped && !this.isLocked) return void this.reset();
|
|
3634
|
+
const n4 = 0 === t5 && 0 === e4, r4 = "vertical" === this.options.gestureOrientation && 0 === e4 || "horizontal" === this.options.gestureOrientation && 0 === t5;
|
|
3635
|
+
if (n4 || r4) return;
|
|
3636
|
+
let l3 = i3.composedPath();
|
|
3637
|
+
if (l3 = l3.slice(0, l3.indexOf(this.rootElement)), l3.find((t6) => {
|
|
3638
|
+
var e5, i4, n5, r5, l4;
|
|
3639
|
+
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"));
|
|
3640
|
+
})) return;
|
|
3641
|
+
if (this.isStopped || this.isLocked) return void i3.preventDefault();
|
|
3642
|
+
if (this.isSmooth = this.options.syncTouch && s3 || this.options.smoothWheel && o4, !this.isSmooth) return this.isScrolling = false, void this.animate.stop();
|
|
3643
|
+
i3.preventDefault();
|
|
3644
|
+
let h2 = e4;
|
|
3645
|
+
"both" === this.options.gestureOrientation ? h2 = Math.abs(e4) > Math.abs(t5) ? e4 : t5 : "horizontal" === this.options.gestureOrientation && (h2 = t5);
|
|
3646
|
+
const a4 = s3 && this.options.syncTouch, c3 = s3 && "touchend" === i3.type && Math.abs(h2) > 5;
|
|
3647
|
+
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 }));
|
|
3648
|
+
}, this.onNativeScroll = () => {
|
|
3649
|
+
if (!this.__preventNextScrollEvent && !this.isScrolling) {
|
|
3650
|
+
const t5 = this.animatedScroll;
|
|
3651
|
+
this.animatedScroll = this.targetScroll = this.actualScroll, this.velocity = 0, this.direction = Math.sign(this.animatedScroll - t5), this.emit();
|
|
3652
|
+
}
|
|
3653
|
+
}, 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);
|
|
3654
|
+
}
|
|
3655
|
+
destroy() {
|
|
3656
|
+
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);
|
|
3657
|
+
}
|
|
3658
|
+
on(t4, e3) {
|
|
3659
|
+
return this.emitter.on(t4, e3);
|
|
3660
|
+
}
|
|
3661
|
+
off(t4, e3) {
|
|
3662
|
+
return this.emitter.off(t4, e3);
|
|
3663
|
+
}
|
|
3664
|
+
setScroll(t4) {
|
|
3665
|
+
this.isHorizontal ? this.rootElement.scrollLeft = t4 : this.rootElement.scrollTop = t4;
|
|
3666
|
+
}
|
|
3667
|
+
resize() {
|
|
3668
|
+
this.dimensions.resize();
|
|
3669
|
+
}
|
|
3670
|
+
emit() {
|
|
3671
|
+
this.emitter.emit("scroll", this);
|
|
3672
|
+
}
|
|
3673
|
+
reset() {
|
|
3674
|
+
this.isLocked = false, this.isScrolling = false, this.animatedScroll = this.targetScroll = this.actualScroll, this.velocity = 0, this.animate.stop();
|
|
3675
|
+
}
|
|
3676
|
+
start() {
|
|
3677
|
+
this.isStopped && (this.isStopped = false, this.reset());
|
|
3678
|
+
}
|
|
3679
|
+
stop() {
|
|
3680
|
+
this.isStopped || (this.isStopped = true, this.animate.stop(), this.reset());
|
|
3681
|
+
}
|
|
3682
|
+
raf(t4) {
|
|
3683
|
+
const e3 = t4 - (this.time || t4);
|
|
3684
|
+
this.time = t4, this.animate.advance(1e-3 * e3);
|
|
3685
|
+
}
|
|
3686
|
+
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 } = {}) {
|
|
3687
|
+
if (!this.isStopped && !this.isLocked || a3) {
|
|
3688
|
+
if (["top", "left", "start"].includes(e3)) e3 = 0;
|
|
3689
|
+
else if (["bottom", "right", "end"].includes(e3)) e3 = this.limit;
|
|
3690
|
+
else {
|
|
3691
|
+
let t4;
|
|
3692
|
+
if ("string" == typeof e3 ? t4 = document.querySelector(e3) : (null == e3 ? void 0 : e3.nodeType) && (t4 = e3), t4) {
|
|
3693
|
+
if (this.options.wrapper !== window) {
|
|
3694
|
+
const t5 = this.options.wrapper.getBoundingClientRect();
|
|
3695
|
+
i2 -= this.isHorizontal ? t5.left : t5.top;
|
|
3696
|
+
}
|
|
3697
|
+
const s3 = t4.getBoundingClientRect();
|
|
3698
|
+
e3 = (this.isHorizontal ? s3.left : s3.top) + this.animatedScroll;
|
|
3699
|
+
}
|
|
3700
|
+
}
|
|
3701
|
+
if ("number" == typeof e3) {
|
|
3702
|
+
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));
|
|
3703
|
+
if (!c2) {
|
|
3704
|
+
if (e3 === this.targetScroll) return;
|
|
3705
|
+
this.targetScroll = e3;
|
|
3706
|
+
}
|
|
3707
|
+
this.animate.fromTo(this.animatedScroll, e3, { duration: n3, easing: r3, lerp: l2, onStart: () => {
|
|
3708
|
+
o3 && (this.isLocked = true), this.isScrolling = true;
|
|
3709
|
+
}, onUpdate: (t4, e4) => {
|
|
3710
|
+
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(() => {
|
|
3711
|
+
delete this.__preventNextScrollEvent;
|
|
3712
|
+
}));
|
|
3713
|
+
} });
|
|
3714
|
+
}
|
|
3715
|
+
}
|
|
3716
|
+
}
|
|
3717
|
+
get rootElement() {
|
|
3718
|
+
return this.options.wrapper === window ? document.documentElement : this.options.wrapper;
|
|
3719
|
+
}
|
|
3720
|
+
get limit() {
|
|
3721
|
+
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"];
|
|
3722
|
+
}
|
|
3723
|
+
get isHorizontal() {
|
|
3724
|
+
return "horizontal" === this.options.orientation;
|
|
3725
|
+
}
|
|
3726
|
+
get actualScroll() {
|
|
3727
|
+
return this.isHorizontal ? this.rootElement.scrollLeft : this.rootElement.scrollTop;
|
|
3728
|
+
}
|
|
3729
|
+
get scroll() {
|
|
3730
|
+
return this.options.infinite ? (t4 = this.animatedScroll, e3 = this.limit, (t4 % e3 + e3) % e3) : this.animatedScroll;
|
|
3731
|
+
var t4, e3;
|
|
3732
|
+
}
|
|
3733
|
+
get progress() {
|
|
3734
|
+
return 0 === this.limit ? 1 : this.scroll / this.limit;
|
|
3735
|
+
}
|
|
3736
|
+
get isSmooth() {
|
|
3737
|
+
return this.__isSmooth;
|
|
3738
|
+
}
|
|
3739
|
+
set isSmooth(t4) {
|
|
3740
|
+
this.__isSmooth !== t4 && (this.__isSmooth = t4, this.toggleClassName("lenis-smooth", t4));
|
|
3741
|
+
}
|
|
3742
|
+
get isScrolling() {
|
|
3743
|
+
return this.__isScrolling;
|
|
3744
|
+
}
|
|
3745
|
+
set isScrolling(t4) {
|
|
3746
|
+
this.__isScrolling !== t4 && (this.__isScrolling = t4, this.toggleClassName("lenis-scrolling", t4));
|
|
3747
|
+
}
|
|
3748
|
+
get isStopped() {
|
|
3749
|
+
return this.__isStopped;
|
|
3750
|
+
}
|
|
3751
|
+
set isStopped(t4) {
|
|
3752
|
+
this.__isStopped !== t4 && (this.__isStopped = t4, this.toggleClassName("lenis-stopped", t4));
|
|
3753
|
+
}
|
|
3754
|
+
get isLocked() {
|
|
3755
|
+
return this.__isLocked;
|
|
3756
|
+
}
|
|
3757
|
+
set isLocked(t4) {
|
|
3758
|
+
this.__isLocked !== t4 && (this.__isLocked = t4, this.toggleClassName("lenis-locked", t4));
|
|
3759
|
+
}
|
|
3760
|
+
get className() {
|
|
3761
|
+
let t4 = "lenis";
|
|
3762
|
+
return this.isStopped && (t4 += " lenis-stopped"), this.isLocked && (t4 += " lenis-locked"), this.isScrolling && (t4 += " lenis-scrolling"), this.isSmooth && (t4 += " lenis-smooth"), t4;
|
|
3763
|
+
}
|
|
3764
|
+
toggleClassName(t4, e3) {
|
|
3765
|
+
this.rootElement.classList.toggle(t4, e3), this.emitter.emit("className change", this);
|
|
3766
|
+
}
|
|
3767
|
+
};
|
|
3768
|
+
|
|
3769
|
+
// ../node_modules/@studio-freight/react-lenis/dist/react-lenis.mjs
|
|
3770
|
+
var import_react5 = __toESM(require("react"), 1);
|
|
3771
|
+
|
|
3772
|
+
// ../node_modules/zustand/esm/vanilla.mjs
|
|
3773
|
+
var import_meta = {};
|
|
3774
|
+
var createStoreImpl = (createState) => {
|
|
3775
|
+
let state;
|
|
3776
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
3777
|
+
const setState = (partial, replace) => {
|
|
3778
|
+
const nextState = typeof partial === "function" ? partial(state) : partial;
|
|
3779
|
+
if (!Object.is(nextState, state)) {
|
|
3780
|
+
const previousState = state;
|
|
3781
|
+
state = (replace != null ? replace : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState);
|
|
3782
|
+
listeners.forEach((listener) => listener(state, previousState));
|
|
3783
|
+
}
|
|
3784
|
+
};
|
|
3785
|
+
const getState = () => state;
|
|
3786
|
+
const getInitialState = () => initialState;
|
|
3787
|
+
const subscribe = (listener) => {
|
|
3788
|
+
listeners.add(listener);
|
|
3789
|
+
return () => listeners.delete(listener);
|
|
3790
|
+
};
|
|
3791
|
+
const destroy = () => {
|
|
3792
|
+
if ((import_meta.env ? import_meta.env.MODE : void 0) !== "production") {
|
|
3793
|
+
console.warn(
|
|
3794
|
+
"[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."
|
|
3795
|
+
);
|
|
3796
|
+
}
|
|
3797
|
+
listeners.clear();
|
|
3798
|
+
};
|
|
3799
|
+
const api = { setState, getState, getInitialState, subscribe, destroy };
|
|
3800
|
+
const initialState = state = createState(setState, getState, api);
|
|
3801
|
+
return api;
|
|
3802
|
+
};
|
|
3803
|
+
var createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
|
|
3804
|
+
|
|
3805
|
+
// ../node_modules/zustand/esm/index.mjs
|
|
3806
|
+
var import_react4 = __toESM(require("react"), 1);
|
|
3807
|
+
var import_with_selector = __toESM(require_with_selector(), 1);
|
|
3808
|
+
var import_meta2 = {};
|
|
3809
|
+
var { useDebugValue } = import_react4.default;
|
|
3810
|
+
var { useSyncExternalStoreWithSelector } = import_with_selector.default;
|
|
3811
|
+
var didWarnAboutEqualityFn = false;
|
|
3812
|
+
var identity = (arg) => arg;
|
|
3813
|
+
function useStore(api, selector = identity, equalityFn) {
|
|
3814
|
+
if ((import_meta2.env ? import_meta2.env.MODE : void 0) !== "production" && equalityFn && !didWarnAboutEqualityFn) {
|
|
3815
|
+
console.warn(
|
|
3816
|
+
"[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"
|
|
3817
|
+
);
|
|
3818
|
+
didWarnAboutEqualityFn = true;
|
|
3819
|
+
}
|
|
3820
|
+
const slice = useSyncExternalStoreWithSelector(
|
|
3821
|
+
api.subscribe,
|
|
3822
|
+
api.getState,
|
|
3823
|
+
api.getServerState || api.getInitialState,
|
|
3824
|
+
selector,
|
|
3825
|
+
equalityFn
|
|
3826
|
+
);
|
|
3827
|
+
useDebugValue(slice);
|
|
3828
|
+
return slice;
|
|
3829
|
+
}
|
|
3830
|
+
var createImpl = (createState) => {
|
|
3831
|
+
if ((import_meta2.env ? import_meta2.env.MODE : void 0) !== "production" && typeof createState !== "function") {
|
|
3832
|
+
console.warn(
|
|
3833
|
+
"[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`."
|
|
3834
|
+
);
|
|
3835
|
+
}
|
|
3836
|
+
const api = typeof createState === "function" ? createStore(createState) : createState;
|
|
3837
|
+
const useBoundStore = (selector, equalityFn) => useStore(api, selector, equalityFn);
|
|
3838
|
+
Object.assign(useBoundStore, api);
|
|
3839
|
+
return useBoundStore;
|
|
3840
|
+
};
|
|
3841
|
+
var create = (createState) => createState ? createImpl(createState) : createImpl;
|
|
3842
|
+
|
|
3843
|
+
// ../node_modules/@studio-freight/react-lenis/dist/react-lenis.mjs
|
|
3844
|
+
"undefined" != typeof window && (window.reactLenisVersion = "0.0.47");
|
|
3845
|
+
var d = (0, import_react5.createContext)(null);
|
|
3846
|
+
var m = create(() => ({}));
|
|
3847
|
+
var y2 = (0, import_react5.forwardRef)((o3, a3) => {
|
|
3848
|
+
var { children: f3, root: p2 = false, options: b3 = {}, autoRaf: y3 = true, rafPriority: v = 0, className: O2 } = o3, g2 = function(r3, e3) {
|
|
3849
|
+
var t4 = {};
|
|
3850
|
+
for (var n3 in r3) Object.prototype.hasOwnProperty.call(r3, n3) && e3.indexOf(n3) < 0 && (t4[n3] = r3[n3]);
|
|
3851
|
+
if (null != r3 && "function" == typeof Object.getOwnPropertySymbols) {
|
|
3852
|
+
var o4 = 0;
|
|
3853
|
+
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]]);
|
|
3854
|
+
}
|
|
3855
|
+
return t4;
|
|
3856
|
+
}(o3, ["children", "root", "options", "autoRaf", "rafPriority", "className"]);
|
|
3857
|
+
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) => {
|
|
3858
|
+
j.current.push({ callback: r3, priority: e3 }), j.current.sort((r4, e4) => r4.priority - e4.priority);
|
|
3859
|
+
}, []), E3 = (0, import_react5.useCallback)((r3) => {
|
|
3860
|
+
j.current = j.current.filter((e3) => e3.callback !== r3);
|
|
3861
|
+
}, []);
|
|
3862
|
+
(0, import_react5.useImperativeHandle)(a3, () => ({ wrapper: h.current, content: w.current, lenis: k2 }), [k2]), (0, import_react5.useEffect)(() => {
|
|
3863
|
+
const r3 = new Lenis(Object.assign(Object.assign({}, b3), !p2 && { wrapper: h.current, content: w.current }));
|
|
3864
|
+
return N2(r3), () => {
|
|
3865
|
+
r3.destroy(), N2(void 0);
|
|
3866
|
+
};
|
|
3867
|
+
}, [p2, JSON.stringify(b3)]), f((r3) => {
|
|
3868
|
+
y3 && (null == k2 || k2.raf(r3));
|
|
3869
|
+
}, v), (0, import_react5.useEffect)(() => {
|
|
3870
|
+
p2 && k2 && m.setState({ lenis: k2, addCallback: C, removeCallback: E3 });
|
|
3871
|
+
}, [p2, k2, C, E3]);
|
|
3872
|
+
const P2 = (0, import_react5.useCallback)((r3) => {
|
|
3873
|
+
for (let e3 = 0; e3 < j.current.length; e3++) j.current[e3].callback(r3);
|
|
3874
|
+
}, []);
|
|
3875
|
+
(0, import_react5.useEffect)(() => (null == k2 || k2.on("scroll", P2), () => {
|
|
3876
|
+
null == k2 || k2.off("scroll", P2);
|
|
3877
|
+
}), [k2, P2]);
|
|
3878
|
+
const S = (0, import_react5.useCallback)(() => {
|
|
3879
|
+
h.current && (h.current.className = clsx_default(null == k2 ? void 0 : k2.className, O2));
|
|
3880
|
+
}, [k2, O2]);
|
|
3881
|
+
return (0, import_react5.useEffect)(() => (S(), null == k2 || k2.on("className change", S), () => {
|
|
3882
|
+
null == k2 || k2.off("className change", S);
|
|
3883
|
+
}), [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)));
|
|
3884
|
+
});
|
|
3885
|
+
|
|
3886
|
+
// src/providers/smooth-scroll-provider.tsx
|
|
3887
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
3888
|
+
function SmoothScrollProvider({ children }) {
|
|
3889
|
+
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 }) });
|
|
3890
|
+
}
|
|
3891
|
+
|
|
3892
|
+
// src/theme/providers/theme-provider.tsx
|
|
3893
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
3894
|
+
function ThemeProvider({ children, ...props }) {
|
|
3895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(J, { ...props, children });
|
|
3896
|
+
}
|
|
3897
|
+
var theme_provider_default = ThemeProvider;
|
|
322
3898
|
// Annotate the CommonJS export names for ESM import in node:
|
|
323
3899
|
0 && (module.exports = {
|
|
3900
|
+
BasicLayout,
|
|
324
3901
|
Button,
|
|
325
3902
|
CardTitle,
|
|
326
3903
|
Footer,
|
|
327
3904
|
Header,
|
|
328
3905
|
PageTitle,
|
|
329
3906
|
SectionTitle,
|
|
3907
|
+
SmoothScrollProvider,
|
|
330
3908
|
SubTitle,
|
|
3909
|
+
ThemeProvider,
|
|
3910
|
+
ThemeToggle,
|
|
3911
|
+
cn,
|
|
331
3912
|
useForceRerender
|
|
332
3913
|
});
|
|
3914
|
+
/*! Bundled license information:
|
|
3915
|
+
|
|
3916
|
+
use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
|
|
3917
|
+
(**
|
|
3918
|
+
* @license React
|
|
3919
|
+
* use-sync-external-store-shim.production.js
|
|
3920
|
+
*
|
|
3921
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3922
|
+
*
|
|
3923
|
+
* This source code is licensed under the MIT license found in the
|
|
3924
|
+
* LICENSE file in the root directory of this source tree.
|
|
3925
|
+
*)
|
|
3926
|
+
|
|
3927
|
+
use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
|
|
3928
|
+
(**
|
|
3929
|
+
* @license React
|
|
3930
|
+
* use-sync-external-store-shim.development.js
|
|
3931
|
+
*
|
|
3932
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3933
|
+
*
|
|
3934
|
+
* This source code is licensed under the MIT license found in the
|
|
3935
|
+
* LICENSE file in the root directory of this source tree.
|
|
3936
|
+
*)
|
|
3937
|
+
|
|
3938
|
+
use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
|
|
3939
|
+
(**
|
|
3940
|
+
* @license React
|
|
3941
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
3942
|
+
*
|
|
3943
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3944
|
+
*
|
|
3945
|
+
* This source code is licensed under the MIT license found in the
|
|
3946
|
+
* LICENSE file in the root directory of this source tree.
|
|
3947
|
+
*)
|
|
3948
|
+
|
|
3949
|
+
use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
|
|
3950
|
+
(**
|
|
3951
|
+
* @license React
|
|
3952
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
3953
|
+
*
|
|
3954
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3955
|
+
*
|
|
3956
|
+
* This source code is licensed under the MIT license found in the
|
|
3957
|
+
* LICENSE file in the root directory of this source tree.
|
|
3958
|
+
*)
|
|
3959
|
+
*/
|
|
333
3960
|
//# sourceMappingURL=index.js.map
|