@kbach/react 0.5.1 → 0.5.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.
package/dist/index.js CHANGED
@@ -142,290 +142,312 @@ var defaultColors = {
142
142
  black: "#000000",
143
143
  white: "#ffffff",
144
144
  slate: {
145
- 1: "#f8f9fc",
146
- 2: "#edf0f8",
147
- 3: "#dde3f2",
148
- 4: "#c5cee8",
149
- 5: "#9badd3",
150
- 6: "#6c87b6",
151
- 7: "#526b98",
152
- 8: "#3e5479",
153
- 9: "#2d3f5e",
154
- 10: "#1d2b42",
155
- 11: "#0f1828"
145
+ 1: "#f8fafc",
146
+ 2: "#f1f5f9",
147
+ 3: "#e2e8f0",
148
+ 4: "#cbd5e1",
149
+ 5: "#94a3b8",
150
+ 6: "#64748b",
151
+ 7: "#475569",
152
+ 8: "#334155",
153
+ 9: "#1e293b",
154
+ 10: "#0f172a",
155
+ 11: "#020617",
156
+ 12: "#01020a"
156
157
  },
157
158
  gray: {
158
- 1: "#f9f9f9",
159
- 2: "#f3f3f3",
160
- 3: "#e6e6e7",
161
- 4: "#d2d2d4",
162
- 5: "#aaaaad",
163
- 6: "#757578",
164
- 7: "#585860",
165
- 8: "#434349",
166
- 9: "#2c2c32",
167
- 10: "#1c1c21",
168
- 11: "#0c0c0f"
159
+ 1: "#f9fafb",
160
+ 2: "#f3f4f6",
161
+ 3: "#e5e7eb",
162
+ 4: "#d1d5db",
163
+ 5: "#9ca3af",
164
+ 6: "#6b7280",
165
+ 7: "#4b5563",
166
+ 8: "#374151",
167
+ 9: "#1f2937",
168
+ 10: "#111827",
169
+ 11: "#030712",
170
+ 12: "#020409"
169
171
  },
170
172
  zinc: {
171
173
  1: "#fafafa",
172
174
  2: "#f4f4f5",
173
- 3: "#e8e8ea",
174
- 4: "#d3d4d7",
175
- 5: "#a9aaae",
176
- 6: "#74757c",
177
- 7: "#57585f",
178
- 8: "#42434b",
179
- 9: "#2a2b31",
180
- 10: "#1a1b20",
181
- 11: "#0b0b0e"
175
+ 3: "#e4e4e7",
176
+ 4: "#d4d4d8",
177
+ 5: "#a1a1aa",
178
+ 6: "#71717a",
179
+ 7: "#52525b",
180
+ 8: "#3f3f46",
181
+ 9: "#27272a",
182
+ 10: "#18181b",
183
+ 11: "#09090b",
184
+ 12: "#050506"
182
185
  },
183
186
  neutral: {
184
187
  1: "#fafafa",
185
188
  2: "#f5f5f5",
186
- 3: "#e9e9e9",
187
- 4: "#d5d5d5",
188
- 5: "#ababab",
189
- 6: "#777777",
190
- 7: "#5a5a5a",
191
- 8: "#444444",
192
- 9: "#2d2d2d",
193
- 10: "#1d1d1d",
194
- 11: "#0d0d0d"
189
+ 3: "#e5e5e5",
190
+ 4: "#d4d4d4",
191
+ 5: "#a3a3a3",
192
+ 6: "#737373",
193
+ 7: "#525252",
194
+ 8: "#404040",
195
+ 9: "#262626",
196
+ 10: "#171717",
197
+ 11: "#0a0a0a",
198
+ 12: "#050505"
195
199
  },
196
200
  stone: {
197
- 1: "#fafaf8",
198
- 2: "#f5f4f1",
199
- 3: "#e9e6e0",
200
- 4: "#d6d0c8",
201
- 5: "#b3ab9c",
202
- 6: "#7e7568",
203
- 7: "#605850",
204
- 8: "#4a4440",
205
- 9: "#302c28",
206
- 10: "#201d1a",
207
- 11: "#100f0c"
201
+ 1: "#fafaf9",
202
+ 2: "#f5f5f4",
203
+ 3: "#e7e5e4",
204
+ 4: "#d6d3d1",
205
+ 5: "#a8a29e",
206
+ 6: "#78716c",
207
+ 7: "#57534e",
208
+ 8: "#44403c",
209
+ 9: "#292524",
210
+ 10: "#1c1917",
211
+ 11: "#0c0a09",
212
+ 12: "#070605"
208
213
  },
209
214
  red: {
210
- 1: "#fff4f3",
211
- 2: "#ffe8e6",
212
- 3: "#ffd1ce",
213
- 4: "#ffaba5",
214
- 5: "#ff7b73",
215
- 6: "#f44642",
216
- 7: "#d6302c",
217
- 8: "#be2020",
218
- 9: "#961515",
219
- 10: "#6e0f0f",
220
- 11: "#3e0606"
215
+ 1: "#fef2f2",
216
+ 2: "#fee2e2",
217
+ 3: "#fecaca",
218
+ 4: "#fca5a5",
219
+ 5: "#f87171",
220
+ 6: "#ef4444",
221
+ 7: "#dc2626",
222
+ 8: "#b91c1c",
223
+ 9: "#991b1b",
224
+ 10: "#7f1d1d",
225
+ 11: "#450a0a",
226
+ 12: "#280606"
221
227
  },
222
228
  orange: {
223
- 1: "#fff8ec",
224
- 2: "#ffedce",
225
- 3: "#ffdda0",
226
- 4: "#ffc06a",
227
- 5: "#ff9c32",
228
- 6: "#f47c0c",
229
- 7: "#cc6205",
230
- 8: "#a34b04",
231
- 9: "#7d3806",
232
- 10: "#5b2807",
233
- 11: "#311502"
229
+ 1: "#fff7ed",
230
+ 2: "#ffedd5",
231
+ 3: "#fed7aa",
232
+ 4: "#fdba74",
233
+ 5: "#fb923c",
234
+ 6: "#f97316",
235
+ 7: "#ea580c",
236
+ 8: "#c2410c",
237
+ 9: "#9a3412",
238
+ 10: "#7c2d12",
239
+ 11: "#431407",
240
+ 12: "#270c04"
234
241
  },
235
242
  amber: {
236
- 1: "#fffbea",
237
- 2: "#fff5c7",
238
- 3: "#ffeb85",
239
- 4: "#ffd944",
240
- 5: "#f8c00e",
241
- 6: "#e4a500",
242
- 7: "#bd8300",
243
- 8: "#956600",
244
- 9: "#704c00",
245
- 10: "#513600",
246
- 11: "#2d1e00"
243
+ 1: "#fffbeb",
244
+ 2: "#fef3c7",
245
+ 3: "#fde68a",
246
+ 4: "#fcd34d",
247
+ 5: "#fbbf24",
248
+ 6: "#f59e0b",
249
+ 7: "#d97706",
250
+ 8: "#b45309",
251
+ 9: "#92400e",
252
+ 10: "#78350f",
253
+ 11: "#451a03",
254
+ 12: "#291002"
247
255
  },
248
256
  yellow: {
249
- 1: "#ffffe8",
250
- 2: "#ffffc8",
251
- 3: "#fffb82",
252
- 4: "#fff342",
253
- 5: "#f5da0e",
254
- 6: "#e1bd00",
255
- 7: "#bb9a00",
256
- 8: "#947800",
257
- 9: "#6f5900",
258
- 10: "#514200",
259
- 11: "#2d2500"
257
+ 1: "#fefce8",
258
+ 2: "#fef9c3",
259
+ 3: "#fef08a",
260
+ 4: "#fde047",
261
+ 5: "#facc15",
262
+ 6: "#eab308",
263
+ 7: "#ca8a04",
264
+ 8: "#a16207",
265
+ 9: "#854d0e",
266
+ 10: "#713f12",
267
+ 11: "#422006",
268
+ 12: "#271304"
260
269
  },
261
270
  lime: {
262
- 1: "#f5ffe8",
263
- 2: "#eaffca",
264
- 3: "#d5ff90",
265
- 4: "#b8f658",
266
- 5: "#97e422",
267
- 6: "#74c90b",
268
- 7: "#5aa407",
269
- 8: "#457e08",
270
- 9: "#346008",
271
- 10: "#254408",
272
- 11: "#132505"
271
+ 1: "#f7fee7",
272
+ 2: "#ecfccb",
273
+ 3: "#d9f99d",
274
+ 4: "#bef264",
275
+ 5: "#a3e635",
276
+ 6: "#84cc16",
277
+ 7: "#65a30d",
278
+ 8: "#4d7c0f",
279
+ 9: "#3f6212",
280
+ 10: "#365314",
281
+ 11: "#1a2e05",
282
+ 12: "#0f1b03"
273
283
  },
274
284
  green: {
275
- 1: "#f0fdf5",
276
- 2: "#dcfce9",
277
- 3: "#b8f4d2",
278
- 4: "#84e8b1",
279
- 5: "#47d38d",
280
- 6: "#1cb86d",
281
- 7: "#129a57",
282
- 8: "#0e7b45",
283
- 9: "#0d6035",
284
- 10: "#0b4f2d",
285
- 11: "#042a18"
285
+ 1: "#f0fdf4",
286
+ 2: "#dcfce7",
287
+ 3: "#bbf7d0",
288
+ 4: "#86efac",
289
+ 5: "#4ade80",
290
+ 6: "#22c55e",
291
+ 7: "#16a34a",
292
+ 8: "#15803d",
293
+ 9: "#166534",
294
+ 10: "#14532d",
295
+ 11: "#052e16",
296
+ 12: "#031b0d"
286
297
  },
287
298
  emerald: {
288
- 1: "#ecfdf7",
289
- 2: "#d0fcea",
290
- 3: "#a5f4d6",
291
- 4: "#6aeabc",
292
- 5: "#35d49f",
293
- 6: "#10b982",
294
- 7: "#099768",
295
- 8: "#087a53",
296
- 9: "#0a5f43",
297
- 10: "#094e37",
298
- 11: "#032b1f"
299
+ 1: "#ecfdf5",
300
+ 2: "#d1fae5",
301
+ 3: "#a7f3d0",
302
+ 4: "#6ee7b7",
303
+ 5: "#34d399",
304
+ 6: "#10b981",
305
+ 7: "#059669",
306
+ 8: "#047857",
307
+ 9: "#065f46",
308
+ 10: "#064e3b",
309
+ 11: "#022c22",
310
+ 12: "#011a14"
299
311
  },
300
312
  teal: {
301
- 1: "#efffff",
302
- 2: "#ccfcf8",
303
- 3: "#99f7f1",
304
- 4: "#60eee6",
305
- 5: "#2cdad3",
306
- 6: "#13bebc",
307
- 7: "#0d9997",
308
- 8: "#0d7a78",
309
- 9: "#0e6160",
310
- 10: "#0d4f4e",
311
- 11: "#063535"
313
+ 1: "#f0fdfa",
314
+ 2: "#ccfbf1",
315
+ 3: "#99f6e4",
316
+ 4: "#5eead4",
317
+ 5: "#2dd4bf",
318
+ 6: "#14b8a6",
319
+ 7: "#0d9488",
320
+ 8: "#0f766e",
321
+ 9: "#115e59",
322
+ 10: "#134e4a",
323
+ 11: "#042f2e",
324
+ 12: "#021c1b"
312
325
  },
313
326
  cyan: {
314
327
  1: "#ecfeff",
315
- 2: "#cffcfe",
316
- 3: "#a3f6fc",
317
- 4: "#67ebfa",
318
- 5: "#23d7f5",
319
- 6: "#07bde0",
320
- 7: "#0898b8",
321
- 8: "#0c7896",
322
- 9: "#135f78",
323
- 10: "#134e65",
324
- 11: "#053143"
328
+ 2: "#cffafe",
329
+ 3: "#a5f3fc",
330
+ 4: "#67e8f9",
331
+ 5: "#22d3ee",
332
+ 6: "#06b6d4",
333
+ 7: "#0891b2",
334
+ 8: "#0e7490",
335
+ 9: "#155e75",
336
+ 10: "#164e63",
337
+ 11: "#083344",
338
+ 12: "#041e28"
325
339
  },
326
340
  sky: {
327
- 1: "#f0f8ff",
341
+ 1: "#f0f9ff",
328
342
  2: "#e0f2fe",
329
- 3: "#bde3fd",
330
- 4: "#89cffa",
331
- 5: "#48b4f8",
332
- 6: "#149aeb",
333
- 7: "#057ec8",
334
- 8: "#0664a4",
335
- 9: "#0a5087",
336
- 10: "#0d4270",
337
- 11: "#082748"
343
+ 3: "#bae6fd",
344
+ 4: "#7dd3fc",
345
+ 5: "#38bdf8",
346
+ 6: "#0ea5e9",
347
+ 7: "#0284c7",
348
+ 8: "#0369a1",
349
+ 9: "#075985",
350
+ 10: "#0c4a6e",
351
+ 11: "#082f49",
352
+ 12: "#041b2b"
338
353
  },
339
354
  blue: {
340
- 1: "#eff5ff",
341
- 2: "#dde9fe",
342
- 3: "#bdd2fd",
343
- 4: "#8db1fb",
344
- 5: "#5a89f7",
345
- 6: "#2f64f3",
346
- 7: "#1b4de6",
347
- 8: "#1740cc",
348
- 9: "#142da8",
349
- 10: "#102080",
350
- 11: "#0b144f"
355
+ 1: "#eff6ff",
356
+ 2: "#dbeafe",
357
+ 3: "#bfdbfe",
358
+ 4: "#93c5fd",
359
+ 5: "#60a5fa",
360
+ 6: "#3b82f6",
361
+ 7: "#2563eb",
362
+ 8: "#1d4ed8",
363
+ 9: "#1e40af",
364
+ 10: "#1e3a8a",
365
+ 11: "#172554",
366
+ 12: "#0d1633"
351
367
  },
352
368
  indigo: {
353
- 1: "#eff1ff",
354
- 2: "#e2e7ff",
355
- 3: "#c9d1ff",
356
- 4: "#a9b4ff",
357
- 5: "#8590fe",
358
- 6: "#6267f3",
359
- 7: "#4f51e7",
360
- 8: "#4240d0",
361
- 9: "#3434ae",
362
- 10: "#292888",
363
- 11: "#181854"
369
+ 1: "#eef2ff",
370
+ 2: "#e0e7ff",
371
+ 3: "#c7d2fe",
372
+ 4: "#a5b4fc",
373
+ 5: "#818cf8",
374
+ 6: "#6366f1",
375
+ 7: "#4f46e5",
376
+ 8: "#4338ca",
377
+ 9: "#3730a3",
378
+ 10: "#312e81",
379
+ 11: "#1e1b4b",
380
+ 12: "#12102d"
364
381
  },
365
382
  violet: {
366
383
  1: "#f5f3ff",
367
- 2: "#ede9ff",
368
- 3: "#ddd5fe",
369
- 4: "#c6b8fd",
370
- 5: "#a893fa",
371
- 6: "#8a69f7",
372
- 7: "#7248ec",
373
- 8: "#6137d6",
374
- 9: "#4f28ae",
375
- 10: "#3f218e",
376
- 11: "#250f58"
384
+ 2: "#ede9fe",
385
+ 3: "#ddd6fe",
386
+ 4: "#c4b5fd",
387
+ 5: "#a78bfa",
388
+ 6: "#8b5cf6",
389
+ 7: "#7c3aed",
390
+ 8: "#6d28d9",
391
+ 9: "#5b21b6",
392
+ 10: "#4c1d95",
393
+ 11: "#2e1065",
394
+ 12: "#1c0a3d"
377
395
  },
378
396
  purple: {
379
- 1: "#fbf3ff",
380
- 2: "#f4e8ff",
381
- 3: "#e9cfff",
382
- 4: "#d8adfd",
383
- 5: "#bf7cfa",
384
- 6: "#a650f5",
385
- 7: "#8f30e7",
386
- 8: "#7c1fce",
387
- 9: "#671caa",
388
- 10: "#521885",
389
- 11: "#300860"
397
+ 1: "#faf5ff",
398
+ 2: "#f3e8ff",
399
+ 3: "#e9d5ff",
400
+ 4: "#d8b4fe",
401
+ 5: "#c084fc",
402
+ 6: "#a855f7",
403
+ 7: "#9333ea",
404
+ 8: "#7e22ce",
405
+ 9: "#6b21a8",
406
+ 10: "#581c87",
407
+ 11: "#3b0764",
408
+ 12: "#23043c"
390
409
  },
391
410
  fuchsia: {
392
- 1: "#fef3ff",
393
- 2: "#fbe8ff",
394
- 3: "#f6cfff",
395
- 4: "#efaaff",
396
- 5: "#e672fb",
397
- 6: "#d748ef",
398
- 7: "#be20d3",
399
- 8: "#a41ab5",
400
- 9: "#86168e",
401
- 10: "#631470",
402
- 11: "#42024a"
411
+ 1: "#fdf4ff",
412
+ 2: "#fae8ff",
413
+ 3: "#f5d0fe",
414
+ 4: "#f0abfc",
415
+ 5: "#e879f9",
416
+ 6: "#d946ef",
417
+ 7: "#c026d3",
418
+ 8: "#a21caf",
419
+ 9: "#86198f",
420
+ 10: "#701a75",
421
+ 11: "#4a044e",
422
+ 12: "#2d022f"
403
423
  },
404
424
  pink: {
405
- 1: "#fef2f8",
406
- 2: "#fde7f3",
407
- 3: "#fbcde7",
408
- 4: "#f8a8d1",
409
- 5: "#f36cb8",
410
- 6: "#ea3f98",
411
- 7: "#d4217c",
412
- 8: "#be1965",
413
- 9: "#9c1651",
414
- 10: "#74143e",
415
- 11: "#450827"
425
+ 1: "#fdf2f8",
426
+ 2: "#fce7f3",
427
+ 3: "#fbcfe8",
428
+ 4: "#f9a8d4",
429
+ 5: "#f472b6",
430
+ 6: "#ec4899",
431
+ 7: "#db2777",
432
+ 8: "#be185d",
433
+ 9: "#9d174d",
434
+ 10: "#831843",
435
+ 11: "#500724",
436
+ 12: "#300415"
416
437
  },
417
438
  rose: {
418
- 1: "#fff2f3",
419
- 2: "#ffe5e8",
420
- 3: "#ffcacd",
421
- 4: "#ff9fa7",
422
- 5: "#fd6b77",
423
- 6: "#f43e52",
424
- 7: "#e01e31",
425
- 8: "#c0152c",
426
- 9: "#9a1222",
427
- 10: "#701019",
428
- 11: "#420611"
439
+ 1: "#fff1f2",
440
+ 2: "#ffe4e6",
441
+ 3: "#fecdd3",
442
+ 4: "#fda4af",
443
+ 5: "#fb7185",
444
+ 6: "#f43f5e",
445
+ 7: "#e11d48",
446
+ 8: "#be123c",
447
+ 9: "#9f1239",
448
+ 10: "#881337",
449
+ 11: "#4c0519",
450
+ 12: "#2d030e"
429
451
  }
430
452
  };
