@frontfriend/tailwind 4.0.9 → 4.0.10

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.
@@ -235,13 +235,16 @@ const MINIMAL_V4_FALLBACKS = {
235
235
  handle: 'bg-border focus-visible:ring-ring relative flex w-px items-center justify-center',
236
236
  },
237
237
  stepper: {
238
- root: 'flex gap-2',
239
- item: 'flex items-center gap-2',
240
- trigger: 'inline-flex items-center gap-2',
241
- indicator: 'flex size-8 items-center justify-center rounded-full border border-border',
242
- separator: 'bg-border h-px flex-1',
243
- title: 'font-medium text-foreground',
244
- description: 'text-muted-foreground text-sm',
238
+ root: 'block w-full',
239
+ nav: 'group/stepper-nav inline-flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col',
240
+ item: 'group/step flex items-center justify-center not-last:flex-1 data-[disabled]:pointer-events-none data-[disabled]:opacity-60 group-data-[orientation=horizontal]/stepper-nav:flex-row group-data-[orientation=vertical]/stepper-nav:flex-col',
241
+ trigger: 'focus-visible:border-ring focus-visible:ring-ring/50 inline-flex cursor-pointer items-center gap-2.5 rounded-full outline-none focus-visible:z-10 focus-visible:ring-3 disabled:pointer-events-none disabled:opacity-60',
242
+ indicator: 'border-background bg-muted text-foreground data-[state=completed]:bg-primary data-[state=completed]:text-primary-foreground data-[state=active]:bg-primary data-[state=active]:text-primary-foreground relative flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full text-xs',
243
+ separator: 'bg-muted group-data-[state=completed]/step:bg-primary data-[state=completed]:bg-primary m-0.5 rounded-sm group-data-[orientation=horizontal]/stepper-nav:h-0.5 group-data-[orientation=horizontal]/stepper-nav:flex-1 group-data-[orientation=vertical]/stepper-nav:h-12 group-data-[orientation=vertical]/stepper-nav:w-0.5',
244
+ title: 'text-sm leading-none font-medium text-foreground',
245
+ description: 'text-sm text-muted-foreground',
246
+ panel: 'w-full',
247
+ content: 'w-full',
245
248
  },
246
249
  themeprovider: { root: 'contents' },
247
250
  themepicker: {
@@ -587,14 +590,23 @@ function neutralizeClassToken(token) {
587
590
  if (DIRECT_CLASS_MAP[token]) return DIRECT_CLASS_MAP[token];
588
591
 
589
592
  const { prefix, base } = splitVariants(token);
590
- const mappedBase = DIRECT_CLASS_MAP[base]
591
- || mapBgClass(base, prefix)
592
- || mapTextClass(base, prefix)
593
- || mapBorderClass(base, prefix)
594
- || mapRadiusClass(base)
595
- || base;
596
-
597
- return `${prefix}${mappedBase}`;
593
+ // Peel off an opacity suffix (e.g. `/50`)
594
+ const opacityMatch = base.match(/^(.*?)(\/\d{1,3})$/);
595
+ const core = opacityMatch ? opacityMatch[1] : base;
596
+ const opacity = opacityMatch ? opacityMatch[2] : '';
597
+
598
+ let mappedCore = DIRECT_CLASS_MAP[core]
599
+ || mapBgClass(core, prefix)
600
+ || mapTextClass(core, prefix)
601
+ || mapBorderClass(core, prefix)
602
+ || mapRadiusClass(core)
603
+ || core;
604
+
605
+ // An explicit opacity on the source token wins over any tone-derived opacity
606
+ // that withVariantTone may have appended (e.g. bg-primary/90).
607
+ if (opacity) mappedCore = mappedCore.replace(/\/\d{1,3}$/, '') + opacity;
608
+
609
+ return `${prefix}${mappedCore}`;
598
610
  }
599
611
 
600
612
  function neutralizeClassString(value) {