sunpeak 0.2.6 → 0.3.3

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.
Files changed (79) hide show
  1. package/README.md +32 -17
  2. package/dist/chatgpt/chatgpt-simulator-types.d.ts +8 -0
  3. package/dist/chatgpt/chatgpt-simulator.d.ts +11 -0
  4. package/dist/chatgpt/conversation.d.ts +11 -0
  5. package/dist/chatgpt/index.d.ts +3 -0
  6. package/dist/chatgpt/mcp-provider.d.ts +25 -0
  7. package/dist/chatgpt/mock-openai.d.ts +61 -0
  8. package/dist/chatgpt/openai-provider.d.ts +19 -0
  9. package/dist/chatgpt/openai-types.d.ts +81 -0
  10. package/dist/chatgpt/simple-sidebar.d.ts +22 -0
  11. package/dist/chatgpt/theme-provider.d.ts +13 -0
  12. package/dist/hooks/index.d.ts +14 -0
  13. package/dist/hooks/use-display-mode.d.ts +2 -0
  14. package/dist/hooks/use-locale.d.ts +1 -0
  15. package/dist/hooks/use-max-height.d.ts +1 -0
  16. package/dist/hooks/use-mobile.d.ts +1 -0
  17. package/dist/hooks/use-safe-area.d.ts +2 -0
  18. package/dist/hooks/use-theme.d.ts +2 -0
  19. package/dist/hooks/use-tool-input.d.ts +2 -0
  20. package/dist/hooks/use-tool-response-metadata.d.ts +2 -0
  21. package/dist/hooks/use-user-agent.d.ts +2 -0
  22. package/dist/hooks/use-view.d.ts +2 -0
  23. package/dist/hooks/use-widget-api.d.ts +8 -0
  24. package/dist/hooks/use-widget-global.d.ts +9 -0
  25. package/dist/hooks/use-widget-props.d.ts +1 -0
  26. package/dist/hooks/use-widget-state.d.ts +4 -0
  27. package/dist/index.cjs +3310 -666
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.ts +5 -366
  30. package/dist/index.js +3325 -640
  31. package/dist/index.js.map +1 -1
  32. package/dist/lib/index.d.ts +2 -0
  33. package/dist/lib/media-queries.d.ts +3 -0
  34. package/dist/lib/utils.d.ts +2 -0
  35. package/dist/mcp/index.cjs +799 -64
  36. package/dist/mcp/index.cjs.map +1 -1
  37. package/dist/mcp/index.d.ts +1 -12
  38. package/dist/mcp/index.js +786 -44
  39. package/dist/mcp/index.js.map +1 -1
  40. package/dist/mcp/server.d.ts +10 -0
  41. package/dist/mcp/types.d.ts +74 -0
  42. package/dist/providers/index.d.ts +40 -0
  43. package/dist/providers/types.d.ts +71 -0
  44. package/dist/style.css +5279 -0
  45. package/dist/test/setup.d.ts +0 -0
  46. package/dist/types/index.d.ts +2 -0
  47. package/package.json +15 -20
  48. package/template/README.md +3 -6
  49. package/template/dev/main.tsx +0 -1
  50. package/template/mcp/server.ts +1 -1
  51. package/template/package.json +4 -14
  52. package/template/src/App.tsx +7 -8
  53. package/template/src/components/index.ts +2 -2
  54. package/template/src/components/openai-card.test.tsx +73 -0
  55. package/template/src/components/openai-card.tsx +126 -0
  56. package/template/src/components/openai-carousel.test.tsx +84 -0
  57. package/template/src/components/openai-carousel.tsx +178 -0
  58. package/template/src/styles/globals.css +5 -216
  59. package/template/vite.config.build.ts +61 -0
  60. package/template/vite.config.ts +0 -2
  61. package/dist/index.d.cts +0 -366
  62. package/dist/mcp/index.d.cts +0 -12
  63. package/dist/styles/chatgpt/index.css +0 -146
  64. package/dist/styles/globals.css +0 -219
  65. package/template/components.json +0 -21
  66. package/template/dev/styles.css +0 -6
  67. package/template/postcss.config.js +0 -5
  68. package/template/src/components/shadcn/button.tsx +0 -60
  69. package/template/src/components/shadcn/card.tsx +0 -76
  70. package/template/src/components/shadcn/carousel.tsx +0 -260
  71. package/template/src/components/shadcn/index.ts +0 -5
  72. package/template/src/components/shadcn/label.tsx +0 -24
  73. package/template/src/components/shadcn/select.tsx +0 -157
  74. package/template/src/components/sunpeak-card.test.tsx +0 -76
  75. package/template/src/components/sunpeak-card.tsx +0 -171
  76. package/template/src/components/sunpeak-carousel.test.tsx +0 -42
  77. package/template/src/components/sunpeak-carousel.tsx +0 -160
  78. package/template/src/styles/chatgpt.css +0 -146
  79. package/template/tsup.config.ts +0 -50