431
453
  var defaultTheme = {
@@ -756,7 +778,18 @@ var MODIFIERS = /* @__PURE__ */ new Set([
756
778
  "first-line",
757
779
  "marker",
758
780
  // Print media modifier
759
- "print"
781
+ "print",
782
+ // Orientation media modifiers (CSS-injection only)
783
+ "landscape",
784
+ "portrait",
785
+ // Accessibility media modifiers (CSS-injection only)
786
+ "motion-reduce",
787
+ "motion-safe",
788
+ "contrast-more",
789
+ "contrast-less",
790
+ // Directionality modifiers (CSS-injection only)
791
+ "rtl",
792
+ "ltr"
760
793
  ]);
761
794
  var UTILITY_PREFIXES = [
762
795
  // Multi-word flex
@@ -933,6 +966,7 @@ var UTILITY_PREFIXES = [
933
966
  "outline-offset",
934
967
  "will-change",
935
968
  "mix-blend",
969
+ "bg-blend",
936
970
  "decoration",
937
971
  "perspective",
938
972
  "tint",
@@ -955,6 +989,8 @@ var UTILITY_PREFIXES = [
955
989
  "capitalize",
956
990
  "normal-case",
957
991
  "antialiased",
992
+ "subpixel-antialiased",
993
+ "overflow-ellipsis",
958
994
  "truncate",
959
995
  "sr-only",
960
996
  "not-sr-only",
@@ -1281,6 +1317,20 @@ var STANDALONE_UTILITIES = /* @__PURE__ */ new Set([
1281
1317
  "max-h-screen",
1282
1318
  "min-w-screen",
1283
1319
  "max-w-screen",
1320
+ // max-w named container sizes (Tailwind compat)
1321
+ "max-w-none",
1322
+ "max-w-xs",
1323
+ "max-w-sm",
1324
+ "max-w-md",
1325
+ "max-w-lg",
1326
+ "max-w-xl",
1327
+ "max-w-2xl",
1328
+ "max-w-3xl",
1329
+ "max-w-4xl",
1330
+ "max-w-5xl",
1331
+ "max-w-6xl",
1332
+ "max-w-7xl",
1333
+ "max-w-prose",
1284
1334
  // Extended cursors (web-only)
1285
1335
  "cursor-grab",
1286
1336
  "cursor-grabbing",
@@ -1670,6 +1720,8 @@ var STANDALONE = {
1670
1720
  "resize-y": isWeb ? { resize: "vertical" } : null,
1671
1721
  "resize-x": isWeb ? { resize: "horizontal" } : null,
1672
1722
  antialiased: isWeb ? { WebkitFontSmoothing: "antialiased", MozOsxFontSmoothing: "grayscale" } : null,
1723
+ "subpixel-antialiased": isWeb ? { WebkitFontSmoothing: "subpixel-antialiased", MozOsxFontSmoothing: "auto" } : null,
1724
+ "overflow-ellipsis": isWeb ? { textOverflow: "ellipsis" } : null,
1673
1725
  "sr-only": isWeb ? {
1674
1726
  position: "absolute",
1675
1727
  width: 1,
@@ -1784,6 +1836,20 @@ var STANDALONE = {
1784
1836
  "max-h-screen": { maxHeight: "100vh" },
1785
1837
  "min-w-screen": isWeb ? { minWidth: "100vw" } : null,
1786
1838
  "max-w-screen": isWeb ? { maxWidth: "100vw" } : null,
1839
+ // max-w named container sizes (mirrors Tailwind's container scale)
1840
+ "max-w-none": { maxWidth: "none" },
1841
+ "max-w-xs": { maxWidth: 320 },
1842
+ "max-w-sm": { maxWidth: 384 },
1843
+ "max-w-md": { maxWidth: 448 },
1844
+ "max-w-lg": { maxWidth: 512 },
1845
+ "max-w-xl": { maxWidth: 576 },
1846
+ "max-w-2xl": { maxWidth: 672 },
1847
+ "max-w-3xl": { maxWidth: 768 },
1848
+ "max-w-4xl": { maxWidth: 896 },
1849
+ "max-w-5xl": { maxWidth: 1024 },
1850
+ "max-w-6xl": { maxWidth: 1152 },
1851
+ "max-w-7xl": { maxWidth: 1280 },
1852
+ "max-w-prose": isWeb ? { maxWidth: "65ch" } : null,
1787
1853
  // Extended cursors (web-only)
1788
1854
  "cursor-grab": isWeb ? { cursor: "grab" } : null,
1789
1855
  "cursor-grabbing": isWeb ? { cursor: "grabbing" } : null,
@@ -2523,7 +2589,7 @@ var RESOLVERS = {
2523
2589
  };
2524
2590
  return widths[value] ? { columnWidth: widths[value] } : null;
2525
2591
  },
2526
- // ── Mix blend mode (web-only) ─────────────────────────────────────────────
2592
+ // ── Mix / background blend mode (web-only) ───────────────────────────────
2527
2593
  "mix-blend": ({ value }) => {
2528
2594
  if (!isWeb) return null;
2529
2595
  const modes = [
@@ -2547,6 +2613,28 @@ var RESOLVERS = {
2547
2613
  ];
2548
2614
  return modes.includes(value) ? { mixBlendMode: value } : null;
2549
2615
  },
2616
+ "bg-blend": ({ value }) => {
2617
+ if (!isWeb) return null;
2618
+ const modes = [
2619
+ "normal",
2620
+ "multiply",
2621
+ "screen",
2622
+ "overlay",
2623
+ "darken",
2624
+ "lighten",
2625
+ "color-dodge",
2626
+ "color-burn",
2627
+ "hard-light",
2628
+ "soft-light",
2629
+ "difference",
2630
+ "exclusion",
2631
+ "hue",
2632
+ "saturation",
2633
+ "color",
2634
+ "luminosity"
2635
+ ];
2636
+ return modes.includes(value) ? { backgroundBlendMode: value } : null;
2637
+ },
2550
2638
  // ── Will-change (web-only) ─────────────────────────────────────────────────
2551
2639
  "will-change": ({ value, isArbitrary }) => {
2552
2640
  if (!isWeb) return null;
@@ -3087,6 +3175,18 @@ var GROUP_PEER_PREFIX = {
3087
3175
  var MODE_MODS = /* @__PURE__ */ new Set(["dark", "light", "not-dark", "not-light"]);
3088
3176
  var RESPONSIVE_MODS = /* @__PURE__ */ new Set(["sm", "md", "lg", "xl", "2xl"]);
3089
3177
  var PRINT_MODS = /* @__PURE__ */ new Set(["print"]);
3178
+ var MEDIA_MODS = {
3179
+ landscape: "(orientation: landscape)",
3180
+ portrait: "(orientation: portrait)",
3181
+ "motion-reduce": "(prefers-reduced-motion: reduce)",
3182
+ "motion-safe": "(prefers-reduced-motion: no-preference)",
3183
+ "contrast-more": "(prefers-contrast: more)",
3184
+ "contrast-less": "(prefers-contrast: less)"
3185
+ };
3186
+ var DIR_MODS = {
3187
+ rtl: '[dir="rtl"]',
3188
+ ltr: '[dir="ltr"]'
3189
+ };
3090
3190
  function buildDivideDecls(styles) {
3091
3191
  const parts = [];
3092
3192
  if ("__divideX" in styles) {
@@ -3108,12 +3208,12 @@ function injectClassRule(cls, bucketKey, styles, darkMode, important = false) {
3108
3208
  injectRule(styles.__keyframe);
3109
3209
  }
3110
3210
  const isDivide = "__divideX" in styles || "__divideY" in styles || "__divideColor" in styles || "__divideStyle" in styles;
3111
- const cssDecls = isDivide ? buildDivideDecls(styles) : styleValueToCSS(styles, important);
3112
- if (!cssDecls) return;
3113
3211
  const escaped = escapeCSSSelector(cls);
3114
3212
  const childSuffix = isDivide ? " > * + *" : "";
3115
3213
  if (bucketKey === "base") {
3116
- injectRule(`.${escaped}${childSuffix} { ${cssDecls} }`);
3214
+ const baseCssDecls = isDivide ? buildDivideDecls(styles) : styleValueToCSS(styles, important);
3215
+ if (!baseCssDecls) return;
3216
+ injectRule(`.${escaped}${childSuffix} { ${baseCssDecls} }`);
3117
3217
  return;
3118
3218
  }
3119
3219
  const mods = bucketKey.split(":");
@@ -3122,12 +3222,29 @@ function injectClassRule(cls, bucketKey, styles, darkMode, important = false) {
3122
3222
  const hasDark = nonResponsiveMods.includes("dark") || nonResponsiveMods.includes("not-light");
3123
3223
  const hasLight = nonResponsiveMods.includes("light") || nonResponsiveMods.includes("not-dark");
3124
3224
  const hasPrint = nonResponsiveMods.includes("print");
3225
+ const mediaMods = nonResponsiveMods.filter((m) => m in MEDIA_MODS);
3226
+ const dirMods = nonResponsiveMods.filter((m) => m in DIR_MODS);
3125
3227
  const ancestorMods = nonResponsiveMods.filter((m) => m in GROUP_PEER_PREFIX);
3126
- const pseudoMods = nonResponsiveMods.filter((m) => !MODE_MODS.has(m) && !(m in GROUP_PEER_PREFIX) && !PRINT_MODS.has(m));
3228
+ const pseudoMods = nonResponsiveMods.filter(
3229
+ (m) => !MODE_MODS.has(m) && !(m in GROUP_PEER_PREFIX) && !PRINT_MODS.has(m) && !(m in MEDIA_MODS) && !(m in DIR_MODS)
3230
+ );
3127
3231
  const pseudoSuffix = pseudoMods.map((p) => MODIFIER_TO_PSEUDO[p] ?? `:${p}`).join("");
3128
3232
  const elementSelector = `.${escaped}${pseudoSuffix}${childSuffix}`;
3129
3233
  const ancestorPrefix = ancestorMods.length ? ancestorMods.map((m) => GROUP_PEER_PREFIX[m]).join(" ") + " " : "";
3130
- const selector = `${ancestorPrefix}${elementSelector}`;
3234
+ const dirPrefix = dirMods.length ? dirMods.map((m) => DIR_MODS[m]).join(" ") + " " : "";
3235
+ const selector = `${dirPrefix}${ancestorPrefix}${elementSelector}`;
3236
+ const CSS_ONLY_PSEUDOS = /* @__PURE__ */ new Set([
3237
+ "first",
3238
+ "last",
3239
+ "odd",
3240
+ "even",
3241
+ "only",
3242
+ "focus-within",
3243
+ "focus-visible"
3244
+ ]);
3245
+ const needsImportant = important || hasPrint || mediaMods.length > 0 || dirMods.length > 0 || ancestorMods.length > 0 || pseudoMods.some((m) => CSS_ONLY_PSEUDOS.has(m));
3246
+ const cssDecls = isDivide ? buildDivideDecls(styles) : styleValueToCSS(styles, needsImportant);
3247
+ if (!cssDecls) return;
3131
3248
  let rule;
3132
3249
  if (hasDark) {
3133
3250
  if (darkMode === "media") {
@@ -3151,6 +3268,9 @@ function injectClassRule(cls, bucketKey, styles, darkMode, important = false) {
3151
3268
  if (hasPrint) {
3152
3269
  rule = `@media print { ${rule} }`;
3153
3270
  }
3271
+ for (const m of mediaMods) {
3272
+ rule = `@media ${MEDIA_MODS[m]} { ${rule} }`;
3273
+ }
3154
3274
  if (responsiveMods.length > 0) {
3155
3275
  const screens = getGlobalScreens();
3156
3276
  const minWidth = Math.max(...responsiveMods.map((m) => screens[m] ?? 0));
@@ -3247,9 +3367,19 @@ function resolve(classString, theme, darkMode = "attribute") {
3247
3367
  return result;
3248
3368
  }
3249
3369
  function flatten(resolved, isDark, state = {}, breakpoints = /* @__PURE__ */ new Set()) {
3250
- const result = { ...resolved.base ?? {} };
3251
- for (const [key, styles] of Object.entries(resolved)) {
3252
- if (key === "base" || !styles) continue;
3370
+ const result = {};
3371
+ const entries = Object.entries(resolved);
3372
+ entries.sort((a, b) => {
3373
+ const pa = a[0] === "base" ? -1 : a[0].split(":").length;
3374
+ const pb = b[0] === "base" ? -1 : b[0].split(":").length;
3375
+ return pa - pb;
3376
+ });
3377
+ for (const [key, styles] of entries) {
3378
+ if (!styles) continue;
3379
+ if (key === "base") {
3380
+ Object.assign(result, styles);
3381
+ continue;
3382
+ }
3253
3383
  const mods = key.split(":");
3254
3384
  if (matchesMods(mods, isDark, state, breakpoints)) {
3255
3385
  Object.assign(result, styles);
@@ -3301,6 +3431,17 @@ function matchesMods(mods, isDark, state, breakpoints) {
3301
3431
  case "xl":
3302
3432
  case "2xl":
3303
3433
  return breakpoints.has(mod);
3434
+ // CSS-only modifiers — never applied as inline styles
3435
+ case "print":
3436
+ case "landscape":
3437
+ case "portrait":
3438
+ case "motion-reduce":
3439
+ case "motion-safe":
3440
+ case "contrast-more":
3441
+ case "contrast-less":
3442
+ case "rtl":
3443
+ case "ltr":
3444
+ return false;
3304
3445
  default:
3305
3446
  return false;
3306
3447
  }