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