package/dist/index.cjs CHANGED
@@ -1,86 +1,38 @@
1
- 'use strict';
2
-
3
- var React3 = require('react');
4
- var jsxRuntime = require('react/jsx-runtime');
5
- var reactSlot = require('@radix-ui/react-slot');
6
- var classVarianceAuthority = require('class-variance-authority');
7
- var lucideReact = require('lucide-react');
8
- var clsx = require('clsx');
9
- var tailwindMerge = require('tailwind-merge');
10
- var SheetPrimitive = require('@radix-ui/react-dialog');
11
- var TooltipPrimitive = require('@radix-ui/react-tooltip');
12
- var SelectPrimitive = require('@radix-ui/react-select');
13
- var LabelPrimitive = require('@radix-ui/react-label');
14
-
15
- function _interopNamespace(e) {
16
- if (e && e.__esModule) return e;
17
- var n = Object.create(null);
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
6
+ const React = require("react");
7
+ const jsxRuntime = require("react/jsx-runtime");
8
+ function _interopNamespaceDefault(e) {
9
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
18
10
  if (e) {
19
- Object.keys(e).forEach(function (k) {
20
- if (k !== 'default') {
21
- var d = Object.getOwnPropertyDescriptor(e, k);
11
+ for (const k in e) {
12
+ if (k !== "default") {
13
+ const d = Object.getOwnPropertyDescriptor(e, k);
22
14
  Object.defineProperty(n, k, d.get ? d : {
23
15
  enumerable: true,
24
- get: function () { return e[k]; }
16
+ get: () => e[k]
25
17
  });
26
18
  }
27
- });
19
+ }
28
20
  }
29
21
  n.default = e;
30
22
  return Object.freeze(n);
31
23
  }
32
-
33
- var React3__namespace = /*#__PURE__*/_interopNamespace(React3);
34
- var SheetPrimitive__namespace = /*#__PURE__*/_interopNamespace(SheetPrimitive);
35
- var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
36
- var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
37
- var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
38
-
39
- var __defProp = Object.defineProperty;
40
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
41
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
42
- var ThemeProviderContext = React3__namespace.createContext(
43
- void 0
44
- );
45
- function ThemeProvider({
46
- children,
47
- defaultTheme = "light",
48
- theme: controlledTheme,
49
- ...props
50
- }) {
51
- const [internalTheme] = React3__namespace.useState(defaultTheme);
52
- const theme = controlledTheme ?? internalTheme;
53
- React3__namespace.useEffect(() => {
54
- const root = window.document.documentElement;
55
- root.classList.remove("light", "dark");
56
- root.classList.add(theme);
57
- }, [theme]);
58
- const value = {
59
- theme
60
- };
61
- return /* @__PURE__ */ jsxRuntime.jsx(ThemeProviderContext.Provider, { ...props, value, children });
62
- }
63
- var useThemeContext = () => {
64
- const context = React3__namespace.useContext(ThemeProviderContext);
65
- if (context === void 0)
66
- throw new Error("useThemeContext must be used within a ThemeProvider");
67
- return context;
68
- };
69
-
70
- // src/types/openai.ts
71
- var SET_GLOBALS_EVENT_TYPE = "openai:set_globals";
72
- var SetGlobalsEvent = class extends CustomEvent {
24
+ const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
25
+ const SET_GLOBALS_EVENT_TYPE = "openai:set_globals";
26
+ class SetGlobalsEvent extends CustomEvent {
73
27
  constructor() {
74
28
  super(...arguments);
75
29
  __publicField(this, "type", SET_GLOBALS_EVENT_TYPE);
76
30
  }
77
- };
78
-
79
- // src/providers/openai.ts
31
+ }
80
32
  function isOpenAiAvailable() {
81
33
  return typeof window !== "undefined" && window.openai != null;
82
34
  }
83
- var OpenAiProvider = class {
35
+ class OpenAiProvider {
84
36
  constructor() {
85
37
  __publicField(this, "id", "openai");
86
38
  }
@@ -108,32 +60,31 @@ var OpenAiProvider = class {
108
60
  };
109
61
  }
110
62
  getAPI() {
63
+ var _a, _b, _c, _d, _e, _f, _g;
111
64
  if (typeof window === "undefined" || !window.openai) {
112
65
  return null;
113
66
  }
114
67
  const api = window.openai;
115
68
  return {
116
- callTool: api.callTool?.bind(api),
117
- sendFollowUpMessage: api.sendFollowUpMessage?.bind(api),
118
- openExternal: api.openExternal?.bind(api),
119
- requestDisplayMode: api.requestDisplayMode?.bind(api),
120
- requestModal: api.requestModal?.bind(api),
121
- notifyIntrinsicHeight: api.notifyIntrinsicHeight?.bind(api),
122
- setWidgetState: api.setWidgetState?.bind(api)
69
+ callTool: (_a = api.callTool) == null ? void 0 : _a.bind(api),
70
+ sendFollowUpMessage: (_b = api.sendFollowUpMessage) == null ? void 0 : _b.bind(api),
71
+ openExternal: (_c = api.openExternal) == null ? void 0 : _c.bind(api),
72
+ requestDisplayMode: (_d = api.requestDisplayMode) == null ? void 0 : _d.bind(api),
73
+ requestModal: (_e = api.requestModal) == null ? void 0 : _e.bind(api),
74
+ notifyIntrinsicHeight: (_f = api.notifyIntrinsicHeight) == null ? void 0 : _f.bind(api),
75
+ setWidgetState: (_g = api.setWidgetState) == null ? void 0 : _g.bind(api)
123
76
  };
124
77
  }
125
- };
126
- var openAiProvider = null;
78
+ }
79
+ let openAiProvider = null;
127
80
  function getOpenAiProvider() {
128
81
  if (!openAiProvider) {
129
82
  openAiProvider = new OpenAiProvider();
130
83
  }
131
84
  return openAiProvider;
132
85
  }
133
-
134
- // src/providers/index.ts
135
- var cachedProvider = null;
136
- var detectionComplete = false;
86
+ let cachedProvider = null;
87
+ let detectionComplete = false;
137
88
  function getProvider() {
138
89
  if (detectionComplete) {
139
90
  return cachedProvider;
@@ -149,52 +100,44 @@ function isProviderAvailable() {
149
100
  }
150
101
  function getGlobal(key) {
151
102
  const provider = getProvider();
152
- return provider?.getGlobal(key) ?? null;
103
+ return (provider == null ? void 0 : provider.getGlobal(key)) ?? null;
153
104
  }
154
105
  function subscribeToGlobal(key, onChange) {
155
106
  const provider = getProvider();
156
- return provider?.subscribe(key, onChange) ?? (() => {
107
+ return (provider == null ? void 0 : provider.subscribe(key, onChange)) ?? (() => {
157
108
  });
158
109
  }
159
110
  function getAPI() {
160
111
  const provider = getProvider();
161
- return provider?.getAPI() ?? null;
112
+ return (provider == null ? void 0 : provider.getAPI()) ?? null;
162
113
  }
163
114
  function resetProviderCache() {
164
115
  cachedProvider = null;
165
116
  detectionComplete = false;
166
117
  }
167
-
168
- // src/hooks/use-widget-global.ts
169
118
  function useWidgetGlobal(key) {
170
- return React3.useSyncExternalStore(
119
+ return React.useSyncExternalStore(
171
120
  (onChange) => subscribeToGlobal(key, onChange),
172
121
  () => getGlobal(key),
173
122
  () => getGlobal(key)
174
123
  );
175
124
  }
176
125
  function useWidgetAPI() {
177
- return React3.useMemo(() => getAPI(), []);
126
+ return React.useMemo(() => getAPI(), []);
178
127
  }
179
-
180
- // src/hooks/use-display-mode.ts
181
- var useDisplayMode = () => {
128
+ const useDisplayMode = () => {
182
129
  return useWidgetGlobal("displayMode");
183
130
  };
184
-
185
- // src/hooks/use-locale.ts
186
- var useLocale = () => {
131
+ const useLocale = () => {
187
132
  return useWidgetGlobal("locale");
188
133
  };
189
-
190
- // src/hooks/use-max-height.ts
191
- var useMaxHeight = () => {
134
+ const useMaxHeight = () => {
192
135
  return useWidgetGlobal("maxHeight");
193
136
  };
194
- var MOBILE_BREAKPOINT = 768;
137
+ const MOBILE_BREAKPOINT = 768;
195
138
  function useIsMobile() {
196
- const [isMobile, setIsMobile] = React3__namespace.useState(void 0);
197
- React3__namespace.useEffect(() => {
139
+ const [isMobile, setIsMobile] = React__namespace.useState(void 0);
140
+ React__namespace.useEffect(() => {
198
141
  const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
199
142
  const onChange = () => {
200
143
  setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
@@ -205,38 +148,24 @@ function useIsMobile() {
205
148
  }, []);
206
149
  return !!isMobile;
207
150
  }
208
-
209
- // src/hooks/use-safe-area.ts
210
- var useSafeArea = () => {
151
+ const useSafeArea = () => {
211
152
  return useWidgetGlobal("safeArea");
212
153
  };
213
-
214
- // src/hooks/use-theme.ts
215
- var useTheme = () => {
154
+ const useTheme = () => {
216
155
  return useWidgetGlobal("theme");
217
156
  };
218
-
219
- // src/hooks/use-tool-input.ts
220
157
  function useToolInput() {
221
158
  return useWidgetGlobal("toolInput");
222
159
  }
223
-
224
- // src/hooks/use-tool-response-metadata.ts
225
160
  function useToolResponseMetadata() {
226
161
  return useWidgetGlobal("toolResponseMetadata");
227
162
  }
228
-
229
- // src/hooks/use-user-agent.ts
230
- var useUserAgent = () => {
163
+ const useUserAgent = () => {
231
164
  return useWidgetGlobal("userAgent");
232
165
  };
233
-
234
- // src/hooks/use-view.ts
235
166
  function useView() {
236
167
  return useWidgetGlobal("view");
237
168
  }
238
-
239
- // src/hooks/use-widget-props.ts
240
169
  function useWidgetProps(defaultState) {
241
170
  const props = useWidgetGlobal("toolOutput");
242
171
  const fallback = typeof defaultState === "function" ? defaultState() : defaultState ?? null;
@@ -245,20 +174,20 @@ function useWidgetProps(defaultState) {
245
174
  function useWidgetState(defaultState) {
246
175
  const widgetStateFromProvider = useWidgetGlobal("widgetState");
247
176
  const api = useWidgetAPI();
248
- const [widgetState, _setWidgetState] = React3.useState(() => {
177
+ const [widgetState, _setWidgetState] = React.useState(() => {
249
178
  if (widgetStateFromProvider != null) {
250
179
  return widgetStateFromProvider;
251
180
  }
252
181
  return typeof defaultState === "function" ? defaultState() : defaultState ?? null;
253
182
  });
254
- React3.useEffect(() => {
183
+ React.useEffect(() => {
255
184
  _setWidgetState(widgetStateFromProvider);
256
185
  }, [widgetStateFromProvider]);
257
- const setWidgetState = React3.useCallback(
186
+ const setWidgetState = React.useCallback(
258
187
  (state) => {
259
188
  _setWidgetState((prevState) => {
260
189
  const newState = typeof state === "function" ? state(prevState) : state;
261
- if (newState != null && api?.setWidgetState) {
190
+ if (newState != null && (api == null ? void 0 : api.setWidgetState)) {
262
191
  api.setWidgetState(newState);
263
192
  }
264
193
  return newState;
@@ -268,517 +197,3196 @@ function useWidgetState(defaultState) {
268
197
  );
269
198
  return [widgetState, setWidgetState];
270
199
  }
271
- function cn(...inputs) {
272
- return tailwindMerge.twMerge(clsx.clsx(inputs));
273
- }
274
-
275
- // src/lib/media-queries.ts
276
- function matchMediaQuery(query) {
277
- return window.matchMedia(query).matches;
278
- }
279
- function createMediaQueryFn(query) {
280
- return () => matchMediaQuery(query);
281
- }
282
- var prefersReducedMotion = createMediaQueryFn(
283
- "(prefers-reduced-motion: reduce)"
284
- );
285
- var isPrimarilyTouchDevice = createMediaQueryFn("(pointer: coarse)");
286
- var isHoverAvailable = createMediaQueryFn("(hover: hover)");
287
- function Sheet({ ...props }) {
288
- return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Root, { "data-slot": "sheet", ...props });
200
+ const ChevronDown = (props) => jsxRuntime.jsx("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M4.293 8.293a1 1 0 0 1 1.414 0L12 14.586l6.293-6.293a1 1 0 1 1 1.414 1.414l-7 7a1 1 0 0 1-1.414 0l-7-7a1 1 0 0 1 0-1.414Z", clipRule: "evenodd" }) });
201
+ function SimpleSidebar({ children, controls }) {
202
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-screen w-full", children: [
203
+ /* @__PURE__ */ jsxRuntime.jsx("aside", { className: "hidden md:flex w-64 flex-col border-r border-subtle bg-background", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-auto p-4", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
204
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-sm font-semibold mb-4", children: "Controls" }),
205
+ controls
206
+ ] }) }) }) }),
207
+ /* @__PURE__ */ jsxRuntime.jsx("main", { className: "flex-1 overflow-auto", children })
208
+ ] });
289
209
  }
290
- function SheetPortal({
291
- ...props
292
- }) {
293
- return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Portal, { "data-slot": "sheet-portal", ...props });
210
+ function SidebarControl({ label, children }) {
211
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
212
+ /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-xs font-medium text-secondary", children: label }),
213
+ children
214
+ ] });
294
215
  }
295
- function SheetOverlay({
296
- className,
297
- ...props
298
- }) {
299
- return /* @__PURE__ */ jsxRuntime.jsx(
300
- SheetPrimitive__namespace.Overlay,
301
- {
302
- "data-slot": "sheet-overlay",
303
- className: cn(
304
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
305
- className
306
- ),
307
- ...props
216
+ function SidebarSelect({ value, onChange, options, placeholder }) {
217
+ const [isOpen, setIsOpen] = React.useState(false);
218
+ const [highlightedIndex, setHighlightedIndex] = React.useState(-1);
219
+ const containerRef = React.useRef(null);
220
+ const listRef = React.useRef(null);
221
+ const selectedOption = options.find((opt) => opt.value === value);
222
+ React.useEffect(() => {
223
+ const handleClickOutside = (event) => {
224
+ if (containerRef.current && !containerRef.current.contains(event.target)) {
225
+ setIsOpen(false);
226
+ }
227
+ };
228
+ const handleKeyDown = (event) => {
229
+ if (!isOpen) return;
230
+ switch (event.key) {
231
+ case "Escape":
232
+ setIsOpen(false);
233
+ break;
234
+ case "ArrowDown":
235
+ event.preventDefault();
236
+ setHighlightedIndex(
237
+ (prev) => prev < options.length - 1 ? prev + 1 : 0
238
+ );
239
+ break;
240
+ case "ArrowUp":
241
+ event.preventDefault();
242
+ setHighlightedIndex(
243
+ (prev) => prev > 0 ? prev - 1 : options.length - 1
244
+ );
245
+ break;
246
+ case "Enter":
247
+ event.preventDefault();
248
+ if (highlightedIndex >= 0 && highlightedIndex < options.length) {
249
+ onChange(options[highlightedIndex].value);
250
+ setIsOpen(false);
251
+ }
252
+ break;
253
+ }
254
+ };
255
+ document.addEventListener("mousedown", handleClickOutside);
256
+ document.addEventListener("keydown", handleKeyDown);
257
+ return () => {
258
+ document.removeEventListener("mousedown", handleClickOutside);
259
+ document.removeEventListener("keydown", handleKeyDown);
260
+ };
261
+ }, [isOpen, highlightedIndex, options, onChange]);
262
+ const handleToggle = () => {
263
+ if (!isOpen) {
264
+ const selectedIndex = options.findIndex((opt) => opt.value === value);
265
+ setHighlightedIndex(selectedIndex >= 0 ? selectedIndex : 0);
308
266
  }
309
- );
310
- }
311
- function SheetContent({
312
- className,
313
- children,
314
- side = "right",
315
- ...props
316
- }) {
317
- return /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
318
- /* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, {}),
267
+ setIsOpen(!isOpen);
268
+ };
269
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: "relative", children: [
319
270
  /* @__PURE__ */ jsxRuntime.jsxs(
320
- SheetPrimitive__namespace.Content,
271
+ "button",
321
272
  {
322
- "data-slot": "sheet-content",
323
- className: cn(
324
- "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
325
- side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
326
- side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
327
- side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
328
- side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
329
- className
330
- ),
331
- ...props,
273
+ type: "button",
274
+ onClick: handleToggle,
275
+ className: `
276
+ relative inline-flex items-center justify-between w-full
277
+ h-[var(--control-size-sm)] px-[var(--control-gutter-sm)]
278
+ rounded-[var(--control-radius-sm)]
279
+ text-[var(--control-font-size-md)] font-normal leading-[var(--font-text-md-line-height)]
280
+ text-left cursor-pointer select-none whitespace-nowrap
281
+ transition-[color] duration-[var(--transition-duration-basic)] ease-[var(--transition-ease-basic)]
282
+ before:absolute before:inset-0 before:block before:rounded-[inherit]
283
+ before:bg-transparent before:transition-[opacity,background-color,transform,box-shadow,border-color]
284
+ before:duration-[var(--transition-duration-basic)] before:ease-[var(--transition-ease-basic)]
285
+ before:shadow-[0_0_0_1px_var(--input-outline-border-color)_inset]
286
+ hover:before:shadow-[0_0_0_1px_var(--input-outline-border-color-hover)_inset]
287
+ focus:outline-none focus-visible:after:outline focus-visible:after:outline-2
288
+ focus-visible:after:outline-[var(--color-ring)] focus-visible:after:outline-offset-[-1px]
289
+ after:absolute after:inset-0 after:block after:rounded-[inherit] after:pointer-events-none
290
+ after:transition-[transform] after:duration-[var(--transition-duration-basic)] after:ease-[var(--transition-ease-basic)]
291
+ ${isOpen ? "before:shadow-[0_0_0_1px_var(--input-outline-border-color-hover)_inset]" : ""}
292
+ ${!selectedOption ? "text-[var(--input-placeholder-text-color)]" : ""}
293
+ `,
294
+ "aria-expanded": isOpen,
295
+ "aria-haspopup": "listbox",
332
296
  children: [
333
- children,
334
- /* @__PURE__ */ jsxRuntime.jsxs(SheetPrimitive__namespace.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
335
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { className: "size-4" }),
336
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
337
- ] })
297
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative flex-1 overflow-hidden text-ellipsis whitespace-nowrap", children: (selectedOption == null ? void 0 : selectedOption.label) || placeholder || "Select..." }),
298
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative flex items-center gap-[var(--spacing)]", children: /* @__PURE__ */ jsxRuntime.jsx(
299
+ ChevronDown,
300
+ {
301
+ className: `
302
+ relative text-secondary opacity-75
303
+ transition-opacity duration-[var(--transition-duration-basic)] ease-[var(--transition-ease-basic)]
304
+ ${isOpen ? "opacity-100" : ""}
305
+ `
306
+ }
307
+ ) })
338
308
  ]
339
309
  }
310
+ ),
311
+ isOpen && /* @__PURE__ */ jsxRuntime.jsx(
312
+ "div",
313
+ {
314
+ ref: listRef,
315
+ className: `
316
+ absolute z-50 mt-1 w-full min-w-[200px]
317
+ rounded-[var(--menu-radius)] bg-[var(--color-surface-elevated)]
318
+ shadow-[var(--shadow)] [box-shadow:var(--shadow),var(--shadow-hairline)]
319
+ text-[var(--menu-font-size)] leading-[var(--menu-line-height)]
320
+ select-none origin-top
321
+ animate-in fade-in-0 zoom-in-95 duration-200
322
+ `,
323
+ role: "listbox",
324
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col max-h-[min(400px,calc(100vh-200px))] focus:outline-none", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-auto flex-1 p-[var(--menu-gutter)]", children: options.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(
325
+ "div",
326
+ {
327
+ role: "option",
328
+ "aria-selected": option.value === value,
329
+ onClick: () => {
330
+ onChange(option.value);
331
+ setIsOpen(false);
332
+ },
333
+ onMouseEnter: () => setHighlightedIndex(index),
334
+ className: `
335
+ relative px-[var(--menu-item-padding-x,12px)] py-[var(--menu-item-padding-y,8px)]
336
+ cursor-pointer break-words scroll-m-[15px]
337
+ before:absolute before:inset-0 before:block
338
+ before:rounded-[calc(var(--menu-radius)-var(--menu-gutter))]
339
+ before:bg-[var(--menu-item-background-color)]
340
+ before:opacity-0 before:scale-[0.98]
341
+ before:transition-[opacity,background-color,transform]
342
+ before:duration-[var(--transition-duration-basic)]
343
+ before:ease-[var(--cubic-enter)]
344
+ ${option.value === value ? "font-semibold" : ""}
345
+ ${highlightedIndex === index ? "before:opacity-100 before:scale-100" : ""}
346
+ `,
347
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative flex items-center gap-[var(--spacing)]", children: option.label })
348
+ },
349
+ option.value
350
+ )) }) })
351
+ }
340
352
  )
341
353
  ] });
342
354
  }
343
- function SheetHeader({ className, ...props }) {
344
- return /* @__PURE__ */ jsxRuntime.jsx(
345
- "div",
346
- {
347
- "data-slot": "sheet-header",
348
- className: cn("flex flex-col gap-1.5 p-4", className),
349
- ...props
350
- }
351
- );
355
+ function r(e) {
356
+ var t, f, n = "";
357
+ if ("string" == typeof e || "number" == typeof e) n += e;
358
+ else if ("object" == typeof e) if (Array.isArray(e)) {
359
+ var o = e.length;
360
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
361
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
362
+ return n;
352
363
  }
353
- function SheetTitle({
354
- className,
355
- ...props
356
- }) {
357
- return /* @__PURE__ */ jsxRuntime.jsx(
358
- SheetPrimitive__namespace.Title,
359
- {
360
- "data-slot": "sheet-title",
361
- className: cn("text-foreground font-semibold", className),
362
- ...props
363
- }
364
- );
364
+ function clsx() {
365
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
366
+ return n;
365
367
  }
366
- function SheetDescription({
367
- className,
368
- ...props
369
- }) {
370
- return /* @__PURE__ */ jsxRuntime.jsx(
371
- SheetPrimitive__namespace.Description,
372
- {
373
- "data-slot": "sheet-description",
374
- className: cn("text-muted-foreground text-sm", className),
375
- ...props
368
+ const concatArrays = (array1, array2) => {
369
+ const combinedArray = new Array(array1.length + array2.length);
370
+ for (let i = 0; i < array1.length; i++) {
371
+ combinedArray[i] = array1[i];
372
+ }
373
+ for (let i = 0; i < array2.length; i++) {
374
+ combinedArray[array1.length + i] = array2[i];
375
+ }
376
+ return combinedArray;
377
+ };
378
+ const createClassValidatorObject = (classGroupId, validator) => ({
379
+ classGroupId,
380
+ validator
381
+ });
382
+ const createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators = null, classGroupId) => ({
383
+ nextPart,
384
+ validators,
385
+ classGroupId
386
+ });
387
+ const CLASS_PART_SEPARATOR = "-";
388
+ const EMPTY_CONFLICTS = [];
389
+ const ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
390
+ const createClassGroupUtils = (config) => {
391
+ const classMap = createClassMap(config);
392
+ const {
393
+ conflictingClassGroups,
394
+ conflictingClassGroupModifiers
395
+ } = config;
396
+ const getClassGroupId = (className) => {
397
+ if (className.startsWith("[") && className.endsWith("]")) {
398
+ return getGroupIdForArbitraryProperty(className);
376
399
  }
377
- );
378
- }
379
- function TooltipProvider({
380
- delayDuration = 0,
381
- ...props
382
- }) {
383
- return /* @__PURE__ */ jsxRuntime.jsx(
384
- TooltipPrimitive__namespace.Provider,
385
- {
386
- "data-slot": "tooltip-provider",
387
- delayDuration,
388
- ...props
400
+ const classParts = className.split(CLASS_PART_SEPARATOR);
401
+ const startIndex = classParts[0] === "" && classParts.length > 1 ? 1 : 0;
402
+ return getGroupRecursive(classParts, startIndex, classMap);
403
+ };
404
+ const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
405
+ if (hasPostfixModifier) {
406
+ const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
407
+ const baseConflicts = conflictingClassGroups[classGroupId];
408
+ if (modifierConflicts) {
409
+ if (baseConflicts) {
410
+ return concatArrays(baseConflicts, modifierConflicts);
411
+ }
412
+ return modifierConflicts;
413
+ }
414
+ return baseConflicts || EMPTY_CONFLICTS;
389
415
  }
390
- );
391
- }
392
- var SIDEBAR_COOKIE_NAME = "sidebar_state";
393
- var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
394
- var SIDEBAR_WIDTH = "16rem";
395
- var SIDEBAR_WIDTH_MOBILE = "18rem";
396
- var SIDEBAR_WIDTH_ICON = "3rem";
397
- var SIDEBAR_KEYBOARD_SHORTCUT = "b";
398
- var SidebarContext = React3__namespace.createContext(null);
399
- function useSidebar() {
400
- const context = React3__namespace.useContext(SidebarContext);
401
- if (!context) {
402
- throw new Error("useSidebar must be used within a SidebarProvider.");
416
+ return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
417
+ };
418
+ return {
419
+ getClassGroupId,
420
+ getConflictingClassGroupIds
421
+ };
422
+ };
423
+ const getGroupRecursive = (classParts, startIndex, classPartObject) => {
424
+ const classPathsLength = classParts.length - startIndex;
425
+ if (classPathsLength === 0) {
426
+ return classPartObject.classGroupId;
403
427
  }
404
- return context;
405
- }
406
- function SidebarProvider({
407
- defaultOpen = true,
408
- open: openProp,
409
- onOpenChange: setOpenProp,
410
- className,
411
- style,
412
- children,
413
- ...props
414
- }) {
415
- const isMobile = useIsMobile();
416
- const [openMobile, setOpenMobile] = React3__namespace.useState(false);
417
- const [_open, _setOpen] = React3__namespace.useState(defaultOpen);
418
- const open = openProp ?? _open;
419
- const setOpen = React3__namespace.useCallback(
420
- (value) => {
421
- const openState = typeof value === "function" ? value(open) : value;
422
- if (setOpenProp) {
423
- setOpenProp(openState);
424
- } else {
425
- _setOpen(openState);
428
+ const currentClassPart = classParts[startIndex];
429
+ const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
430
+ if (nextClassPartObject) {
431
+ const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
432
+ if (result) return result;
433
+ }
434
+ const validators = classPartObject.validators;
435
+ if (validators === null) {
436
+ return void 0;
437
+ }
438
+ const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
439
+ const validatorsLength = validators.length;
440
+ for (let i = 0; i < validatorsLength; i++) {
441
+ const validatorObj = validators[i];
442
+ if (validatorObj.validator(classRest)) {
443
+ return validatorObj.classGroupId;
444
+ }
445
+ }
446
+ return void 0;
447
+ };
448
+ const getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
449
+ const content = className.slice(1, -1);
450
+ const colonIndex = content.indexOf(":");
451
+ const property = content.slice(0, colonIndex);
452
+ return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
453
+ })();
454
+ const createClassMap = (config) => {
455
+ const {
456
+ theme,
457
+ classGroups
458
+ } = config;
459
+ return processClassGroups(classGroups, theme);
460
+ };
461
+ const processClassGroups = (classGroups, theme) => {
462
+ const classMap = createClassPartObject();
463
+ for (const classGroupId in classGroups) {
464
+ const group = classGroups[classGroupId];
465
+ processClassesRecursively(group, classMap, classGroupId, theme);
466
+ }
467
+ return classMap;
468
+ };
469
+ const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
470
+ const len = classGroup.length;
471
+ for (let i = 0; i < len; i++) {
472
+ const classDefinition = classGroup[i];
473
+ processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
474
+ }
475
+ };
476
+ const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
477
+ if (typeof classDefinition === "string") {
478
+ processStringDefinition(classDefinition, classPartObject, classGroupId);
479
+ return;
480
+ }
481
+ if (typeof classDefinition === "function") {
482
+ processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
483
+ return;
484
+ }
485
+ processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
486
+ };
487
+ const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
488
+ const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
489
+ classPartObjectToEdit.classGroupId = classGroupId;
490
+ };
491
+ const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
492
+ if (isThemeGetter(classDefinition)) {
493
+ processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
494
+ return;
495
+ }
496
+ if (classPartObject.validators === null) {
497
+ classPartObject.validators = [];
498
+ }
499
+ classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
500
+ };
501
+ const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
502
+ const entries = Object.entries(classDefinition);
503
+ const len = entries.length;
504
+ for (let i = 0; i < len; i++) {
505
+ const [key, value] = entries[i];
506
+ processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
507
+ }
508
+ };
509
+ const getPart = (classPartObject, path) => {
510
+ let current = classPartObject;
511
+ const parts = path.split(CLASS_PART_SEPARATOR);
512
+ const len = parts.length;
513
+ for (let i = 0; i < len; i++) {
514
+ const part = parts[i];
515
+ let next = current.nextPart.get(part);
516
+ if (!next) {
517
+ next = createClassPartObject();
518
+ current.nextPart.set(part, next);
519
+ }
520
+ current = next;
521
+ }
522
+ return current;
523
+ };
524
+ const isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true;
525
+ const createLruCache = (maxCacheSize) => {
526
+ if (maxCacheSize < 1) {
527
+ return {
528
+ get: () => void 0,
529
+ set: () => {
530
+ }
531
+ };
532
+ }
533
+ let cacheSize = 0;
534
+ let cache = /* @__PURE__ */ Object.create(null);
535
+ let previousCache = /* @__PURE__ */ Object.create(null);
536
+ const update = (key, value) => {
537
+ cache[key] = value;
538
+ cacheSize++;
539
+ if (cacheSize > maxCacheSize) {
540
+ cacheSize = 0;
541
+ previousCache = cache;
542
+ cache = /* @__PURE__ */ Object.create(null);
543
+ }
544
+ };
545
+ return {
546
+ get(key) {
547
+ let value = cache[key];
548
+ if (value !== void 0) {
549
+ return value;
550
+ }
551
+ if ((value = previousCache[key]) !== void 0) {
552
+ update(key, value);
553
+ return value;
426
554
  }
427
- document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
428
555
  },
429
- [setOpenProp, open]
430
- );
431
- const toggleSidebar = React3__namespace.useCallback(() => {
432
- return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
433
- }, [isMobile, setOpen, setOpenMobile]);
434
- React3__namespace.useEffect(() => {
435
- const handleKeyDown = (event) => {
436
- if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
437
- event.preventDefault();
438
- toggleSidebar();
556
+ set(key, value) {
557
+ if (key in cache) {
558
+ cache[key] = value;
559
+ } else {
560
+ update(key, value);
439
561
  }
440
- };
441
- window.addEventListener("keydown", handleKeyDown);
442
- return () => window.removeEventListener("keydown", handleKeyDown);
443
- }, [toggleSidebar]);
444
- const state = open ? "expanded" : "collapsed";
445
- const contextValue = React3__namespace.useMemo(
446
- () => ({
447
- state,
448
- open,
449
- setOpen,
450
- isMobile,
451
- openMobile,
452
- setOpenMobile,
453
- toggleSidebar
454
- }),
455
- [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
456
- );
457
- return /* @__PURE__ */ jsxRuntime.jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsxRuntime.jsx(
458
- "div",
459
- {
460
- "data-slot": "sidebar-wrapper",
461
- style: {
462
- "--sidebar-width": SIDEBAR_WIDTH,
463
- "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
464
- ...style
465
- },
466
- className: cn(
467
- "group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",
468
- className
469
- ),
470
- ...props,
471
- children
472
562
  }
473
- ) }) });
474
- }
475
- function Sidebar({
476
- side = "left",
477
- variant = "sidebar",
478
- collapsible = "offcanvas",
479
- className,
480
- children,
481
- ...props
482
- }) {
483
- const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
484
- if (collapsible === "none") {
485
- return /* @__PURE__ */ jsxRuntime.jsx(
486
- "div",
487
- {
488
- "data-slot": "sidebar",
489
- className: cn(
490
- "bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",
491
- className
492
- ),
493
- ...props,
494
- children
563
+ };
564
+ };
565
+ const IMPORTANT_MODIFIER = "!";
566
+ const MODIFIER_SEPARATOR = ":";
567
+ const EMPTY_MODIFIERS = [];
568
+ const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
569
+ modifiers,
570
+ hasImportantModifier,
571
+ baseClassName,
572
+ maybePostfixModifierPosition,
573
+ isExternal
574
+ });
575
+ const createParseClassName = (config) => {
576
+ const {
577
+ prefix,
578
+ experimentalParseClassName
579
+ } = config;
580
+ let parseClassName = (className) => {
581
+ const modifiers = [];
582
+ let bracketDepth = 0;
583
+ let parenDepth = 0;
584
+ let modifierStart = 0;
585
+ let postfixModifierPosition;
586
+ const len = className.length;
587
+ for (let index = 0; index < len; index++) {
588
+ const currentCharacter = className[index];
589
+ if (bracketDepth === 0 && parenDepth === 0) {
590
+ if (currentCharacter === MODIFIER_SEPARATOR) {
591
+ modifiers.push(className.slice(modifierStart, index));
592
+ modifierStart = index + 1;
593
+ continue;
594
+ }
595
+ if (currentCharacter === "/") {
596
+ postfixModifierPosition = index;
597
+ continue;
598
+ }
495
599
  }
496
- );
600
+ if (currentCharacter === "[") bracketDepth++;
601
+ else if (currentCharacter === "]") bracketDepth--;
602
+ else if (currentCharacter === "(") parenDepth++;
603
+ else if (currentCharacter === ")") parenDepth--;
604
+ }
605
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
606
+ let baseClassName = baseClassNameWithImportantModifier;
607
+ let hasImportantModifier = false;
608
+ if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
609
+ baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
610
+ hasImportantModifier = true;
611
+ } else if (
612
+ /**
613
+ * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
614
+ * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
615
+ */
616
+ baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)
617
+ ) {
618
+ baseClassName = baseClassNameWithImportantModifier.slice(1);
619
+ hasImportantModifier = true;
620
+ }
621
+ const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
622
+ return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
623
+ };
624
+ if (prefix) {
625
+ const fullPrefix = prefix + MODIFIER_SEPARATOR;
626
+ const parseClassNameOriginal = parseClassName;
627
+ parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, void 0, true);
497
628
  }
498
- if (isMobile) {
499
- return /* @__PURE__ */ jsxRuntime.jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(
500
- SheetContent,
501
- {
502
- "data-sidebar": "sidebar",
503
- "data-slot": "sidebar",
504
- "data-mobile": "true",
505
- className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
506
- style: {
507
- "--sidebar-width": SIDEBAR_WIDTH_MOBILE
508
- },
509
- side,
510
- children: [
511
- /* @__PURE__ */ jsxRuntime.jsxs(SheetHeader, { className: "sr-only", children: [
512
- /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: "Sidebar" }),
513
- /* @__PURE__ */ jsxRuntime.jsx(SheetDescription, { children: "Displays the mobile sidebar." })
514
- ] }),
515
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full w-full flex-col", children })
516
- ]
517
- }
518
- ) });
629
+ if (experimentalParseClassName) {
630
+ const parseClassNameOriginal = parseClassName;
631
+ parseClassName = (className) => experimentalParseClassName({
632
+ className,
633
+ parseClassName: parseClassNameOriginal
634
+ });
519
635
  }
520
- return /* @__PURE__ */ jsxRuntime.jsxs(
521
- "div",
522
- {
523
- className: "group peer text-sidebar-foreground hidden md:block",
524
- "data-state": state,
525
- "data-collapsible": state === "collapsed" ? collapsible : "",
526
- "data-variant": variant,
527
- "data-side": side,
528
- "data-slot": "sidebar",
529
- children: [
530
- /* @__PURE__ */ jsxRuntime.jsx(
531
- "div",
532
- {
533
- "data-slot": "sidebar-gap",
534
- className: cn(
535
- "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
536
- "group-data-[collapsible=offcanvas]:w-0",
537
- "group-data-[side=right]:rotate-180",
538
- variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
539
- )
540
- }
541
- ),
542
- /* @__PURE__ */ jsxRuntime.jsx(
543
- "div",
544
- {
545
- "data-slot": "sidebar-container",
546
- className: cn(
547
- "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
548
- side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
549
- variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
550
- className
551
- ),
552
- ...props,
553
- children: /* @__PURE__ */ jsxRuntime.jsx(
554
- "div",
555
- {
556
- "data-sidebar": "sidebar",
557
- "data-slot": "sidebar-inner",
558
- className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",
559
- children
560
- }
561
- )
562
- }
563
- )
564
- ]
636
+ return parseClassName;
637
+ };
638
+ const createSortModifiers = (config) => {
639
+ const modifierWeights = /* @__PURE__ */ new Map();
640
+ config.orderSensitiveModifiers.forEach((mod, index) => {
641
+ modifierWeights.set(mod, 1e6 + index);
642
+ });
643
+ return (modifiers) => {
644
+ const result = [];
645
+ let currentSegment = [];
646
+ for (let i = 0; i < modifiers.length; i++) {
647
+ const modifier = modifiers[i];
648
+ const isArbitrary = modifier[0] === "[";
649
+ const isOrderSensitive = modifierWeights.has(modifier);
650
+ if (isArbitrary || isOrderSensitive) {
651
+ if (currentSegment.length > 0) {
652
+ currentSegment.sort();
653
+ result.push(...currentSegment);
654
+ currentSegment = [];
655
+ }
656
+ result.push(modifier);
657
+ } else {
658
+ currentSegment.push(modifier);
659
+ }
565
660
  }
566
- );
567
- }
568
- function SidebarInset({ className, ...props }) {
569
- return /* @__PURE__ */ jsxRuntime.jsx(
570
- "main",
571
- {
572
- "data-slot": "sidebar-inset",
573
- className: cn(
574
- "bg-background relative flex w-full flex-1 flex-col",
575
- "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
576
- className
577
- ),
578
- ...props
661
+ if (currentSegment.length > 0) {
662
+ currentSegment.sort();
663
+ result.push(...currentSegment);
579
664
  }
580
- );
581
- }
582
- function SidebarContent({ className, ...props }) {
583
- return /* @__PURE__ */ jsxRuntime.jsx(
584
- "div",
585
- {
586
- "data-slot": "sidebar-content",
587
- "data-sidebar": "content",
588
- className: cn(
589
- "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
590
- className
591
- ),
592
- ...props
665
+ return result;
666
+ };
667
+ };
668
+ const createConfigUtils = (config) => ({
669
+ cache: createLruCache(config.cacheSize),
670
+ parseClassName: createParseClassName(config),
671
+ sortModifiers: createSortModifiers(config),
672
+ ...createClassGroupUtils(config)
673
+ });
674
+ const SPLIT_CLASSES_REGEX = /\s+/;
675
+ const mergeClassList = (classList, configUtils) => {
676
+ const {
677
+ parseClassName,
678
+ getClassGroupId,
679
+ getConflictingClassGroupIds,
680
+ sortModifiers
681
+ } = configUtils;
682
+ const classGroupsInConflict = [];
683
+ const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
684
+ let result = "";
685
+ for (let index = classNames.length - 1; index >= 0; index -= 1) {
686
+ const originalClassName = classNames[index];
687
+ const {
688
+ isExternal,
689
+ modifiers,
690
+ hasImportantModifier,
691
+ baseClassName,
692
+ maybePostfixModifierPosition
693
+ } = parseClassName(originalClassName);
694
+ if (isExternal) {
695
+ result = originalClassName + (result.length > 0 ? " " + result : result);
696
+ continue;
593
697
  }
594
- );
595
- }
596
- function SidebarGroup({ className, ...props }) {
597
- return /* @__PURE__ */ jsxRuntime.jsx(
598
- "div",
599
- {
600
- "data-slot": "sidebar-group",
601
- "data-sidebar": "group",
602
- className: cn("relative flex w-full min-w-0 flex-col p-2", className),
603
- ...props
698
+ let hasPostfixModifier = !!maybePostfixModifierPosition;
699
+ let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
700
+ if (!classGroupId) {
701
+ if (!hasPostfixModifier) {
702
+ result = originalClassName + (result.length > 0 ? " " + result : result);
703
+ continue;
704
+ }
705
+ classGroupId = getClassGroupId(baseClassName);
706
+ if (!classGroupId) {
707
+ result = originalClassName + (result.length > 0 ? " " + result : result);
708
+ continue;
709
+ }
710
+ hasPostfixModifier = false;
604
711
  }
605
- );
606
- }
607
- function SidebarGroupLabel({
608
- className,
609
- asChild = false,
610
- ...props
611
- }) {
612
- const Comp = asChild ? reactSlot.Slot : "div";
613
- return /* @__PURE__ */ jsxRuntime.jsx(
614
- Comp,
615
- {
616
- "data-slot": "sidebar-group-label",
617
- "data-sidebar": "group-label",
618
- className: cn(
619
- "text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
620
- "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
621
- className
622
- ),
623
- ...props
712
+ const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":");
713
+ const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
714
+ const classId = modifierId + classGroupId;
715
+ if (classGroupsInConflict.indexOf(classId) > -1) {
716
+ continue;
624
717
  }
625
- );
626
- }
627
- function SidebarGroupContent({
628
- className,
629
- ...props
630
- }) {
631
- return /* @__PURE__ */ jsxRuntime.jsx(
632
- "div",
633
- {
634
- "data-slot": "sidebar-group-content",
635
- "data-sidebar": "group-content",
636
- className: cn("w-full text-sm", className),
637
- ...props
718
+ classGroupsInConflict.push(classId);
719
+ const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
720
+ for (let i = 0; i < conflictGroups.length; ++i) {
721
+ const group = conflictGroups[i];
722
+ classGroupsInConflict.push(modifierId + group);
638
723
  }
639
- );
640
- }
641
- classVarianceAuthority.cva(
642
- "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
643
- {
644
- variants: {
645
- variant: {
646
- default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
647
- outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
648
- },
649
- size: {
650
- default: "h-8 text-sm",
651
- sm: "h-7 text-xs",
652
- lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
724
+ result = originalClassName + (result.length > 0 ? " " + result : result);
725
+ }
726
+ return result;
727
+ };
728
+ const twJoin = (...classLists) => {
729
+ let index = 0;
730
+ let argument;
731
+ let resolvedValue;
732
+ let string = "";
733
+ while (index < classLists.length) {
734
+ if (argument = classLists[index++]) {
735
+ if (resolvedValue = toValue(argument)) {
736
+ string && (string += " ");
737
+ string += resolvedValue;
653
738
  }
654
- },
655
- defaultVariants: {
656
- variant: "default",
657
- size: "default"
658
739
  }
659
740
  }
660
- );
661
- var Select = SelectPrimitive__namespace.Root;
662
- var SelectValue = SelectPrimitive__namespace.Value;
663
- var SelectTrigger = React3__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
664
- SelectPrimitive__namespace.Trigger,
665
- {
666
- ref,
667
- className: cn(
668
- "flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
669
- className
670
- ),
671
- ...props,
672
- children: [
673
- children,
674
- /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4 opacity-50" }) })
675
- ]
676
- }
677
- ));
678
- SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
679
- var SelectScrollUpButton = React3__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
680
- SelectPrimitive__namespace.ScrollUpButton,
681
- {
682
- ref,
683
- className: cn(
684
- "flex cursor-default items-center justify-center py-1",
685
- className
686
- ),
687
- ...props,
688
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "h-4 w-4" })
689
- }
690
- ));
691
- SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
692
- var SelectScrollDownButton = React3__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
693
- SelectPrimitive__namespace.ScrollDownButton,
694
- {
695
- ref,
696
- className: cn(
697
- "flex cursor-default items-center justify-center py-1",
698
- className
699
- ),
700
- ...props,
701
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4" })
702
- }
703
- ));
704
- SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
705
- var SelectContent = React3__namespace.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
706
- SelectPrimitive__namespace.Content,
707
- {
708
- ref,
709
- className: cn(
710
- "relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",
711
- position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
712
- className
713
- ),
714
- position,
715
- ...props,
716
- children: [
717
- /* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
718
- /* @__PURE__ */ jsxRuntime.jsx(
719
- SelectPrimitive__namespace.Viewport,
720
- {
721
- className: cn(
722
- "p-1",
723
- position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
724
- ),
725
- children
726
- }
727
- ),
728
- /* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
729
- ]
741
+ return string;
742
+ };
743
+ const toValue = (mix) => {
744
+ if (typeof mix === "string") {
745
+ return mix;
730
746
  }
731
- ) }));
732
- SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
733
- var SelectLabel = React3__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
734
- SelectPrimitive__namespace.Label,
735
- {
736
- ref,
737
- className: cn("px-2 py-1.5 text-sm font-semibold", className),
738
- ...props
747
+ let resolvedValue;
748
+ let string = "";
749
+ for (let k = 0; k < mix.length; k++) {
750
+ if (mix[k]) {
751
+ if (resolvedValue = toValue(mix[k])) {
752
+ string && (string += " ");
753
+ string += resolvedValue;
754
+ }
755
+ }
739
756
  }
740
- ));
741
- SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
742
- var SelectItem = React3__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
743
- SelectPrimitive__namespace.Item,
744
- {
745
- ref,
746
- className: cn(
747
- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
748
- className
749
- ),
750
- ...props,
751
- children: [
752
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }),
753
- /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children })
754
- ]
757
+ return string;
758
+ };
759
+ const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
760
+ let configUtils;
761
+ let cacheGet;
762
+ let cacheSet;
763
+ let functionToCall;
764
+ const initTailwindMerge = (classList) => {
765
+ const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
766
+ configUtils = createConfigUtils(config);
767
+ cacheGet = configUtils.cache.get;
768
+ cacheSet = configUtils.cache.set;
769
+ functionToCall = tailwindMerge;
770
+ return tailwindMerge(classList);
771
+ };
772
+ const tailwindMerge = (classList) => {
773
+ const cachedResult = cacheGet(classList);
774
+ if (cachedResult) {
775
+ return cachedResult;
776
+ }
777
+ const result = mergeClassList(classList, configUtils);
778
+ cacheSet(classList, result);
779
+ return result;
780
+ };
781
+ functionToCall = initTailwindMerge;
782
+ return (...args) => functionToCall(twJoin(...args));
783
+ };
784
+ const fallbackThemeArr = [];
785
+ const fromTheme = (key) => {
786
+ const themeGetter = (theme) => theme[key] || fallbackThemeArr;
787
+ themeGetter.isThemeGetter = true;
788
+ return themeGetter;
789
+ };
790
+ const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
791
+ const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
792
+ const fractionRegex = /^\d+\/\d+$/;
793
+ const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
794
+ const 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$/;
795
+ const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
796
+ const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
797
+ const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
798
+ const isFraction = (value) => fractionRegex.test(value);
799
+ const isNumber = (value) => !!value && !Number.isNaN(Number(value));
800
+ const isInteger = (value) => !!value && Number.isInteger(Number(value));
801
+ const isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
802
+ const isTshirtSize = (value) => tshirtUnitRegex.test(value);
803
+ const isAny = () => true;
804
+ const isLengthOnly = (value) => (
805
+ // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
806
+ // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
807
+ // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
808
+ lengthUnitRegex.test(value) && !colorFunctionRegex.test(value)
809
+ );
810
+ const isNever = () => false;
811
+ const isShadow = (value) => shadowRegex.test(value);
812
+ const isImage = (value) => imageRegex.test(value);
813
+ const isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value);
814
+ const isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever);
815
+ const isArbitraryValue = (value) => arbitraryValueRegex.test(value);
816
+ const isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
817
+ const isArbitraryNumber = (value) => getIsArbitraryValue(value, isLabelNumber, isNumber);
818
+ const isArbitraryPosition = (value) => getIsArbitraryValue(value, isLabelPosition, isNever);
819
+ const isArbitraryImage = (value) => getIsArbitraryValue(value, isLabelImage, isImage);
820
+ const isArbitraryShadow = (value) => getIsArbitraryValue(value, isLabelShadow, isShadow);
821
+ const isArbitraryVariable = (value) => arbitraryVariableRegex.test(value);
822
+ const isArbitraryVariableLength = (value) => getIsArbitraryVariable(value, isLabelLength);
823
+ const isArbitraryVariableFamilyName = (value) => getIsArbitraryVariable(value, isLabelFamilyName);
824
+ const isArbitraryVariablePosition = (value) => getIsArbitraryVariable(value, isLabelPosition);
825
+ const isArbitraryVariableSize = (value) => getIsArbitraryVariable(value, isLabelSize);
826
+ const isArbitraryVariableImage = (value) => getIsArbitraryVariable(value, isLabelImage);
827
+ const isArbitraryVariableShadow = (value) => getIsArbitraryVariable(value, isLabelShadow, true);
828
+ const getIsArbitraryValue = (value, testLabel, testValue) => {
829
+ const result = arbitraryValueRegex.exec(value);
830
+ if (result) {
831
+ if (result[1]) {
832
+ return testLabel(result[1]);
833
+ }
834
+ return testValue(result[2]);
755
835
  }
756
- ));
757
- SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
758
- var SelectSeparator = React3__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
759
- SelectPrimitive__namespace.Separator,
760
- {
761
- ref,
762
- className: cn("-mx-1 my-1 h-px bg-muted", className),
763
- ...props
836
+ return false;
837
+ };
838
+ const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {
839
+ const result = arbitraryVariableRegex.exec(value);
840
+ if (result) {
841
+ if (result[1]) {
842
+ return testLabel(result[1]);
843
+ }
844
+ return shouldMatchNoLabel;
764
845
  }
765
- ));
766
- SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
767
- var labelVariants = classVarianceAuthority.cva(
768
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
846
+ return false;
847
+ };
848
+ const isLabelPosition = (label) => label === "position" || label === "percentage";
849
+ const isLabelImage = (label) => label === "image" || label === "url";
850
+ const isLabelSize = (label) => label === "length" || label === "size" || label === "bg-size";
851
+ const isLabelLength = (label) => label === "length";
852
+ const isLabelNumber = (label) => label === "number";
853
+ const isLabelFamilyName = (label) => label === "family-name";
854
+ const isLabelShadow = (label) => label === "shadow";
855
+ const getDefaultConfig = () => {
856
+ const themeColor = fromTheme("color");
857
+ const themeFont = fromTheme("font");
858
+ const themeText = fromTheme("text");
859
+ const themeFontWeight = fromTheme("font-weight");
860
+ const themeTracking = fromTheme("tracking");
861
+ const themeLeading = fromTheme("leading");
862
+ const themeBreakpoint = fromTheme("breakpoint");
863
+ const themeContainer = fromTheme("container");
864
+ const themeSpacing = fromTheme("spacing");
865
+ const themeRadius = fromTheme("radius");
866
+ const themeShadow = fromTheme("shadow");
867
+ const themeInsetShadow = fromTheme("inset-shadow");
868
+ const themeTextShadow = fromTheme("text-shadow");
869
+ const themeDropShadow = fromTheme("drop-shadow");
870
+ const themeBlur = fromTheme("blur");
871
+ const themePerspective = fromTheme("perspective");
872
+ const themeAspect = fromTheme("aspect");
873
+ const themeEase = fromTheme("ease");
874
+ const themeAnimate = fromTheme("animate");
875
+ const scaleBreak = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
876
+ const scalePosition = () => [
877
+ "center",
878
+ "top",
879
+ "bottom",
880
+ "left",
881
+ "right",
882
+ "top-left",
883
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
884
+ "left-top",
885
+ "top-right",
886
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
887
+ "right-top",
888
+ "bottom-right",
889
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
890
+ "right-bottom",
891
+ "bottom-left",
892
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
893
+ "left-bottom"
894
+ ];
895
+ const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];
896
+ const scaleOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
897
+ const scaleOverscroll = () => ["auto", "contain", "none"];
898
+ const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];
899
+ const scaleInset = () => [isFraction, "full", "auto", ...scaleUnambiguousSpacing()];
900
+ const scaleGridTemplateColsRows = () => [isInteger, "none", "subgrid", isArbitraryVariable, isArbitraryValue];
901
+ const scaleGridColRowStartAndEnd = () => ["auto", {
902
+ span: ["full", isInteger, isArbitraryVariable, isArbitraryValue]
903
+ }, isInteger, isArbitraryVariable, isArbitraryValue];
904
+ const scaleGridColRowStartOrEnd = () => [isInteger, "auto", isArbitraryVariable, isArbitraryValue];
905
+ const scaleGridAutoColsRows = () => ["auto", "min", "max", "fr", isArbitraryVariable, isArbitraryValue];
906
+ const scaleAlignPrimaryAxis = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"];
907
+ const scaleAlignSecondaryAxis = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"];
908
+ const scaleMargin = () => ["auto", ...scaleUnambiguousSpacing()];
909
+ const scaleSizing = () => [isFraction, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...scaleUnambiguousSpacing()];
910
+ const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
911
+ const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {
912
+ position: [isArbitraryVariable, isArbitraryValue]
913
+ }];
914
+ const scaleBgRepeat = () => ["no-repeat", {
915
+ repeat: ["", "x", "y", "space", "round"]
916
+ }];
917
+ const scaleBgSize = () => ["auto", "cover", "contain", isArbitraryVariableSize, isArbitrarySize, {
918
+ size: [isArbitraryVariable, isArbitraryValue]
919
+ }];
920
+ const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];
921
+ const scaleRadius = () => [
922
+ // Deprecated since Tailwind CSS v4.0.0
923
+ "",
924
+ "none",
925
+ "full",
926
+ themeRadius,
927
+ isArbitraryVariable,
928
+ isArbitraryValue
929
+ ];
930
+ const scaleBorderWidth = () => ["", isNumber, isArbitraryVariableLength, isArbitraryLength];
931
+ const scaleLineStyle = () => ["solid", "dashed", "dotted", "double"];
932
+ const scaleBlendMode = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
933
+ const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];
934
+ const scaleBlur = () => [
935
+ // Deprecated since Tailwind CSS v4.0.0
936
+ "",
937
+ "none",
938
+ themeBlur,
939
+ isArbitraryVariable,
940
+ isArbitraryValue
941
+ ];
942
+ const scaleRotate = () => ["none", isNumber, isArbitraryVariable, isArbitraryValue];
943
+ const scaleScale = () => ["none", isNumber, isArbitraryVariable, isArbitraryValue];
944
+ const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];
945
+ const scaleTranslate = () => [isFraction, "full", ...scaleUnambiguousSpacing()];
946
+ return {
947
+ cacheSize: 500,
948
+ theme: {
949
+ animate: ["spin", "ping", "pulse", "bounce"],
950
+ aspect: ["video"],
951
+ blur: [isTshirtSize],
952
+ breakpoint: [isTshirtSize],
953
+ color: [isAny],
954
+ container: [isTshirtSize],
955
+ "drop-shadow": [isTshirtSize],
956
+ ease: ["in", "out", "in-out"],
957
+ font: [isAnyNonArbitrary],
958
+ "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
959
+ "inset-shadow": [isTshirtSize],
960
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
961
+ perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
962
+ radius: [isTshirtSize],
963
+ shadow: [isTshirtSize],
964
+ spacing: ["px", isNumber],
965
+ text: [isTshirtSize],
966
+ "text-shadow": [isTshirtSize],
967
+ tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
968
+ },
969
+ classGroups: {
970
+ // --------------
971
+ // --- Layout ---
972
+ // --------------
973
+ /**
974
+ * Aspect Ratio
975
+ * @see https://tailwindcss.com/docs/aspect-ratio
976
+ */
977
+ aspect: [{
978
+ aspect: ["auto", "square", isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]
979
+ }],
980
+ /**
981
+ * Container
982
+ * @see https://tailwindcss.com/docs/container
983
+ * @deprecated since Tailwind CSS v4.0.0
984
+ */
985
+ container: ["container"],
986
+ /**
987
+ * Columns
988
+ * @see https://tailwindcss.com/docs/columns
989
+ */
990
+ columns: [{
991
+ columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]
992
+ }],
993
+ /**
994
+ * Break After
995
+ * @see https://tailwindcss.com/docs/break-after
996
+ */
997
+ "break-after": [{
998
+ "break-after": scaleBreak()
999
+ }],
1000
+ /**
1001
+ * Break Before
1002
+ * @see https://tailwindcss.com/docs/break-before
1003
+ */
1004
+ "break-before": [{
1005
+ "break-before": scaleBreak()
1006
+ }],
1007
+ /**
1008
+ * Break Inside
1009
+ * @see https://tailwindcss.com/docs/break-inside
1010
+ */
1011
+ "break-inside": [{
1012
+ "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
1013
+ }],
1014
+ /**
1015
+ * Box Decoration Break
1016
+ * @see https://tailwindcss.com/docs/box-decoration-break
1017
+ */
1018
+ "box-decoration": [{
1019
+ "box-decoration": ["slice", "clone"]
1020
+ }],
1021
+ /**
1022
+ * Box Sizing
1023
+ * @see https://tailwindcss.com/docs/box-sizing
1024
+ */
1025
+ box: [{
1026
+ box: ["border", "content"]
1027
+ }],
1028
+ /**
1029
+ * Display
1030
+ * @see https://tailwindcss.com/docs/display
1031
+ */
1032
+ 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"],
1033
+ /**
1034
+ * Screen Reader Only
1035
+ * @see https://tailwindcss.com/docs/display#screen-reader-only
1036
+ */
1037
+ sr: ["sr-only", "not-sr-only"],
1038
+ /**
1039
+ * Floats
1040
+ * @see https://tailwindcss.com/docs/float
1041
+ */
1042
+ float: [{
1043
+ float: ["right", "left", "none", "start", "end"]
1044
+ }],
1045
+ /**
1046
+ * Clear
1047
+ * @see https://tailwindcss.com/docs/clear
1048
+ */
1049
+ clear: [{
1050
+ clear: ["left", "right", "both", "none", "start", "end"]
1051
+ }],
1052
+ /**
1053
+ * Isolation
1054
+ * @see https://tailwindcss.com/docs/isolation
1055
+ */
1056
+ isolation: ["isolate", "isolation-auto"],
1057
+ /**
1058
+ * Object Fit
1059
+ * @see https://tailwindcss.com/docs/object-fit
1060
+ */
1061
+ "object-fit": [{
1062
+ object: ["contain", "cover", "fill", "none", "scale-down"]
1063
+ }],
1064
+ /**
1065
+ * Object Position
1066
+ * @see https://tailwindcss.com/docs/object-position
1067
+ */
1068
+ "object-position": [{
1069
+ object: scalePositionWithArbitrary()
1070
+ }],
1071
+ /**
1072
+ * Overflow
1073
+ * @see https://tailwindcss.com/docs/overflow
1074
+ */
1075
+ overflow: [{
1076
+ overflow: scaleOverflow()
1077
+ }],
1078
+ /**
1079
+ * Overflow X
1080
+ * @see https://tailwindcss.com/docs/overflow
1081
+ */
1082
+ "overflow-x": [{
1083
+ "overflow-x": scaleOverflow()
1084
+ }],
1085
+ /**
1086
+ * Overflow Y
1087
+ * @see https://tailwindcss.com/docs/overflow
1088
+ */
1089
+ "overflow-y": [{
1090
+ "overflow-y": scaleOverflow()
1091
+ }],
1092
+ /**
1093
+ * Overscroll Behavior
1094
+ * @see https://tailwindcss.com/docs/overscroll-behavior
1095
+ */
1096
+ overscroll: [{
1097
+ overscroll: scaleOverscroll()
1098
+ }],
1099
+ /**
1100
+ * Overscroll Behavior X
1101
+ * @see https://tailwindcss.com/docs/overscroll-behavior
1102
+ */
1103
+ "overscroll-x": [{
1104
+ "overscroll-x": scaleOverscroll()
1105
+ }],
1106
+ /**
1107
+ * Overscroll Behavior Y
1108
+ * @see https://tailwindcss.com/docs/overscroll-behavior
1109
+ */
1110
+ "overscroll-y": [{
1111
+ "overscroll-y": scaleOverscroll()
1112
+ }],
1113
+ /**
1114
+ * Position
1115
+ * @see https://tailwindcss.com/docs/position
1116
+ */
1117
+ position: ["static", "fixed", "absolute", "relative", "sticky"],
1118
+ /**
1119
+ * Top / Right / Bottom / Left
1120
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1121
+ */
1122
+ inset: [{
1123
+ inset: scaleInset()
1124
+ }],
1125
+ /**
1126
+ * Right / Left
1127
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1128
+ */
1129
+ "inset-x": [{
1130
+ "inset-x": scaleInset()
1131
+ }],
1132
+ /**
1133
+ * Top / Bottom
1134
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1135
+ */
1136
+ "inset-y": [{
1137
+ "inset-y": scaleInset()
1138
+ }],
1139
+ /**
1140
+ * Start
1141
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1142
+ */
1143
+ start: [{
1144
+ start: scaleInset()
1145
+ }],
1146
+ /**
1147
+ * End
1148
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1149
+ */
1150
+ end: [{
1151
+ end: scaleInset()
1152
+ }],
1153
+ /**
1154
+ * Top
1155
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1156
+ */
1157
+ top: [{
1158
+ top: scaleInset()
1159
+ }],
1160
+ /**
1161
+ * Right
1162
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1163
+ */
1164
+ right: [{
1165
+ right: scaleInset()
1166
+ }],
1167
+ /**
1168
+ * Bottom
1169
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1170
+ */
1171
+ bottom: [{
1172
+ bottom: scaleInset()
1173
+ }],
1174
+ /**
1175
+ * Left
1176
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1177
+ */
1178
+ left: [{
1179
+ left: scaleInset()
1180
+ }],
1181
+ /**
1182
+ * Visibility
1183
+ * @see https://tailwindcss.com/docs/visibility
1184
+ */
1185
+ visibility: ["visible", "invisible", "collapse"],
1186
+ /**
1187
+ * Z-Index
1188
+ * @see https://tailwindcss.com/docs/z-index
1189
+ */
1190
+ z: [{
1191
+ z: [isInteger, "auto", isArbitraryVariable, isArbitraryValue]
1192
+ }],
1193
+ // ------------------------
1194
+ // --- Flexbox and Grid ---
1195
+ // ------------------------
1196
+ /**
1197
+ * Flex Basis
1198
+ * @see https://tailwindcss.com/docs/flex-basis
1199
+ */
1200
+ basis: [{
1201
+ basis: [isFraction, "full", "auto", themeContainer, ...scaleUnambiguousSpacing()]
1202
+ }],
1203
+ /**
1204
+ * Flex Direction
1205
+ * @see https://tailwindcss.com/docs/flex-direction
1206
+ */
1207
+ "flex-direction": [{
1208
+ flex: ["row", "row-reverse", "col", "col-reverse"]
1209
+ }],
1210
+ /**
1211
+ * Flex Wrap
1212
+ * @see https://tailwindcss.com/docs/flex-wrap
1213
+ */
1214
+ "flex-wrap": [{
1215
+ flex: ["nowrap", "wrap", "wrap-reverse"]
1216
+ }],
1217
+ /**
1218
+ * Flex
1219
+ * @see https://tailwindcss.com/docs/flex
1220
+ */
1221
+ flex: [{
1222
+ flex: [isNumber, isFraction, "auto", "initial", "none", isArbitraryValue]
1223
+ }],
1224
+ /**
1225
+ * Flex Grow
1226
+ * @see https://tailwindcss.com/docs/flex-grow
1227
+ */
1228
+ grow: [{
1229
+ grow: ["", isNumber, isArbitraryVariable, isArbitraryValue]
1230
+ }],
1231
+ /**
1232
+ * Flex Shrink
1233
+ * @see https://tailwindcss.com/docs/flex-shrink
1234
+ */
1235
+ shrink: [{
1236
+ shrink: ["", isNumber, isArbitraryVariable, isArbitraryValue]
1237
+ }],
1238
+ /**
1239
+ * Order
1240
+ * @see https://tailwindcss.com/docs/order
1241
+ */
1242
+ order: [{
1243
+ order: [isInteger, "first", "last", "none", isArbitraryVariable, isArbitraryValue]
1244
+ }],
1245
+ /**
1246
+ * Grid Template Columns
1247
+ * @see https://tailwindcss.com/docs/grid-template-columns
1248
+ */
1249
+ "grid-cols": [{
1250
+ "grid-cols": scaleGridTemplateColsRows()
1251
+ }],
1252
+ /**
1253
+ * Grid Column Start / End
1254
+ * @see https://tailwindcss.com/docs/grid-column
1255
+ */
1256
+ "col-start-end": [{
1257
+ col: scaleGridColRowStartAndEnd()
1258
+ }],
1259
+ /**
1260
+ * Grid Column Start
1261
+ * @see https://tailwindcss.com/docs/grid-column
1262
+ */
1263
+ "col-start": [{
1264
+ "col-start": scaleGridColRowStartOrEnd()
1265
+ }],
1266
+ /**
1267
+ * Grid Column End
1268
+ * @see https://tailwindcss.com/docs/grid-column
1269
+ */
1270
+ "col-end": [{
1271
+ "col-end": scaleGridColRowStartOrEnd()
1272
+ }],
1273
+ /**
1274
+ * Grid Template Rows
1275
+ * @see https://tailwindcss.com/docs/grid-template-rows
1276
+ */
1277
+ "grid-rows": [{
1278
+ "grid-rows": scaleGridTemplateColsRows()
1279
+ }],
1280
+ /**
1281
+ * Grid Row Start / End
1282
+ * @see https://tailwindcss.com/docs/grid-row
1283
+ */
1284
+ "row-start-end": [{
1285
+ row: scaleGridColRowStartAndEnd()
1286
+ }],
1287
+ /**
1288
+ * Grid Row Start
1289
+ * @see https://tailwindcss.com/docs/grid-row
1290
+ */
1291
+ "row-start": [{
1292
+ "row-start": scaleGridColRowStartOrEnd()
1293
+ }],
1294
+ /**
1295
+ * Grid Row End
1296
+ * @see https://tailwindcss.com/docs/grid-row
1297
+ */
1298
+ "row-end": [{
1299
+ "row-end": scaleGridColRowStartOrEnd()
1300
+ }],
1301
+ /**
1302
+ * Grid Auto Flow
1303
+ * @see https://tailwindcss.com/docs/grid-auto-flow
1304
+ */
1305
+ "grid-flow": [{
1306
+ "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
1307
+ }],
1308
+ /**
1309
+ * Grid Auto Columns
1310
+ * @see https://tailwindcss.com/docs/grid-auto-columns
1311
+ */
1312
+ "auto-cols": [{
1313
+ "auto-cols": scaleGridAutoColsRows()
1314
+ }],
1315
+ /**
1316
+ * Grid Auto Rows
1317
+ * @see https://tailwindcss.com/docs/grid-auto-rows
1318
+ */
1319
+ "auto-rows": [{
1320
+ "auto-rows": scaleGridAutoColsRows()
1321
+ }],
1322
+ /**
1323
+ * Gap
1324
+ * @see https://tailwindcss.com/docs/gap
1325
+ */
1326
+ gap: [{
1327
+ gap: scaleUnambiguousSpacing()
1328
+ }],
1329
+ /**
1330
+ * Gap X
1331
+ * @see https://tailwindcss.com/docs/gap
1332
+ */
1333
+ "gap-x": [{
1334
+ "gap-x": scaleUnambiguousSpacing()
1335
+ }],
1336
+ /**
1337
+ * Gap Y
1338
+ * @see https://tailwindcss.com/docs/gap
1339
+ */
1340
+ "gap-y": [{
1341
+ "gap-y": scaleUnambiguousSpacing()
1342
+ }],
1343
+ /**
1344
+ * Justify Content
1345
+ * @see https://tailwindcss.com/docs/justify-content
1346
+ */
1347
+ "justify-content": [{
1348
+ justify: [...scaleAlignPrimaryAxis(), "normal"]
1349
+ }],
1350
+ /**
1351
+ * Justify Items
1352
+ * @see https://tailwindcss.com/docs/justify-items
1353
+ */
1354
+ "justify-items": [{
1355
+ "justify-items": [...scaleAlignSecondaryAxis(), "normal"]
1356
+ }],
1357
+ /**
1358
+ * Justify Self
1359
+ * @see https://tailwindcss.com/docs/justify-self
1360
+ */
1361
+ "justify-self": [{
1362
+ "justify-self": ["auto", ...scaleAlignSecondaryAxis()]
1363
+ }],
1364
+ /**
1365
+ * Align Content
1366
+ * @see https://tailwindcss.com/docs/align-content
1367
+ */
1368
+ "align-content": [{
1369
+ content: ["normal", ...scaleAlignPrimaryAxis()]
1370
+ }],
1371
+ /**
1372
+ * Align Items
1373
+ * @see https://tailwindcss.com/docs/align-items
1374
+ */
1375
+ "align-items": [{
1376
+ items: [...scaleAlignSecondaryAxis(), {
1377
+ baseline: ["", "last"]
1378
+ }]
1379
+ }],
1380
+ /**
1381
+ * Align Self
1382
+ * @see https://tailwindcss.com/docs/align-self
1383
+ */
1384
+ "align-self": [{
1385
+ self: ["auto", ...scaleAlignSecondaryAxis(), {
1386
+ baseline: ["", "last"]
1387
+ }]
1388
+ }],
1389
+ /**
1390
+ * Place Content
1391
+ * @see https://tailwindcss.com/docs/place-content
1392
+ */
1393
+ "place-content": [{
1394
+ "place-content": scaleAlignPrimaryAxis()
1395
+ }],
1396
+ /**
1397
+ * Place Items
1398
+ * @see https://tailwindcss.com/docs/place-items
1399
+ */
1400
+ "place-items": [{
1401
+ "place-items": [...scaleAlignSecondaryAxis(), "baseline"]
1402
+ }],
1403
+ /**
1404
+ * Place Self
1405
+ * @see https://tailwindcss.com/docs/place-self
1406
+ */
1407
+ "place-self": [{
1408
+ "place-self": ["auto", ...scaleAlignSecondaryAxis()]
1409
+ }],
1410
+ // Spacing
1411
+ /**
1412
+ * Padding
1413
+ * @see https://tailwindcss.com/docs/padding
1414
+ */
1415
+ p: [{
1416
+ p: scaleUnambiguousSpacing()
1417
+ }],
1418
+ /**
1419
+ * Padding X
1420
+ * @see https://tailwindcss.com/docs/padding
1421
+ */
1422
+ px: [{
1423
+ px: scaleUnambiguousSpacing()
1424
+ }],
1425
+ /**
1426
+ * Padding Y
1427
+ * @see https://tailwindcss.com/docs/padding
1428
+ */
1429
+ py: [{
1430
+ py: scaleUnambiguousSpacing()
1431
+ }],
1432
+ /**
1433
+ * Padding Start
1434
+ * @see https://tailwindcss.com/docs/padding
1435
+ */
1436
+ ps: [{
1437
+ ps: scaleUnambiguousSpacing()
1438
+ }],
1439
+ /**
1440
+ * Padding End
1441
+ * @see https://tailwindcss.com/docs/padding
1442
+ */
1443
+ pe: [{
1444
+ pe: scaleUnambiguousSpacing()
1445
+ }],
1446
+ /**
1447
+ * Padding Top
1448
+ * @see https://tailwindcss.com/docs/padding
1449
+ */
1450
+ pt: [{
1451
+ pt: scaleUnambiguousSpacing()
1452
+ }],
1453
+ /**
1454
+ * Padding Right
1455
+ * @see https://tailwindcss.com/docs/padding
1456
+ */
1457
+ pr: [{
1458
+ pr: scaleUnambiguousSpacing()
1459
+ }],
1460
+ /**
1461
+ * Padding Bottom
1462
+ * @see https://tailwindcss.com/docs/padding
1463
+ */
1464
+ pb: [{
1465
+ pb: scaleUnambiguousSpacing()
1466
+ }],
1467
+ /**
1468
+ * Padding Left
1469
+ * @see https://tailwindcss.com/docs/padding
1470
+ */
1471
+ pl: [{
1472
+ pl: scaleUnambiguousSpacing()
1473
+ }],
1474
+ /**
1475
+ * Margin
1476
+ * @see https://tailwindcss.com/docs/margin
1477
+ */
1478
+ m: [{
1479
+ m: scaleMargin()
1480
+ }],
1481
+ /**
1482
+ * Margin X
1483
+ * @see https://tailwindcss.com/docs/margin
1484
+ */
1485
+ mx: [{
1486
+ mx: scaleMargin()
1487
+ }],
1488
+ /**
1489
+ * Margin Y
1490
+ * @see https://tailwindcss.com/docs/margin
1491
+ */
1492
+ my: [{
1493
+ my: scaleMargin()
1494
+ }],
1495
+ /**
1496
+ * Margin Start
1497
+ * @see https://tailwindcss.com/docs/margin
1498
+ */
1499
+ ms: [{
1500
+ ms: scaleMargin()
1501
+ }],
1502
+ /**
1503
+ * Margin End
1504
+ * @see https://tailwindcss.com/docs/margin
1505
+ */
1506
+ me: [{
1507
+ me: scaleMargin()
1508
+ }],
1509
+ /**
1510
+ * Margin Top
1511
+ * @see https://tailwindcss.com/docs/margin
1512
+ */
1513
+ mt: [{
1514
+ mt: scaleMargin()
1515
+ }],
1516
+ /**
1517
+ * Margin Right
1518
+ * @see https://tailwindcss.com/docs/margin
1519
+ */
1520
+ mr: [{
1521
+ mr: scaleMargin()
1522
+ }],
1523
+ /**
1524
+ * Margin Bottom
1525
+ * @see https://tailwindcss.com/docs/margin
1526
+ */
1527
+ mb: [{
1528
+ mb: scaleMargin()
1529
+ }],
1530
+ /**
1531
+ * Margin Left
1532
+ * @see https://tailwindcss.com/docs/margin
1533
+ */
1534
+ ml: [{
1535
+ ml: scaleMargin()
1536
+ }],
1537
+ /**
1538
+ * Space Between X
1539
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1540
+ */
1541
+ "space-x": [{
1542
+ "space-x": scaleUnambiguousSpacing()
1543
+ }],
1544
+ /**
1545
+ * Space Between X Reverse
1546
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1547
+ */
1548
+ "space-x-reverse": ["space-x-reverse"],
1549
+ /**
1550
+ * Space Between Y
1551
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1552
+ */
1553
+ "space-y": [{
1554
+ "space-y": scaleUnambiguousSpacing()
1555
+ }],
1556
+ /**
1557
+ * Space Between Y Reverse
1558
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1559
+ */
1560
+ "space-y-reverse": ["space-y-reverse"],
1561
+ // --------------
1562
+ // --- Sizing ---
1563
+ // --------------
1564
+ /**
1565
+ * Size
1566
+ * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
1567
+ */
1568
+ size: [{
1569
+ size: scaleSizing()
1570
+ }],
1571
+ /**
1572
+ * Width
1573
+ * @see https://tailwindcss.com/docs/width
1574
+ */
1575
+ w: [{
1576
+ w: [themeContainer, "screen", ...scaleSizing()]
1577
+ }],
1578
+ /**
1579
+ * Min-Width
1580
+ * @see https://tailwindcss.com/docs/min-width
1581
+ */
1582
+ "min-w": [{
1583
+ "min-w": [
1584
+ themeContainer,
1585
+ "screen",
1586
+ /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1587
+ "none",
1588
+ ...scaleSizing()
1589
+ ]
1590
+ }],
1591
+ /**
1592
+ * Max-Width
1593
+ * @see https://tailwindcss.com/docs/max-width
1594
+ */
1595
+ "max-w": [{
1596
+ "max-w": [
1597
+ themeContainer,
1598
+ "screen",
1599
+ "none",
1600
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1601
+ "prose",
1602
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1603
+ {
1604
+ screen: [themeBreakpoint]
1605
+ },
1606
+ ...scaleSizing()
1607
+ ]
1608
+ }],
1609
+ /**
1610
+ * Height
1611
+ * @see https://tailwindcss.com/docs/height
1612
+ */
1613
+ h: [{
1614
+ h: ["screen", "lh", ...scaleSizing()]
1615
+ }],
1616
+ /**
1617
+ * Min-Height
1618
+ * @see https://tailwindcss.com/docs/min-height
1619
+ */
1620
+ "min-h": [{
1621
+ "min-h": ["screen", "lh", "none", ...scaleSizing()]
1622
+ }],
1623
+ /**
1624
+ * Max-Height
1625
+ * @see https://tailwindcss.com/docs/max-height
1626
+ */
1627
+ "max-h": [{
1628
+ "max-h": ["screen", "lh", ...scaleSizing()]
1629
+ }],
1630
+ // ------------------
1631
+ // --- Typography ---
1632
+ // ------------------
1633
+ /**
1634
+ * Font Size
1635
+ * @see https://tailwindcss.com/docs/font-size
1636
+ */
1637
+ "font-size": [{
1638
+ text: ["base", themeText, isArbitraryVariableLength, isArbitraryLength]
1639
+ }],
1640
+ /**
1641
+ * Font Smoothing
1642
+ * @see https://tailwindcss.com/docs/font-smoothing
1643
+ */
1644
+ "font-smoothing": ["antialiased", "subpixel-antialiased"],
1645
+ /**
1646
+ * Font Style
1647
+ * @see https://tailwindcss.com/docs/font-style
1648
+ */
1649
+ "font-style": ["italic", "not-italic"],
1650
+ /**
1651
+ * Font Weight
1652
+ * @see https://tailwindcss.com/docs/font-weight
1653
+ */
1654
+ "font-weight": [{
1655
+ font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber]
1656
+ }],
1657
+ /**
1658
+ * Font Stretch
1659
+ * @see https://tailwindcss.com/docs/font-stretch
1660
+ */
1661
+ "font-stretch": [{
1662
+ "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", isPercent, isArbitraryValue]
1663
+ }],
1664
+ /**
1665
+ * Font Family
1666
+ * @see https://tailwindcss.com/docs/font-family
1667
+ */
1668
+ "font-family": [{
1669
+ font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont]
1670
+ }],
1671
+ /**
1672
+ * Font Variant Numeric
1673
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1674
+ */
1675
+ "fvn-normal": ["normal-nums"],
1676
+ /**
1677
+ * Font Variant Numeric
1678
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1679
+ */
1680
+ "fvn-ordinal": ["ordinal"],
1681
+ /**
1682
+ * Font Variant Numeric
1683
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1684
+ */
1685
+ "fvn-slashed-zero": ["slashed-zero"],
1686
+ /**
1687
+ * Font Variant Numeric
1688
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1689
+ */
1690
+ "fvn-figure": ["lining-nums", "oldstyle-nums"],
1691
+ /**
1692
+ * Font Variant Numeric
1693
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1694
+ */
1695
+ "fvn-spacing": ["proportional-nums", "tabular-nums"],
1696
+ /**
1697
+ * Font Variant Numeric
1698
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1699
+ */
1700
+ "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
1701
+ /**
1702
+ * Letter Spacing
1703
+ * @see https://tailwindcss.com/docs/letter-spacing
1704
+ */
1705
+ tracking: [{
1706
+ tracking: [themeTracking, isArbitraryVariable, isArbitraryValue]
1707
+ }],
1708
+ /**
1709
+ * Line Clamp
1710
+ * @see https://tailwindcss.com/docs/line-clamp
1711
+ */
1712
+ "line-clamp": [{
1713
+ "line-clamp": [isNumber, "none", isArbitraryVariable, isArbitraryNumber]
1714
+ }],
1715
+ /**
1716
+ * Line Height
1717
+ * @see https://tailwindcss.com/docs/line-height
1718
+ */
1719
+ leading: [{
1720
+ leading: [
1721
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1722
+ themeLeading,
1723
+ ...scaleUnambiguousSpacing()
1724
+ ]
1725
+ }],
1726
+ /**
1727
+ * List Style Image
1728
+ * @see https://tailwindcss.com/docs/list-style-image
1729
+ */
1730
+ "list-image": [{
1731
+ "list-image": ["none", isArbitraryVariable, isArbitraryValue]
1732
+ }],
1733
+ /**
1734
+ * List Style Position
1735
+ * @see https://tailwindcss.com/docs/list-style-position
1736
+ */
1737
+ "list-style-position": [{
1738
+ list: ["inside", "outside"]
1739
+ }],
1740
+ /**
1741
+ * List Style Type
1742
+ * @see https://tailwindcss.com/docs/list-style-type
1743
+ */
1744
+ "list-style-type": [{
1745
+ list: ["disc", "decimal", "none", isArbitraryVariable, isArbitraryValue]
1746
+ }],
1747
+ /**
1748
+ * Text Alignment
1749
+ * @see https://tailwindcss.com/docs/text-align
1750
+ */
1751
+ "text-alignment": [{
1752
+ text: ["left", "center", "right", "justify", "start", "end"]
1753
+ }],
1754
+ /**
1755
+ * Placeholder Color
1756
+ * @deprecated since Tailwind CSS v3.0.0
1757
+ * @see https://v3.tailwindcss.com/docs/placeholder-color
1758
+ */
1759
+ "placeholder-color": [{
1760
+ placeholder: scaleColor()
1761
+ }],
1762
+ /**
1763
+ * Text Color
1764
+ * @see https://tailwindcss.com/docs/text-color
1765
+ */
1766
+ "text-color": [{
1767
+ text: scaleColor()
1768
+ }],
1769
+ /**
1770
+ * Text Decoration
1771
+ * @see https://tailwindcss.com/docs/text-decoration
1772
+ */
1773
+ "text-decoration": ["underline", "overline", "line-through", "no-underline"],
1774
+ /**
1775
+ * Text Decoration Style
1776
+ * @see https://tailwindcss.com/docs/text-decoration-style
1777
+ */
1778
+ "text-decoration-style": [{
1779
+ decoration: [...scaleLineStyle(), "wavy"]
1780
+ }],
1781
+ /**
1782
+ * Text Decoration Thickness
1783
+ * @see https://tailwindcss.com/docs/text-decoration-thickness
1784
+ */
1785
+ "text-decoration-thickness": [{
1786
+ decoration: [isNumber, "from-font", "auto", isArbitraryVariable, isArbitraryLength]
1787
+ }],
1788
+ /**
1789
+ * Text Decoration Color
1790
+ * @see https://tailwindcss.com/docs/text-decoration-color
1791
+ */
1792
+ "text-decoration-color": [{
1793
+ decoration: scaleColor()
1794
+ }],
1795
+ /**
1796
+ * Text Underline Offset
1797
+ * @see https://tailwindcss.com/docs/text-underline-offset
1798
+ */
1799
+ "underline-offset": [{
1800
+ "underline-offset": [isNumber, "auto", isArbitraryVariable, isArbitraryValue]
1801
+ }],
1802
+ /**
1803
+ * Text Transform
1804
+ * @see https://tailwindcss.com/docs/text-transform
1805
+ */
1806
+ "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
1807
+ /**
1808
+ * Text Overflow
1809
+ * @see https://tailwindcss.com/docs/text-overflow
1810
+ */
1811
+ "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
1812
+ /**
1813
+ * Text Wrap
1814
+ * @see https://tailwindcss.com/docs/text-wrap
1815
+ */
1816
+ "text-wrap": [{
1817
+ text: ["wrap", "nowrap", "balance", "pretty"]
1818
+ }],
1819
+ /**
1820
+ * Text Indent
1821
+ * @see https://tailwindcss.com/docs/text-indent
1822
+ */
1823
+ indent: [{
1824
+ indent: scaleUnambiguousSpacing()
1825
+ }],
1826
+ /**
1827
+ * Vertical Alignment
1828
+ * @see https://tailwindcss.com/docs/vertical-align
1829
+ */
1830
+ "vertical-align": [{
1831
+ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryVariable, isArbitraryValue]
1832
+ }],
1833
+ /**
1834
+ * Whitespace
1835
+ * @see https://tailwindcss.com/docs/whitespace
1836
+ */
1837
+ whitespace: [{
1838
+ whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
1839
+ }],
1840
+ /**
1841
+ * Word Break
1842
+ * @see https://tailwindcss.com/docs/word-break
1843
+ */
1844
+ break: [{
1845
+ break: ["normal", "words", "all", "keep"]
1846
+ }],
1847
+ /**
1848
+ * Overflow Wrap
1849
+ * @see https://tailwindcss.com/docs/overflow-wrap
1850
+ */
1851
+ wrap: [{
1852
+ wrap: ["break-word", "anywhere", "normal"]
1853
+ }],
1854
+ /**
1855
+ * Hyphens
1856
+ * @see https://tailwindcss.com/docs/hyphens
1857
+ */
1858
+ hyphens: [{
1859
+ hyphens: ["none", "manual", "auto"]
1860
+ }],
1861
+ /**
1862
+ * Content
1863
+ * @see https://tailwindcss.com/docs/content
1864
+ */
1865
+ content: [{
1866
+ content: ["none", isArbitraryVariable, isArbitraryValue]
1867
+ }],
1868
+ // -------------------
1869
+ // --- Backgrounds ---
1870
+ // -------------------
1871
+ /**
1872
+ * Background Attachment
1873
+ * @see https://tailwindcss.com/docs/background-attachment
1874
+ */
1875
+ "bg-attachment": [{
1876
+ bg: ["fixed", "local", "scroll"]
1877
+ }],
1878
+ /**
1879
+ * Background Clip
1880
+ * @see https://tailwindcss.com/docs/background-clip
1881
+ */
1882
+ "bg-clip": [{
1883
+ "bg-clip": ["border", "padding", "content", "text"]
1884
+ }],
1885
+ /**
1886
+ * Background Origin
1887
+ * @see https://tailwindcss.com/docs/background-origin
1888
+ */
1889
+ "bg-origin": [{
1890
+ "bg-origin": ["border", "padding", "content"]
1891
+ }],
1892
+ /**
1893
+ * Background Position
1894
+ * @see https://tailwindcss.com/docs/background-position
1895
+ */
1896
+ "bg-position": [{
1897
+ bg: scaleBgPosition()
1898
+ }],
1899
+ /**
1900
+ * Background Repeat
1901
+ * @see https://tailwindcss.com/docs/background-repeat
1902
+ */
1903
+ "bg-repeat": [{
1904
+ bg: scaleBgRepeat()
1905
+ }],
1906
+ /**
1907
+ * Background Size
1908
+ * @see https://tailwindcss.com/docs/background-size
1909
+ */
1910
+ "bg-size": [{
1911
+ bg: scaleBgSize()
1912
+ }],
1913
+ /**
1914
+ * Background Image
1915
+ * @see https://tailwindcss.com/docs/background-image
1916
+ */
1917
+ "bg-image": [{
1918
+ bg: ["none", {
1919
+ linear: [{
1920
+ to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1921
+ }, isInteger, isArbitraryVariable, isArbitraryValue],
1922
+ radial: ["", isArbitraryVariable, isArbitraryValue],
1923
+ conic: [isInteger, isArbitraryVariable, isArbitraryValue]
1924
+ }, isArbitraryVariableImage, isArbitraryImage]
1925
+ }],
1926
+ /**
1927
+ * Background Color
1928
+ * @see https://tailwindcss.com/docs/background-color
1929
+ */
1930
+ "bg-color": [{
1931
+ bg: scaleColor()
1932
+ }],
1933
+ /**
1934
+ * Gradient Color Stops From Position
1935
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1936
+ */
1937
+ "gradient-from-pos": [{
1938
+ from: scaleGradientStopPosition()
1939
+ }],
1940
+ /**
1941
+ * Gradient Color Stops Via Position
1942
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1943
+ */
1944
+ "gradient-via-pos": [{
1945
+ via: scaleGradientStopPosition()
1946
+ }],
1947
+ /**
1948
+ * Gradient Color Stops To Position
1949
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1950
+ */
1951
+ "gradient-to-pos": [{
1952
+ to: scaleGradientStopPosition()
1953
+ }],
1954
+ /**
1955
+ * Gradient Color Stops From
1956
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1957
+ */
1958
+ "gradient-from": [{
1959
+ from: scaleColor()
1960
+ }],
1961
+ /**
1962
+ * Gradient Color Stops Via
1963
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1964
+ */
1965
+ "gradient-via": [{
1966
+ via: scaleColor()
1967
+ }],
1968
+ /**
1969
+ * Gradient Color Stops To
1970
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1971
+ */
1972
+ "gradient-to": [{
1973
+ to: scaleColor()
1974
+ }],
1975
+ // ---------------
1976
+ // --- Borders ---
1977
+ // ---------------
1978
+ /**
1979
+ * Border Radius
1980
+ * @see https://tailwindcss.com/docs/border-radius
1981
+ */
1982
+ rounded: [{
1983
+ rounded: scaleRadius()
1984
+ }],
1985
+ /**
1986
+ * Border Radius Start
1987
+ * @see https://tailwindcss.com/docs/border-radius
1988
+ */
1989
+ "rounded-s": [{
1990
+ "rounded-s": scaleRadius()
1991
+ }],
1992
+ /**
1993
+ * Border Radius End
1994
+ * @see https://tailwindcss.com/docs/border-radius
1995
+ */
1996
+ "rounded-e": [{
1997
+ "rounded-e": scaleRadius()
1998
+ }],
1999
+ /**
2000
+ * Border Radius Top
2001
+ * @see https://tailwindcss.com/docs/border-radius
2002
+ */
2003
+ "rounded-t": [{
2004
+ "rounded-t": scaleRadius()
2005
+ }],
2006
+ /**
2007
+ * Border Radius Right
2008
+ * @see https://tailwindcss.com/docs/border-radius
2009
+ */
2010
+ "rounded-r": [{
2011
+ "rounded-r": scaleRadius()
2012
+ }],
2013
+ /**
2014
+ * Border Radius Bottom
2015
+ * @see https://tailwindcss.com/docs/border-radius
2016
+ */
2017
+ "rounded-b": [{
2018
+ "rounded-b": scaleRadius()
2019
+ }],
2020
+ /**
2021
+ * Border Radius Left
2022
+ * @see https://tailwindcss.com/docs/border-radius
2023
+ */
2024
+ "rounded-l": [{
2025
+ "rounded-l": scaleRadius()
2026
+ }],
2027
+ /**
2028
+ * Border Radius Start Start
2029
+ * @see https://tailwindcss.com/docs/border-radius
2030
+ */
2031
+ "rounded-ss": [{
2032
+ "rounded-ss": scaleRadius()
2033
+ }],
2034
+ /**
2035
+ * Border Radius Start End
2036
+ * @see https://tailwindcss.com/docs/border-radius
2037
+ */
2038
+ "rounded-se": [{
2039
+ "rounded-se": scaleRadius()
2040
+ }],
2041
+ /**
2042
+ * Border Radius End End
2043
+ * @see https://tailwindcss.com/docs/border-radius
2044
+ */
2045
+ "rounded-ee": [{
2046
+ "rounded-ee": scaleRadius()
2047
+ }],
2048
+ /**
2049
+ * Border Radius End Start
2050
+ * @see https://tailwindcss.com/docs/border-radius
2051
+ */
2052
+ "rounded-es": [{
2053
+ "rounded-es": scaleRadius()
2054
+ }],
2055
+ /**
2056
+ * Border Radius Top Left
2057
+ * @see https://tailwindcss.com/docs/border-radius
2058
+ */
2059
+ "rounded-tl": [{
2060
+ "rounded-tl": scaleRadius()
2061
+ }],
2062
+ /**
2063
+ * Border Radius Top Right
2064
+ * @see https://tailwindcss.com/docs/border-radius
2065
+ */
2066
+ "rounded-tr": [{
2067
+ "rounded-tr": scaleRadius()
2068
+ }],
2069
+ /**
2070
+ * Border Radius Bottom Right
2071
+ * @see https://tailwindcss.com/docs/border-radius
2072
+ */
2073
+ "rounded-br": [{
2074
+ "rounded-br": scaleRadius()
2075
+ }],
2076
+ /**
2077
+ * Border Radius Bottom Left
2078
+ * @see https://tailwindcss.com/docs/border-radius
2079
+ */
2080
+ "rounded-bl": [{
2081
+ "rounded-bl": scaleRadius()
2082
+ }],
2083
+ /**
2084
+ * Border Width
2085
+ * @see https://tailwindcss.com/docs/border-width
2086
+ */
2087
+ "border-w": [{
2088
+ border: scaleBorderWidth()
2089
+ }],
2090
+ /**
2091
+ * Border Width X
2092
+ * @see https://tailwindcss.com/docs/border-width
2093
+ */
2094
+ "border-w-x": [{
2095
+ "border-x": scaleBorderWidth()
2096
+ }],
2097
+ /**
2098
+ * Border Width Y
2099
+ * @see https://tailwindcss.com/docs/border-width
2100
+ */
2101
+ "border-w-y": [{
2102
+ "border-y": scaleBorderWidth()
2103
+ }],
2104
+ /**
2105
+ * Border Width Start
2106
+ * @see https://tailwindcss.com/docs/border-width
2107
+ */
2108
+ "border-w-s": [{
2109
+ "border-s": scaleBorderWidth()
2110
+ }],
2111
+ /**
2112
+ * Border Width End
2113
+ * @see https://tailwindcss.com/docs/border-width
2114
+ */
2115
+ "border-w-e": [{
2116
+ "border-e": scaleBorderWidth()
2117
+ }],
2118
+ /**
2119
+ * Border Width Top
2120
+ * @see https://tailwindcss.com/docs/border-width
2121
+ */
2122
+ "border-w-t": [{
2123
+ "border-t": scaleBorderWidth()
2124
+ }],
2125
+ /**
2126
+ * Border Width Right
2127
+ * @see https://tailwindcss.com/docs/border-width
2128
+ */
2129
+ "border-w-r": [{
2130
+ "border-r": scaleBorderWidth()
2131
+ }],
2132
+ /**
2133
+ * Border Width Bottom
2134
+ * @see https://tailwindcss.com/docs/border-width
2135
+ */
2136
+ "border-w-b": [{
2137
+ "border-b": scaleBorderWidth()
2138
+ }],
2139
+ /**
2140
+ * Border Width Left
2141
+ * @see https://tailwindcss.com/docs/border-width
2142
+ */
2143
+ "border-w-l": [{
2144
+ "border-l": scaleBorderWidth()
2145
+ }],
2146
+ /**
2147
+ * Divide Width X
2148
+ * @see https://tailwindcss.com/docs/border-width#between-children
2149
+ */
2150
+ "divide-x": [{
2151
+ "divide-x": scaleBorderWidth()
2152
+ }],
2153
+ /**
2154
+ * Divide Width X Reverse
2155
+ * @see https://tailwindcss.com/docs/border-width#between-children
2156
+ */
2157
+ "divide-x-reverse": ["divide-x-reverse"],
2158
+ /**
2159
+ * Divide Width Y
2160
+ * @see https://tailwindcss.com/docs/border-width#between-children
2161
+ */
2162
+ "divide-y": [{
2163
+ "divide-y": scaleBorderWidth()
2164
+ }],
2165
+ /**
2166
+ * Divide Width Y Reverse
2167
+ * @see https://tailwindcss.com/docs/border-width#between-children
2168
+ */
2169
+ "divide-y-reverse": ["divide-y-reverse"],
2170
+ /**
2171
+ * Border Style
2172
+ * @see https://tailwindcss.com/docs/border-style
2173
+ */
2174
+ "border-style": [{
2175
+ border: [...scaleLineStyle(), "hidden", "none"]
2176
+ }],
2177
+ /**
2178
+ * Divide Style
2179
+ * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
2180
+ */
2181
+ "divide-style": [{
2182
+ divide: [...scaleLineStyle(), "hidden", "none"]
2183
+ }],
2184
+ /**
2185
+ * Border Color
2186
+ * @see https://tailwindcss.com/docs/border-color
2187
+ */
2188
+ "border-color": [{
2189
+ border: scaleColor()
2190
+ }],
2191
+ /**
2192
+ * Border Color X
2193
+ * @see https://tailwindcss.com/docs/border-color
2194
+ */
2195
+ "border-color-x": [{
2196
+ "border-x": scaleColor()
2197
+ }],
2198
+ /**
2199
+ * Border Color Y
2200
+ * @see https://tailwindcss.com/docs/border-color
2201
+ */
2202
+ "border-color-y": [{
2203
+ "border-y": scaleColor()
2204
+ }],
2205
+ /**
2206
+ * Border Color S
2207
+ * @see https://tailwindcss.com/docs/border-color
2208
+ */
2209
+ "border-color-s": [{
2210
+ "border-s": scaleColor()
2211
+ }],
2212
+ /**
2213
+ * Border Color E
2214
+ * @see https://tailwindcss.com/docs/border-color
2215
+ */
2216
+ "border-color-e": [{
2217
+ "border-e": scaleColor()
2218
+ }],
2219
+ /**
2220
+ * Border Color Top
2221
+ * @see https://tailwindcss.com/docs/border-color
2222
+ */
2223
+ "border-color-t": [{
2224
+ "border-t": scaleColor()
2225
+ }],
2226
+ /**
2227
+ * Border Color Right
2228
+ * @see https://tailwindcss.com/docs/border-color
2229
+ */
2230
+ "border-color-r": [{
2231
+ "border-r": scaleColor()
2232
+ }],
2233
+ /**
2234
+ * Border Color Bottom
2235
+ * @see https://tailwindcss.com/docs/border-color
2236
+ */
2237
+ "border-color-b": [{
2238
+ "border-b": scaleColor()
2239
+ }],
2240
+ /**
2241
+ * Border Color Left
2242
+ * @see https://tailwindcss.com/docs/border-color
2243
+ */
2244
+ "border-color-l": [{
2245
+ "border-l": scaleColor()
2246
+ }],
2247
+ /**
2248
+ * Divide Color
2249
+ * @see https://tailwindcss.com/docs/divide-color
2250
+ */
2251
+ "divide-color": [{
2252
+ divide: scaleColor()
2253
+ }],
2254
+ /**
2255
+ * Outline Style
2256
+ * @see https://tailwindcss.com/docs/outline-style
2257
+ */
2258
+ "outline-style": [{
2259
+ outline: [...scaleLineStyle(), "none", "hidden"]
2260
+ }],
2261
+ /**
2262
+ * Outline Offset
2263
+ * @see https://tailwindcss.com/docs/outline-offset
2264
+ */
2265
+ "outline-offset": [{
2266
+ "outline-offset": [isNumber, isArbitraryVariable, isArbitraryValue]
2267
+ }],
2268
+ /**
2269
+ * Outline Width
2270
+ * @see https://tailwindcss.com/docs/outline-width
2271
+ */
2272
+ "outline-w": [{
2273
+ outline: ["", isNumber, isArbitraryVariableLength, isArbitraryLength]
2274
+ }],
2275
+ /**
2276
+ * Outline Color
2277
+ * @see https://tailwindcss.com/docs/outline-color
2278
+ */
2279
+ "outline-color": [{
2280
+ outline: scaleColor()
2281
+ }],
2282
+ // ---------------
2283
+ // --- Effects ---
2284
+ // ---------------
2285
+ /**
2286
+ * Box Shadow
2287
+ * @see https://tailwindcss.com/docs/box-shadow
2288
+ */
2289
+ shadow: [{
2290
+ shadow: [
2291
+ // Deprecated since Tailwind CSS v4.0.0
2292
+ "",
2293
+ "none",
2294
+ themeShadow,
2295
+ isArbitraryVariableShadow,
2296
+ isArbitraryShadow
2297
+ ]
2298
+ }],
2299
+ /**
2300
+ * Box Shadow Color
2301
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
2302
+ */
2303
+ "shadow-color": [{
2304
+ shadow: scaleColor()
2305
+ }],
2306
+ /**
2307
+ * Inset Box Shadow
2308
+ * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
2309
+ */
2310
+ "inset-shadow": [{
2311
+ "inset-shadow": ["none", themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]
2312
+ }],
2313
+ /**
2314
+ * Inset Box Shadow Color
2315
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
2316
+ */
2317
+ "inset-shadow-color": [{
2318
+ "inset-shadow": scaleColor()
2319
+ }],
2320
+ /**
2321
+ * Ring Width
2322
+ * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
2323
+ */
2324
+ "ring-w": [{
2325
+ ring: scaleBorderWidth()
2326
+ }],
2327
+ /**
2328
+ * Ring Width Inset
2329
+ * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
2330
+ * @deprecated since Tailwind CSS v4.0.0
2331
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
2332
+ */
2333
+ "ring-w-inset": ["ring-inset"],
2334
+ /**
2335
+ * Ring Color
2336
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
2337
+ */
2338
+ "ring-color": [{
2339
+ ring: scaleColor()
2340
+ }],
2341
+ /**
2342
+ * Ring Offset Width
2343
+ * @see https://v3.tailwindcss.com/docs/ring-offset-width
2344
+ * @deprecated since Tailwind CSS v4.0.0
2345
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
2346
+ */
2347
+ "ring-offset-w": [{
2348
+ "ring-offset": [isNumber, isArbitraryLength]
2349
+ }],
2350
+ /**
2351
+ * Ring Offset Color
2352
+ * @see https://v3.tailwindcss.com/docs/ring-offset-color
2353
+ * @deprecated since Tailwind CSS v4.0.0
2354
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
2355
+ */
2356
+ "ring-offset-color": [{
2357
+ "ring-offset": scaleColor()
2358
+ }],
2359
+ /**
2360
+ * Inset Ring Width
2361
+ * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
2362
+ */
2363
+ "inset-ring-w": [{
2364
+ "inset-ring": scaleBorderWidth()
2365
+ }],
2366
+ /**
2367
+ * Inset Ring Color
2368
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
2369
+ */
2370
+ "inset-ring-color": [{
2371
+ "inset-ring": scaleColor()
2372
+ }],
2373
+ /**
2374
+ * Text Shadow
2375
+ * @see https://tailwindcss.com/docs/text-shadow
2376
+ */
2377
+ "text-shadow": [{
2378
+ "text-shadow": ["none", themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]
2379
+ }],
2380
+ /**
2381
+ * Text Shadow Color
2382
+ * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
2383
+ */
2384
+ "text-shadow-color": [{
2385
+ "text-shadow": scaleColor()
2386
+ }],
2387
+ /**
2388
+ * Opacity
2389
+ * @see https://tailwindcss.com/docs/opacity
2390
+ */
2391
+ opacity: [{
2392
+ opacity: [isNumber, isArbitraryVariable, isArbitraryValue]
2393
+ }],
2394
+ /**
2395
+ * Mix Blend Mode
2396
+ * @see https://tailwindcss.com/docs/mix-blend-mode
2397
+ */
2398
+ "mix-blend": [{
2399
+ "mix-blend": [...scaleBlendMode(), "plus-darker", "plus-lighter"]
2400
+ }],
2401
+ /**
2402
+ * Background Blend Mode
2403
+ * @see https://tailwindcss.com/docs/background-blend-mode
2404
+ */
2405
+ "bg-blend": [{
2406
+ "bg-blend": scaleBlendMode()
2407
+ }],
2408
+ /**
2409
+ * Mask Clip
2410
+ * @see https://tailwindcss.com/docs/mask-clip
2411
+ */
2412
+ "mask-clip": [{
2413
+ "mask-clip": ["border", "padding", "content", "fill", "stroke", "view"]
2414
+ }, "mask-no-clip"],
2415
+ /**
2416
+ * Mask Composite
2417
+ * @see https://tailwindcss.com/docs/mask-composite
2418
+ */
2419
+ "mask-composite": [{
2420
+ mask: ["add", "subtract", "intersect", "exclude"]
2421
+ }],
2422
+ /**
2423
+ * Mask Image
2424
+ * @see https://tailwindcss.com/docs/mask-image
2425
+ */
2426
+ "mask-image-linear-pos": [{
2427
+ "mask-linear": [isNumber]
2428
+ }],
2429
+ "mask-image-linear-from-pos": [{
2430
+ "mask-linear-from": scaleMaskImagePosition()
2431
+ }],
2432
+ "mask-image-linear-to-pos": [{
2433
+ "mask-linear-to": scaleMaskImagePosition()
2434
+ }],
2435
+ "mask-image-linear-from-color": [{
2436
+ "mask-linear-from": scaleColor()
2437
+ }],
2438
+ "mask-image-linear-to-color": [{
2439
+ "mask-linear-to": scaleColor()
2440
+ }],
2441
+ "mask-image-t-from-pos": [{
2442
+ "mask-t-from": scaleMaskImagePosition()
2443
+ }],
2444
+ "mask-image-t-to-pos": [{
2445
+ "mask-t-to": scaleMaskImagePosition()
2446
+ }],
2447
+ "mask-image-t-from-color": [{
2448
+ "mask-t-from": scaleColor()
2449
+ }],
2450
+ "mask-image-t-to-color": [{
2451
+ "mask-t-to": scaleColor()
2452
+ }],
2453
+ "mask-image-r-from-pos": [{
2454
+ "mask-r-from": scaleMaskImagePosition()
2455
+ }],
2456
+ "mask-image-r-to-pos": [{
2457
+ "mask-r-to": scaleMaskImagePosition()
2458
+ }],
2459
+ "mask-image-r-from-color": [{
2460
+ "mask-r-from": scaleColor()
2461
+ }],
2462
+ "mask-image-r-to-color": [{
2463
+ "mask-r-to": scaleColor()
2464
+ }],
2465
+ "mask-image-b-from-pos": [{
2466
+ "mask-b-from": scaleMaskImagePosition()
2467
+ }],
2468
+ "mask-image-b-to-pos": [{
2469
+ "mask-b-to": scaleMaskImagePosition()
2470
+ }],
2471
+ "mask-image-b-from-color": [{
2472
+ "mask-b-from": scaleColor()
2473
+ }],
2474
+ "mask-image-b-to-color": [{
2475
+ "mask-b-to": scaleColor()
2476
+ }],
2477
+ "mask-image-l-from-pos": [{
2478
+ "mask-l-from": scaleMaskImagePosition()
2479
+ }],
2480
+ "mask-image-l-to-pos": [{
2481
+ "mask-l-to": scaleMaskImagePosition()
2482
+ }],
2483
+ "mask-image-l-from-color": [{
2484
+ "mask-l-from": scaleColor()
2485
+ }],
2486
+ "mask-image-l-to-color": [{
2487
+ "mask-l-to": scaleColor()
2488
+ }],
2489
+ "mask-image-x-from-pos": [{
2490
+ "mask-x-from": scaleMaskImagePosition()
2491
+ }],
2492
+ "mask-image-x-to-pos": [{
2493
+ "mask-x-to": scaleMaskImagePosition()
2494
+ }],
2495
+ "mask-image-x-from-color": [{
2496
+ "mask-x-from": scaleColor()
2497
+ }],
2498
+ "mask-image-x-to-color": [{
2499
+ "mask-x-to": scaleColor()
2500
+ }],
2501
+ "mask-image-y-from-pos": [{
2502
+ "mask-y-from": scaleMaskImagePosition()
2503
+ }],
2504
+ "mask-image-y-to-pos": [{
2505
+ "mask-y-to": scaleMaskImagePosition()
2506
+ }],
2507
+ "mask-image-y-from-color": [{
2508
+ "mask-y-from": scaleColor()
2509
+ }],
2510
+ "mask-image-y-to-color": [{
2511
+ "mask-y-to": scaleColor()
2512
+ }],
2513
+ "mask-image-radial": [{
2514
+ "mask-radial": [isArbitraryVariable, isArbitraryValue]
2515
+ }],
2516
+ "mask-image-radial-from-pos": [{
2517
+ "mask-radial-from": scaleMaskImagePosition()
2518
+ }],
2519
+ "mask-image-radial-to-pos": [{
2520
+ "mask-radial-to": scaleMaskImagePosition()
2521
+ }],
2522
+ "mask-image-radial-from-color": [{
2523
+ "mask-radial-from": scaleColor()
2524
+ }],
2525
+ "mask-image-radial-to-color": [{
2526
+ "mask-radial-to": scaleColor()
2527
+ }],
2528
+ "mask-image-radial-shape": [{
2529
+ "mask-radial": ["circle", "ellipse"]
2530
+ }],
2531
+ "mask-image-radial-size": [{
2532
+ "mask-radial": [{
2533
+ closest: ["side", "corner"],
2534
+ farthest: ["side", "corner"]
2535
+ }]
2536
+ }],
2537
+ "mask-image-radial-pos": [{
2538
+ "mask-radial-at": scalePosition()
2539
+ }],
2540
+ "mask-image-conic-pos": [{
2541
+ "mask-conic": [isNumber]
2542
+ }],
2543
+ "mask-image-conic-from-pos": [{
2544
+ "mask-conic-from": scaleMaskImagePosition()
2545
+ }],
2546
+ "mask-image-conic-to-pos": [{
2547
+ "mask-conic-to": scaleMaskImagePosition()
2548
+ }],
2549
+ "mask-image-conic-from-color": [{
2550
+ "mask-conic-from": scaleColor()
2551
+ }],
2552
+ "mask-image-conic-to-color": [{
2553
+ "mask-conic-to": scaleColor()
2554
+ }],
2555
+ /**
2556
+ * Mask Mode
2557
+ * @see https://tailwindcss.com/docs/mask-mode
2558
+ */
2559
+ "mask-mode": [{
2560
+ mask: ["alpha", "luminance", "match"]
2561
+ }],
2562
+ /**
2563
+ * Mask Origin
2564
+ * @see https://tailwindcss.com/docs/mask-origin
2565
+ */
2566
+ "mask-origin": [{
2567
+ "mask-origin": ["border", "padding", "content", "fill", "stroke", "view"]
2568
+ }],
2569
+ /**
2570
+ * Mask Position
2571
+ * @see https://tailwindcss.com/docs/mask-position
2572
+ */
2573
+ "mask-position": [{
2574
+ mask: scaleBgPosition()
2575
+ }],
2576
+ /**
2577
+ * Mask Repeat
2578
+ * @see https://tailwindcss.com/docs/mask-repeat
2579
+ */
2580
+ "mask-repeat": [{
2581
+ mask: scaleBgRepeat()
2582
+ }],
2583
+ /**
2584
+ * Mask Size
2585
+ * @see https://tailwindcss.com/docs/mask-size
2586
+ */
2587
+ "mask-size": [{
2588
+ mask: scaleBgSize()
2589
+ }],
2590
+ /**
2591
+ * Mask Type
2592
+ * @see https://tailwindcss.com/docs/mask-type
2593
+ */
2594
+ "mask-type": [{
2595
+ "mask-type": ["alpha", "luminance"]
2596
+ }],
2597
+ /**
2598
+ * Mask Image
2599
+ * @see https://tailwindcss.com/docs/mask-image
2600
+ */
2601
+ "mask-image": [{
2602
+ mask: ["none", isArbitraryVariable, isArbitraryValue]
2603
+ }],
2604
+ // ---------------
2605
+ // --- Filters ---
2606
+ // ---------------
2607
+ /**
2608
+ * Filter
2609
+ * @see https://tailwindcss.com/docs/filter
2610
+ */
2611
+ filter: [{
2612
+ filter: [
2613
+ // Deprecated since Tailwind CSS v3.0.0
2614
+ "",
2615
+ "none",
2616
+ isArbitraryVariable,
2617
+ isArbitraryValue
2618
+ ]
2619
+ }],
2620
+ /**
2621
+ * Blur
2622
+ * @see https://tailwindcss.com/docs/blur
2623
+ */
2624
+ blur: [{
2625
+ blur: scaleBlur()
2626
+ }],
2627
+ /**
2628
+ * Brightness
2629
+ * @see https://tailwindcss.com/docs/brightness
2630
+ */
2631
+ brightness: [{
2632
+ brightness: [isNumber, isArbitraryVariable, isArbitraryValue]
2633
+ }],
2634
+ /**
2635
+ * Contrast
2636
+ * @see https://tailwindcss.com/docs/contrast
2637
+ */
2638
+ contrast: [{
2639
+ contrast: [isNumber, isArbitraryVariable, isArbitraryValue]
2640
+ }],
2641
+ /**
2642
+ * Drop Shadow
2643
+ * @see https://tailwindcss.com/docs/drop-shadow
2644
+ */
2645
+ "drop-shadow": [{
2646
+ "drop-shadow": [
2647
+ // Deprecated since Tailwind CSS v4.0.0
2648
+ "",
2649
+ "none",
2650
+ themeDropShadow,
2651
+ isArbitraryVariableShadow,
2652
+ isArbitraryShadow
2653
+ ]
2654
+ }],
2655
+ /**
2656
+ * Drop Shadow Color
2657
+ * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
2658
+ */
2659
+ "drop-shadow-color": [{
2660
+ "drop-shadow": scaleColor()
2661
+ }],
2662
+ /**
2663
+ * Grayscale
2664
+ * @see https://tailwindcss.com/docs/grayscale
2665
+ */
2666
+ grayscale: [{
2667
+ grayscale: ["", isNumber, isArbitraryVariable, isArbitraryValue]
2668
+ }],
2669
+ /**
2670
+ * Hue Rotate
2671
+ * @see https://tailwindcss.com/docs/hue-rotate
2672
+ */
2673
+ "hue-rotate": [{
2674
+ "hue-rotate": [isNumber, isArbitraryVariable, isArbitraryValue]
2675
+ }],
2676
+ /**
2677
+ * Invert
2678
+ * @see https://tailwindcss.com/docs/invert
2679
+ */
2680
+ invert: [{
2681
+ invert: ["", isNumber, isArbitraryVariable, isArbitraryValue]
2682
+ }],
2683
+ /**
2684
+ * Saturate
2685
+ * @see https://tailwindcss.com/docs/saturate
2686
+ */
2687
+ saturate: [{
2688
+ saturate: [isNumber, isArbitraryVariable, isArbitraryValue]
2689
+ }],
2690
+ /**
2691
+ * Sepia
2692
+ * @see https://tailwindcss.com/docs/sepia
2693
+ */
2694
+ sepia: [{
2695
+ sepia: ["", isNumber, isArbitraryVariable, isArbitraryValue]
2696
+ }],
2697
+ /**
2698
+ * Backdrop Filter
2699
+ * @see https://tailwindcss.com/docs/backdrop-filter
2700
+ */
2701
+ "backdrop-filter": [{
2702
+ "backdrop-filter": [
2703
+ // Deprecated since Tailwind CSS v3.0.0
2704
+ "",
2705
+ "none",
2706
+ isArbitraryVariable,
2707
+ isArbitraryValue
2708
+ ]
2709
+ }],
2710
+ /**
2711
+ * Backdrop Blur
2712
+ * @see https://tailwindcss.com/docs/backdrop-blur
2713
+ */
2714
+ "backdrop-blur": [{
2715
+ "backdrop-blur": scaleBlur()
2716
+ }],
2717
+ /**
2718
+ * Backdrop Brightness
2719
+ * @see https://tailwindcss.com/docs/backdrop-brightness
2720
+ */
2721
+ "backdrop-brightness": [{
2722
+ "backdrop-brightness": [isNumber, isArbitraryVariable, isArbitraryValue]
2723
+ }],
2724
+ /**
2725
+ * Backdrop Contrast
2726
+ * @see https://tailwindcss.com/docs/backdrop-contrast
2727
+ */
2728
+ "backdrop-contrast": [{
2729
+ "backdrop-contrast": [isNumber, isArbitraryVariable, isArbitraryValue]
2730
+ }],
2731
+ /**
2732
+ * Backdrop Grayscale
2733
+ * @see https://tailwindcss.com/docs/backdrop-grayscale
2734
+ */
2735
+ "backdrop-grayscale": [{
2736
+ "backdrop-grayscale": ["", isNumber, isArbitraryVariable, isArbitraryValue]
2737
+ }],
2738
+ /**
2739
+ * Backdrop Hue Rotate
2740
+ * @see https://tailwindcss.com/docs/backdrop-hue-rotate
2741
+ */
2742
+ "backdrop-hue-rotate": [{
2743
+ "backdrop-hue-rotate": [isNumber, isArbitraryVariable, isArbitraryValue]
2744
+ }],
2745
+ /**
2746
+ * Backdrop Invert
2747
+ * @see https://tailwindcss.com/docs/backdrop-invert
2748
+ */
2749
+ "backdrop-invert": [{
2750
+ "backdrop-invert": ["", isNumber, isArbitraryVariable, isArbitraryValue]
2751
+ }],
2752
+ /**
2753
+ * Backdrop Opacity
2754
+ * @see https://tailwindcss.com/docs/backdrop-opacity
2755
+ */
2756
+ "backdrop-opacity": [{
2757
+ "backdrop-opacity": [isNumber, isArbitraryVariable, isArbitraryValue]
2758
+ }],
2759
+ /**
2760
+ * Backdrop Saturate
2761
+ * @see https://tailwindcss.com/docs/backdrop-saturate
2762
+ */
2763
+ "backdrop-saturate": [{
2764
+ "backdrop-saturate": [isNumber, isArbitraryVariable, isArbitraryValue]
2765
+ }],
2766
+ /**
2767
+ * Backdrop Sepia
2768
+ * @see https://tailwindcss.com/docs/backdrop-sepia
2769
+ */
2770
+ "backdrop-sepia": [{
2771
+ "backdrop-sepia": ["", isNumber, isArbitraryVariable, isArbitraryValue]
2772
+ }],
2773
+ // --------------
2774
+ // --- Tables ---
2775
+ // --------------
2776
+ /**
2777
+ * Border Collapse
2778
+ * @see https://tailwindcss.com/docs/border-collapse
2779
+ */
2780
+ "border-collapse": [{
2781
+ border: ["collapse", "separate"]
2782
+ }],
2783
+ /**
2784
+ * Border Spacing
2785
+ * @see https://tailwindcss.com/docs/border-spacing
2786
+ */
2787
+ "border-spacing": [{
2788
+ "border-spacing": scaleUnambiguousSpacing()
2789
+ }],
2790
+ /**
2791
+ * Border Spacing X
2792
+ * @see https://tailwindcss.com/docs/border-spacing
2793
+ */
2794
+ "border-spacing-x": [{
2795
+ "border-spacing-x": scaleUnambiguousSpacing()
2796
+ }],
2797
+ /**
2798
+ * Border Spacing Y
2799
+ * @see https://tailwindcss.com/docs/border-spacing
2800
+ */
2801
+ "border-spacing-y": [{
2802
+ "border-spacing-y": scaleUnambiguousSpacing()
2803
+ }],
2804
+ /**
2805
+ * Table Layout
2806
+ * @see https://tailwindcss.com/docs/table-layout
2807
+ */
2808
+ "table-layout": [{
2809
+ table: ["auto", "fixed"]
2810
+ }],
2811
+ /**
2812
+ * Caption Side
2813
+ * @see https://tailwindcss.com/docs/caption-side
2814
+ */
2815
+ caption: [{
2816
+ caption: ["top", "bottom"]
2817
+ }],
2818
+ // ---------------------------------
2819
+ // --- Transitions and Animation ---
2820
+ // ---------------------------------
2821
+ /**
2822
+ * Transition Property
2823
+ * @see https://tailwindcss.com/docs/transition-property
2824
+ */
2825
+ transition: [{
2826
+ transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", isArbitraryVariable, isArbitraryValue]
2827
+ }],
2828
+ /**
2829
+ * Transition Behavior
2830
+ * @see https://tailwindcss.com/docs/transition-behavior
2831
+ */
2832
+ "transition-behavior": [{
2833
+ transition: ["normal", "discrete"]
2834
+ }],
2835
+ /**
2836
+ * Transition Duration
2837
+ * @see https://tailwindcss.com/docs/transition-duration
2838
+ */
2839
+ duration: [{
2840
+ duration: [isNumber, "initial", isArbitraryVariable, isArbitraryValue]
2841
+ }],
2842
+ /**
2843
+ * Transition Timing Function
2844
+ * @see https://tailwindcss.com/docs/transition-timing-function
2845
+ */
2846
+ ease: [{
2847
+ ease: ["linear", "initial", themeEase, isArbitraryVariable, isArbitraryValue]
2848
+ }],
2849
+ /**
2850
+ * Transition Delay
2851
+ * @see https://tailwindcss.com/docs/transition-delay
2852
+ */
2853
+ delay: [{
2854
+ delay: [isNumber, isArbitraryVariable, isArbitraryValue]
2855
+ }],
2856
+ /**
2857
+ * Animation
2858
+ * @see https://tailwindcss.com/docs/animation
2859
+ */
2860
+ animate: [{
2861
+ animate: ["none", themeAnimate, isArbitraryVariable, isArbitraryValue]
2862
+ }],
2863
+ // ------------------
2864
+ // --- Transforms ---
2865
+ // ------------------
2866
+ /**
2867
+ * Backface Visibility
2868
+ * @see https://tailwindcss.com/docs/backface-visibility
2869
+ */
2870
+ backface: [{
2871
+ backface: ["hidden", "visible"]
2872
+ }],
2873
+ /**
2874
+ * Perspective
2875
+ * @see https://tailwindcss.com/docs/perspective
2876
+ */
2877
+ perspective: [{
2878
+ perspective: [themePerspective, isArbitraryVariable, isArbitraryValue]
2879
+ }],
2880
+ /**
2881
+ * Perspective Origin
2882
+ * @see https://tailwindcss.com/docs/perspective-origin
2883
+ */
2884
+ "perspective-origin": [{
2885
+ "perspective-origin": scalePositionWithArbitrary()
2886
+ }],
2887
+ /**
2888
+ * Rotate
2889
+ * @see https://tailwindcss.com/docs/rotate
2890
+ */
2891
+ rotate: [{
2892
+ rotate: scaleRotate()
2893
+ }],
2894
+ /**
2895
+ * Rotate X
2896
+ * @see https://tailwindcss.com/docs/rotate
2897
+ */
2898
+ "rotate-x": [{
2899
+ "rotate-x": scaleRotate()
2900
+ }],
2901
+ /**
2902
+ * Rotate Y
2903
+ * @see https://tailwindcss.com/docs/rotate
2904
+ */
2905
+ "rotate-y": [{
2906
+ "rotate-y": scaleRotate()
2907
+ }],
2908
+ /**
2909
+ * Rotate Z
2910
+ * @see https://tailwindcss.com/docs/rotate
2911
+ */
2912
+ "rotate-z": [{
2913
+ "rotate-z": scaleRotate()
2914
+ }],
2915
+ /**
2916
+ * Scale
2917
+ * @see https://tailwindcss.com/docs/scale
2918
+ */
2919
+ scale: [{
2920
+ scale: scaleScale()
2921
+ }],
2922
+ /**
2923
+ * Scale X
2924
+ * @see https://tailwindcss.com/docs/scale
2925
+ */
2926
+ "scale-x": [{
2927
+ "scale-x": scaleScale()
2928
+ }],
2929
+ /**
2930
+ * Scale Y
2931
+ * @see https://tailwindcss.com/docs/scale
2932
+ */
2933
+ "scale-y": [{
2934
+ "scale-y": scaleScale()
2935
+ }],
2936
+ /**
2937
+ * Scale Z
2938
+ * @see https://tailwindcss.com/docs/scale
2939
+ */
2940
+ "scale-z": [{
2941
+ "scale-z": scaleScale()
2942
+ }],
2943
+ /**
2944
+ * Scale 3D
2945
+ * @see https://tailwindcss.com/docs/scale
2946
+ */
2947
+ "scale-3d": ["scale-3d"],
2948
+ /**
2949
+ * Skew
2950
+ * @see https://tailwindcss.com/docs/skew
2951
+ */
2952
+ skew: [{
2953
+ skew: scaleSkew()
2954
+ }],
2955
+ /**
2956
+ * Skew X
2957
+ * @see https://tailwindcss.com/docs/skew
2958
+ */
2959
+ "skew-x": [{
2960
+ "skew-x": scaleSkew()
2961
+ }],
2962
+ /**
2963
+ * Skew Y
2964
+ * @see https://tailwindcss.com/docs/skew
2965
+ */
2966
+ "skew-y": [{
2967
+ "skew-y": scaleSkew()
2968
+ }],
2969
+ /**
2970
+ * Transform
2971
+ * @see https://tailwindcss.com/docs/transform
2972
+ */
2973
+ transform: [{
2974
+ transform: [isArbitraryVariable, isArbitraryValue, "", "none", "gpu", "cpu"]
2975
+ }],
2976
+ /**
2977
+ * Transform Origin
2978
+ * @see https://tailwindcss.com/docs/transform-origin
2979
+ */
2980
+ "transform-origin": [{
2981
+ origin: scalePositionWithArbitrary()
2982
+ }],
2983
+ /**
2984
+ * Transform Style
2985
+ * @see https://tailwindcss.com/docs/transform-style
2986
+ */
2987
+ "transform-style": [{
2988
+ transform: ["3d", "flat"]
2989
+ }],
2990
+ /**
2991
+ * Translate
2992
+ * @see https://tailwindcss.com/docs/translate
2993
+ */
2994
+ translate: [{
2995
+ translate: scaleTranslate()
2996
+ }],
2997
+ /**
2998
+ * Translate X
2999
+ * @see https://tailwindcss.com/docs/translate
3000
+ */
3001
+ "translate-x": [{
3002
+ "translate-x": scaleTranslate()
3003
+ }],
3004
+ /**
3005
+ * Translate Y
3006
+ * @see https://tailwindcss.com/docs/translate
3007
+ */
3008
+ "translate-y": [{
3009
+ "translate-y": scaleTranslate()
3010
+ }],
3011
+ /**
3012
+ * Translate Z
3013
+ * @see https://tailwindcss.com/docs/translate
3014
+ */
3015
+ "translate-z": [{
3016
+ "translate-z": scaleTranslate()
3017
+ }],
3018
+ /**
3019
+ * Translate None
3020
+ * @see https://tailwindcss.com/docs/translate
3021
+ */
3022
+ "translate-none": ["translate-none"],
3023
+ // ---------------------
3024
+ // --- Interactivity ---
3025
+ // ---------------------
3026
+ /**
3027
+ * Accent Color
3028
+ * @see https://tailwindcss.com/docs/accent-color
3029
+ */
3030
+ accent: [{
3031
+ accent: scaleColor()
3032
+ }],
3033
+ /**
3034
+ * Appearance
3035
+ * @see https://tailwindcss.com/docs/appearance
3036
+ */
3037
+ appearance: [{
3038
+ appearance: ["none", "auto"]
3039
+ }],
3040
+ /**
3041
+ * Caret Color
3042
+ * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
3043
+ */
3044
+ "caret-color": [{
3045
+ caret: scaleColor()
3046
+ }],
3047
+ /**
3048
+ * Color Scheme
3049
+ * @see https://tailwindcss.com/docs/color-scheme
3050
+ */
3051
+ "color-scheme": [{
3052
+ scheme: ["normal", "dark", "light", "light-dark", "only-dark", "only-light"]
3053
+ }],
3054
+ /**
3055
+ * Cursor
3056
+ * @see https://tailwindcss.com/docs/cursor
3057
+ */
3058
+ cursor: [{
3059
+ 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", isArbitraryVariable, isArbitraryValue]
3060
+ }],
3061
+ /**
3062
+ * Field Sizing
3063
+ * @see https://tailwindcss.com/docs/field-sizing
3064
+ */
3065
+ "field-sizing": [{
3066
+ "field-sizing": ["fixed", "content"]
3067
+ }],
3068
+ /**
3069
+ * Pointer Events
3070
+ * @see https://tailwindcss.com/docs/pointer-events
3071
+ */
3072
+ "pointer-events": [{
3073
+ "pointer-events": ["auto", "none"]
3074
+ }],
3075
+ /**
3076
+ * Resize
3077
+ * @see https://tailwindcss.com/docs/resize
3078
+ */
3079
+ resize: [{
3080
+ resize: ["none", "", "y", "x"]
3081
+ }],
3082
+ /**
3083
+ * Scroll Behavior
3084
+ * @see https://tailwindcss.com/docs/scroll-behavior
3085
+ */
3086
+ "scroll-behavior": [{
3087
+ scroll: ["auto", "smooth"]
3088
+ }],
3089
+ /**
3090
+ * Scroll Margin
3091
+ * @see https://tailwindcss.com/docs/scroll-margin
3092
+ */
3093
+ "scroll-m": [{
3094
+ "scroll-m": scaleUnambiguousSpacing()
3095
+ }],
3096
+ /**
3097
+ * Scroll Margin X
3098
+ * @see https://tailwindcss.com/docs/scroll-margin
3099
+ */
3100
+ "scroll-mx": [{
3101
+ "scroll-mx": scaleUnambiguousSpacing()
3102
+ }],
3103
+ /**
3104
+ * Scroll Margin Y
3105
+ * @see https://tailwindcss.com/docs/scroll-margin
3106
+ */
3107
+ "scroll-my": [{
3108
+ "scroll-my": scaleUnambiguousSpacing()
3109
+ }],
3110
+ /**
3111
+ * Scroll Margin Start
3112
+ * @see https://tailwindcss.com/docs/scroll-margin
3113
+ */
3114
+ "scroll-ms": [{
3115
+ "scroll-ms": scaleUnambiguousSpacing()
3116
+ }],
3117
+ /**
3118
+ * Scroll Margin End
3119
+ * @see https://tailwindcss.com/docs/scroll-margin
3120
+ */
3121
+ "scroll-me": [{
3122
+ "scroll-me": scaleUnambiguousSpacing()
3123
+ }],
3124
+ /**
3125
+ * Scroll Margin Top
3126
+ * @see https://tailwindcss.com/docs/scroll-margin
3127
+ */
3128
+ "scroll-mt": [{
3129
+ "scroll-mt": scaleUnambiguousSpacing()
3130
+ }],
3131
+ /**
3132
+ * Scroll Margin Right
3133
+ * @see https://tailwindcss.com/docs/scroll-margin
3134
+ */
3135
+ "scroll-mr": [{
3136
+ "scroll-mr": scaleUnambiguousSpacing()
3137
+ }],
3138
+ /**
3139
+ * Scroll Margin Bottom
3140
+ * @see https://tailwindcss.com/docs/scroll-margin
3141
+ */
3142
+ "scroll-mb": [{
3143
+ "scroll-mb": scaleUnambiguousSpacing()
3144
+ }],
3145
+ /**
3146
+ * Scroll Margin Left
3147
+ * @see https://tailwindcss.com/docs/scroll-margin
3148
+ */
3149
+ "scroll-ml": [{
3150
+ "scroll-ml": scaleUnambiguousSpacing()
3151
+ }],
3152
+ /**
3153
+ * Scroll Padding
3154
+ * @see https://tailwindcss.com/docs/scroll-padding
3155
+ */
3156
+ "scroll-p": [{
3157
+ "scroll-p": scaleUnambiguousSpacing()
3158
+ }],
3159
+ /**
3160
+ * Scroll Padding X
3161
+ * @see https://tailwindcss.com/docs/scroll-padding
3162
+ */
3163
+ "scroll-px": [{
3164
+ "scroll-px": scaleUnambiguousSpacing()
3165
+ }],
3166
+ /**
3167
+ * Scroll Padding Y
3168
+ * @see https://tailwindcss.com/docs/scroll-padding
3169
+ */
3170
+ "scroll-py": [{
3171
+ "scroll-py": scaleUnambiguousSpacing()
3172
+ }],
3173
+ /**
3174
+ * Scroll Padding Start
3175
+ * @see https://tailwindcss.com/docs/scroll-padding
3176
+ */
3177
+ "scroll-ps": [{
3178
+ "scroll-ps": scaleUnambiguousSpacing()
3179
+ }],
3180
+ /**
3181
+ * Scroll Padding End
3182
+ * @see https://tailwindcss.com/docs/scroll-padding
3183
+ */
3184
+ "scroll-pe": [{
3185
+ "scroll-pe": scaleUnambiguousSpacing()
3186
+ }],
3187
+ /**
3188
+ * Scroll Padding Top
3189
+ * @see https://tailwindcss.com/docs/scroll-padding
3190
+ */
3191
+ "scroll-pt": [{
3192
+ "scroll-pt": scaleUnambiguousSpacing()
3193
+ }],
3194
+ /**
3195
+ * Scroll Padding Right
3196
+ * @see https://tailwindcss.com/docs/scroll-padding
3197
+ */
3198
+ "scroll-pr": [{
3199
+ "scroll-pr": scaleUnambiguousSpacing()
3200
+ }],
3201
+ /**
3202
+ * Scroll Padding Bottom
3203
+ * @see https://tailwindcss.com/docs/scroll-padding
3204
+ */
3205
+ "scroll-pb": [{
3206
+ "scroll-pb": scaleUnambiguousSpacing()
3207
+ }],
3208
+ /**
3209
+ * Scroll Padding Left
3210
+ * @see https://tailwindcss.com/docs/scroll-padding
3211
+ */
3212
+ "scroll-pl": [{
3213
+ "scroll-pl": scaleUnambiguousSpacing()
3214
+ }],
3215
+ /**
3216
+ * Scroll Snap Align
3217
+ * @see https://tailwindcss.com/docs/scroll-snap-align
3218
+ */
3219
+ "snap-align": [{
3220
+ snap: ["start", "end", "center", "align-none"]
3221
+ }],
3222
+ /**
3223
+ * Scroll Snap Stop
3224
+ * @see https://tailwindcss.com/docs/scroll-snap-stop
3225
+ */
3226
+ "snap-stop": [{
3227
+ snap: ["normal", "always"]
3228
+ }],
3229
+ /**
3230
+ * Scroll Snap Type
3231
+ * @see https://tailwindcss.com/docs/scroll-snap-type
3232
+ */
3233
+ "snap-type": [{
3234
+ snap: ["none", "x", "y", "both"]
3235
+ }],
3236
+ /**
3237
+ * Scroll Snap Type Strictness
3238
+ * @see https://tailwindcss.com/docs/scroll-snap-type
3239
+ */
3240
+ "snap-strictness": [{
3241
+ snap: ["mandatory", "proximity"]
3242
+ }],
3243
+ /**
3244
+ * Touch Action
3245
+ * @see https://tailwindcss.com/docs/touch-action
3246
+ */
3247
+ touch: [{
3248
+ touch: ["auto", "none", "manipulation"]
3249
+ }],
3250
+ /**
3251
+ * Touch Action X
3252
+ * @see https://tailwindcss.com/docs/touch-action
3253
+ */
3254
+ "touch-x": [{
3255
+ "touch-pan": ["x", "left", "right"]
3256
+ }],
3257
+ /**
3258
+ * Touch Action Y
3259
+ * @see https://tailwindcss.com/docs/touch-action
3260
+ */
3261
+ "touch-y": [{
3262
+ "touch-pan": ["y", "up", "down"]
3263
+ }],
3264
+ /**
3265
+ * Touch Action Pinch Zoom
3266
+ * @see https://tailwindcss.com/docs/touch-action
3267
+ */
3268
+ "touch-pz": ["touch-pinch-zoom"],
3269
+ /**
3270
+ * User Select
3271
+ * @see https://tailwindcss.com/docs/user-select
3272
+ */
3273
+ select: [{
3274
+ select: ["none", "text", "all", "auto"]
3275
+ }],
3276
+ /**
3277
+ * Will Change
3278
+ * @see https://tailwindcss.com/docs/will-change
3279
+ */
3280
+ "will-change": [{
3281
+ "will-change": ["auto", "scroll", "contents", "transform", isArbitraryVariable, isArbitraryValue]
3282
+ }],
3283
+ // -----------
3284
+ // --- SVG ---
3285
+ // -----------
3286
+ /**
3287
+ * Fill
3288
+ * @see https://tailwindcss.com/docs/fill
3289
+ */
3290
+ fill: [{
3291
+ fill: ["none", ...scaleColor()]
3292
+ }],
3293
+ /**
3294
+ * Stroke Width
3295
+ * @see https://tailwindcss.com/docs/stroke-width
3296
+ */
3297
+ "stroke-w": [{
3298
+ stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]
3299
+ }],
3300
+ /**
3301
+ * Stroke
3302
+ * @see https://tailwindcss.com/docs/stroke
3303
+ */
3304
+ stroke: [{
3305
+ stroke: ["none", ...scaleColor()]
3306
+ }],
3307
+ // ---------------------
3308
+ // --- Accessibility ---
3309
+ // ---------------------
3310
+ /**
3311
+ * Forced Color Adjust
3312
+ * @see https://tailwindcss.com/docs/forced-color-adjust
3313
+ */
3314
+ "forced-color-adjust": [{
3315
+ "forced-color-adjust": ["auto", "none"]
3316
+ }]
3317
+ },
3318
+ conflictingClassGroups: {
3319
+ overflow: ["overflow-x", "overflow-y"],
3320
+ overscroll: ["overscroll-x", "overscroll-y"],
3321
+ inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
3322
+ "inset-x": ["right", "left"],
3323
+ "inset-y": ["top", "bottom"],
3324
+ flex: ["basis", "grow", "shrink"],
3325
+ gap: ["gap-x", "gap-y"],
3326
+ p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
3327
+ px: ["pr", "pl"],
3328
+ py: ["pt", "pb"],
3329
+ m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
3330
+ mx: ["mr", "ml"],
3331
+ my: ["mt", "mb"],
3332
+ size: ["w", "h"],
3333
+ "font-size": ["leading"],
3334
+ "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
3335
+ "fvn-ordinal": ["fvn-normal"],
3336
+ "fvn-slashed-zero": ["fvn-normal"],
3337
+ "fvn-figure": ["fvn-normal"],
3338
+ "fvn-spacing": ["fvn-normal"],
3339
+ "fvn-fraction": ["fvn-normal"],
3340
+ "line-clamp": ["display", "overflow"],
3341
+ 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"],
3342
+ "rounded-s": ["rounded-ss", "rounded-es"],
3343
+ "rounded-e": ["rounded-se", "rounded-ee"],
3344
+ "rounded-t": ["rounded-tl", "rounded-tr"],
3345
+ "rounded-r": ["rounded-tr", "rounded-br"],
3346
+ "rounded-b": ["rounded-br", "rounded-bl"],
3347
+ "rounded-l": ["rounded-tl", "rounded-bl"],
3348
+ "border-spacing": ["border-spacing-x", "border-spacing-y"],
3349
+ "border-w": ["border-w-x", "border-w-y", "border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
3350
+ "border-w-x": ["border-w-r", "border-w-l"],
3351
+ "border-w-y": ["border-w-t", "border-w-b"],
3352
+ "border-color": ["border-color-x", "border-color-y", "border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
3353
+ "border-color-x": ["border-color-r", "border-color-l"],
3354
+ "border-color-y": ["border-color-t", "border-color-b"],
3355
+ translate: ["translate-x", "translate-y", "translate-none"],
3356
+ "translate-none": ["translate", "translate-x", "translate-y", "translate-z"],
3357
+ "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
3358
+ "scroll-mx": ["scroll-mr", "scroll-ml"],
3359
+ "scroll-my": ["scroll-mt", "scroll-mb"],
3360
+ "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
3361
+ "scroll-px": ["scroll-pr", "scroll-pl"],
3362
+ "scroll-py": ["scroll-pt", "scroll-pb"],
3363
+ touch: ["touch-x", "touch-y", "touch-pz"],
3364
+ "touch-x": ["touch"],
3365
+ "touch-y": ["touch"],
3366
+ "touch-pz": ["touch"]
3367
+ },
3368
+ conflictingClassGroupModifiers: {
3369
+ "font-size": ["leading"]
3370
+ },
3371
+ orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
3372
+ };
3373
+ };
3374
+ const twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
3375
+ function cn(...inputs) {
3376
+ return twMerge(clsx(inputs));
3377
+ }
3378
+ function matchMediaQuery(query) {
3379
+ return window.matchMedia(query).matches;
3380
+ }
3381
+ function createMediaQueryFn(query) {
3382
+ return () => matchMediaQuery(query);
3383
+ }
3384
+ const prefersReducedMotion = createMediaQueryFn(
3385
+ "(prefers-reduced-motion: reduce)"
769
3386
  );
770
- var Label2 = React3__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
771
- LabelPrimitive__namespace.Root,
772
- {
773
- ref,
774
- className: cn(labelVariants(), className),
775
- ...props
776
- }
777
- ));
778
- Label2.displayName = LabelPrimitive__namespace.Root.displayName;
779
-
780
- // src/types/simulator.ts
781
- var SCREEN_WIDTHS = {
3387
+ const isPrimarilyTouchDevice = createMediaQueryFn("(pointer: coarse)");
3388
+ const isHoverAvailable = createMediaQueryFn("(hover: hover)");
3389
+ const SCREEN_WIDTHS = {
782
3390
  "mobile-s": 375,
783
3391
  "mobile-l": 425,
784
3392
  tablet: 768,
@@ -794,10 +3402,10 @@ function Conversation({
794
3402
  const displayMode = useDisplayMode() ?? "inline";
795
3403
  const containerWidth = screenWidth === "full" ? "100%" : `${SCREEN_WIDTHS[screenWidth]}px`;
796
3404
  if (displayMode === "fullscreen") {
797
- return /* @__PURE__ */ jsxRuntime.jsx(SidebarInset, { className: "flex flex-col bg-background", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-auto", children }) });
3405
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col bg-surface w-full flex-1", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-auto", children }) });
798
3406
  }
799
- return /* @__PURE__ */ jsxRuntime.jsxs(SidebarInset, { className: "flex flex-col bg-background", children: [
800
- /* @__PURE__ */ jsxRuntime.jsx("header", { className: "h-12 border-b border-border bg-background flex items-center px-4 text-lg", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground", children: "ChatGPT" }) }),
3407
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col bg-surface w-full h-full flex-1", children: [
3408
+ /* @__PURE__ */ jsxRuntime.jsx("header", { className: "h-12 border-b border-subtle bg-surface flex items-center px-4 text-lg", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground", children: "ChatGPT" }) }),
801
3409
  /* @__PURE__ */ jsxRuntime.jsxs(
802
3410
  "div",
803
3411
  {
@@ -818,7 +3426,7 @@ function Conversation({
818
3426
  {
819
3427
  "data-message-author-role": "user",
820
3428
  className: "min-h-8 relative flex w-full flex-col items-end gap-2 text-start break-words whitespace-normal",
821
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full flex-col gap-1 empty:hidden items-end", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-secondary text-secondary-foreground relative rounded-[18px] px-4 py-3 max-w-[70%]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "whitespace-pre-wrap", children: userMessage }) }) })
3429
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full flex-col gap-1 empty:hidden items-end", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-[var(--color-background-primary-soft)] relative rounded-[18px] px-4 py-3 max-w-[70%]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "whitespace-pre-wrap", children: userMessage }) }) })
822
3430
  }
823
3431
  ) }) }) })
824
3432
  ]
@@ -862,13 +3470,14 @@ function Conversation({
862
3470
  }
863
3471
  )
864
3472
  ] }),
865
- /* @__PURE__ */ jsxRuntime.jsx("footer", { className: "bg-background", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-[48rem] mx-auto px-4 py-4", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", children: /* @__PURE__ */ jsxRuntime.jsx(
3473
+ /* @__PURE__ */ jsxRuntime.jsx("footer", { className: "bg-surface", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-[48rem] mx-auto px-4 py-4", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", children: /* @__PURE__ */ jsxRuntime.jsx(
866
3474
  "input",
867
3475
  {
868
3476
  type: "text",
3477
+ name: "userInput",
869
3478
  disabled: true,
870
3479
  placeholder: "Message ChatGPT",
871
- className: "w-full bg-secondary text-secondary-foreground placeholder:text-muted-foreground rounded-3xl px-5 py-3 pr-12 outline-none"
3480
+ className: "w-full bg-[var(--color-background-primary)] dark:bg-[#303030] text-secondary-foreground placeholder:text-muted-foreground rounded-3xl px-5 py-3 pr-12 shadow-md light:border border-[#0000000f]"
872
3481
  }
873
3482
  ) }) }) })
874
3483
  ]
@@ -876,9 +3485,7 @@ function Conversation({
876
3485
  )
877
3486
  ] });
878
3487
  }
879
-
880
- // src/components/simulator/mock-openai.ts
881
- var MockOpenAI = class {
3488
+ class MockOpenAI {
882
3489
  constructor() {
883
3490
  __publicField(this, "theme", "light");
884
3491
  __publicField(this, "userAgent", {
@@ -958,20 +3565,20 @@ var MockOpenAI = class {
958
3565
  });
959
3566
  }
960
3567
  }
961
- };
3568
+ }
962
3569
  function initMockOpenAI(initialData) {
963
3570
  if (typeof window !== "undefined") {
964
3571
  const mock = new MockOpenAI();
965
- if (initialData?.theme !== void 0) {
3572
+ if ((initialData == null ? void 0 : initialData.theme) !== void 0) {
966
3573
  mock.theme = initialData.theme;
967
3574
  }
968
- if (initialData?.displayMode !== void 0) {
3575
+ if ((initialData == null ? void 0 : initialData.displayMode) !== void 0) {
969
3576
  mock.displayMode = initialData.displayMode;
970
3577
  }
971
- if (initialData?.toolOutput !== void 0) {
3578
+ if ((initialData == null ? void 0 : initialData.toolOutput) !== void 0) {
972
3579
  mock.toolOutput = initialData.toolOutput;
973
3580
  }
974
- if (initialData?.widgetState !== void 0) {
3581
+ if ((initialData == null ? void 0 : initialData.widgetState) !== void 0) {
975
3582
  mock.widgetState = initialData.widgetState;
976
3583
  }
977
3584
  window.openai = mock;
@@ -979,8 +3586,44 @@ function initMockOpenAI(initialData) {
979
3586
  }
980
3587
  return new MockOpenAI();
981
3588
  }
982
- var DEFAULT_THEME = "dark";
983
- var DEFAULT_DISPLAY_MODE = "inline";
3589
+ function applyDocumentTheme(theme) {
3590
+ const htmlTag = document.documentElement;
3591
+ htmlTag.setAttribute("data-theme", theme);
3592
+ htmlTag.style.colorScheme = theme;
3593
+ }
3594
+ const ThemeProviderContext = React__namespace.createContext(
3595
+ void 0
3596
+ );
3597
+ function ThemeProvider({
3598
+ children,
3599
+ defaultTheme = "light",
3600
+ theme: controlledTheme,
3601
+ ...props
3602
+ }) {
3603
+ const [internalTheme] = React__namespace.useState(defaultTheme);
3604
+ const theme = controlledTheme ?? internalTheme;
3605
+ React__namespace.useLayoutEffect(() => {
3606
+ if (typeof window !== "undefined" && typeof document !== "undefined") {
3607
+ try {
3608
+ applyDocumentTheme(theme);
3609
+ } catch (error) {
3610
+ console.warn("Failed to apply document theme:", error);
3611
+ }
3612
+ }
3613
+ }, [theme]);
3614
+ const value = {
3615
+ theme
3616
+ };
3617
+ return /* @__PURE__ */ jsxRuntime.jsx(ThemeProviderContext.Provider, { ...props, value, children });
3618
+ }
3619
+ const useThemeContext = () => {
3620
+ const context = React__namespace.useContext(ThemeProviderContext);
3621
+ if (context === void 0)
3622
+ throw new Error("useThemeContext must be used within a ThemeProvider");
3623
+ return context;
3624
+ };
3625
+ const DEFAULT_THEME = "dark";
3626
+ const DEFAULT_DISPLAY_MODE = "inline";
984
3627
  function ChatGPTSimulator({
985
3628
  children,
986
3629
  appName,
@@ -989,8 +3632,8 @@ function ChatGPTSimulator({
989
3632
  toolOutput = null,
990
3633
  widgetState = null
991
3634
  }) {
992
- const [screenWidth, setScreenWidth] = React3__namespace.useState("full");
993
- const mock = React3.useMemo(
3635
+ const [screenWidth, setScreenWidth] = React__namespace.useState("full");
3636
+ const mock = React.useMemo(
994
3637
  () => initMockOpenAI({
995
3638
  theme: DEFAULT_THEME,
996
3639
  displayMode: DEFAULT_DISPLAY_MODE
@@ -999,7 +3642,7 @@ function ChatGPTSimulator({
999
3642
  );
1000
3643
  const theme = useTheme() ?? DEFAULT_THEME;
1001
3644
  const displayMode = useDisplayMode() ?? DEFAULT_DISPLAY_MODE;
1002
- React3.useLayoutEffect(() => {
3645
+ React.useLayoutEffect(() => {
1003
3646
  if (mock && typeof window !== "undefined") {
1004
3647
  window.openai = mock;
1005
3648
  if (toolOutput !== void 0) {
@@ -1010,65 +3653,67 @@ function ChatGPTSimulator({
1010
3653
  }
1011
3654
  }
1012
3655
  }, [mock, toolOutput, widgetState]);
1013
- React3.useEffect(() => {
3656
+ React.useEffect(() => {
1014
3657
  return () => {
1015
3658
  if (typeof window !== "undefined") {
1016
3659
  delete window.openai;
1017
3660
  }
1018
3661
  };
1019
3662
  }, []);
1020
- return /* @__PURE__ */ jsxRuntime.jsx(ThemeProvider, { theme, children: /* @__PURE__ */ jsxRuntime.jsxs(SidebarProvider, { defaultOpen: true, children: [
1021
- /* @__PURE__ */ jsxRuntime.jsx(Sidebar, { children: /* @__PURE__ */ jsxRuntime.jsx(SidebarContent, { children: /* @__PURE__ */ jsxRuntime.jsxs(SidebarGroup, { children: [
1022
- /* @__PURE__ */ jsxRuntime.jsx(SidebarGroupLabel, { className: "text-md", children: "Controls" }),
1023
- /* @__PURE__ */ jsxRuntime.jsxs(SidebarGroupContent, { className: "space-y-4", children: [
1024
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
1025
- /* @__PURE__ */ jsxRuntime.jsx(Label2, { htmlFor: "theme-select", className: "text-xs", children: "Theme" }),
1026
- /* @__PURE__ */ jsxRuntime.jsxs(Select, { value: theme, onValueChange: (value) => mock.setTheme(value), children: [
1027
- /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { id: "theme-select", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, {}) }),
1028
- /* @__PURE__ */ jsxRuntime.jsxs(SelectContent, { children: [
1029
- /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: "light", children: "Light" }),
1030
- /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: "dark", children: "Dark" })
1031
- ] })
1032
- ] })
1033
- ] }),
1034
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
1035
- /* @__PURE__ */ jsxRuntime.jsx(Label2, { htmlFor: "display-mode-select", className: "text-xs", children: "Display Mode" }),
1036
- /* @__PURE__ */ jsxRuntime.jsxs(Select, { value: displayMode, onValueChange: (value) => mock.setDisplayMode(value), children: [
1037
- /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { id: "display-mode-select", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, {}) }),
1038
- /* @__PURE__ */ jsxRuntime.jsxs(SelectContent, { children: [
1039
- /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: "inline", children: "Inline" }),
1040
- /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: "pip", children: "Picture in Picture" }),
1041
- /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: "fullscreen", children: "Fullscreen" })
1042
- ] })
1043
- ] })
1044
- ] }),
1045
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
1046
- /* @__PURE__ */ jsxRuntime.jsx(Label2, { htmlFor: "screen-width-select", className: "text-xs", children: "Body Width" }),
1047
- /* @__PURE__ */ jsxRuntime.jsxs(Select, { value: screenWidth, onValueChange: (value) => setScreenWidth(value), children: [
1048
- /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { id: "screen-width-select", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, {}) }),
1049
- /* @__PURE__ */ jsxRuntime.jsxs(SelectContent, { children: [
1050
- /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: "mobile-s", children: "Mobile S (375px)" }),
1051
- /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: "mobile-l", children: "Mobile L (425px)" }),
1052
- /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: "tablet", children: "Tablet (768px)" }),
1053
- /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: "full", children: "100% (Full)" })
1054
- ] })
1055
- ] })
1056
- ] })
1057
- ] })
1058
- ] }) }) }),
1059
- /* @__PURE__ */ jsxRuntime.jsx(
1060
- Conversation,
1061
- {
1062
- screenWidth,
1063
- appName,
1064
- appIcon,
1065
- userMessage,
1066
- children
1067
- }
1068
- )
1069
- ] }) });
3663
+ return /* @__PURE__ */ jsxRuntime.jsx(ThemeProvider, { theme, children: /* @__PURE__ */ jsxRuntime.jsx(
3664
+ SimpleSidebar,
3665
+ {
3666
+ controls: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
3667
+ /* @__PURE__ */ jsxRuntime.jsx(SidebarControl, { label: "Theme", children: /* @__PURE__ */ jsxRuntime.jsx(
3668
+ SidebarSelect,
3669
+ {
3670
+ value: theme,
3671
+ onChange: (value) => mock.setTheme(value),
3672
+ options: [
3673
+ { value: "light", label: "Light" },
3674
+ { value: "dark", label: "Dark" }
3675
+ ]
3676
+ }
3677
+ ) }),
3678
+ /* @__PURE__ */ jsxRuntime.jsx(SidebarControl, { label: "Display Mode", children: /* @__PURE__ */ jsxRuntime.jsx(
3679
+ SidebarSelect,
3680
+ {
3681
+ value: displayMode,
3682
+ onChange: (value) => mock.setDisplayMode(value),
3683
+ options: [
3684
+ { value: "inline", label: "Inline" },
3685
+ { value: "pip", label: "Picture in Picture" },
3686
+ { value: "fullscreen", label: "Fullscreen" }
3687
+ ]
3688
+ }
3689
+ ) }),
3690
+ /* @__PURE__ */ jsxRuntime.jsx(SidebarControl, { label: "Body Width", children: /* @__PURE__ */ jsxRuntime.jsx(
3691
+ SidebarSelect,
3692
+ {
3693
+ value: screenWidth,
3694
+ onChange: (value) => setScreenWidth(value),
3695
+ options: [
3696
+ { value: "mobile-s", label: "Mobile S (375px)" },
3697
+ { value: "mobile-l", label: "Mobile L (425px)" },
3698
+ { value: "tablet", label: "Tablet (768px)" },
3699
+ { value: "full", label: "100% (Full)" }
3700
+ ]
3701
+ }
3702
+ ) })
3703
+ ] }),
3704
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3705
+ Conversation,
3706
+ {
3707
+ screenWidth,
3708
+ appName,
3709
+ appIcon,
3710
+ userMessage,
3711
+ children
3712
+ }
3713
+ )
3714
+ }
3715
+ ) });
1070
3716
  }
1071
-
1072
3717
  exports.ChatGPTSimulator = ChatGPTSimulator;
1073
3718
  exports.SCREEN_WIDTHS = SCREEN_WIDTHS;
1074
3719
  exports.SET_GLOBALS_EVENT_TYPE = SET_GLOBALS_EVENT_TYPE;
@@ -1103,4 +3748,3 @@ exports.useWidgetGlobal = useWidgetGlobal;
1103
3748
  exports.useWidgetProps = useWidgetProps;
1104
3749
  exports.useWidgetState = useWidgetState;
1105
3750
  //# sourceMappingURL=index.cjs.map
1106
- //# sourceMappingURL=index.cjs.map