tailwind-styled-v4 5.1.32 → 5.1.34

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.
@@ -827,8 +827,7 @@ function registerSubComponents(component, template, configSub) {
827
827
  tag
828
828
  );
829
829
  } else if ("base" in value || "variants" in value) {
830
- const explicitTag = value.tag ?? "div";
831
- map[key] = createComponent(explicitTag, value);
830
+ map[key] = createComponent("div", value);
832
831
  } else {
833
832
  const tag = key;
834
833
  for (const [componentName, classesOrConfig] of Object.entries(value)) {
@@ -840,8 +839,7 @@ function registerSubComponents(component, template, configSub) {
840
839
  tag
841
840
  );
842
841
  } else {
843
- const nestedTag = classesOrConfig.tag ?? tag;
844
- map[componentName] = createComponent(nestedTag, classesOrConfig);
842
+ map[componentName] = createComponent(tag, classesOrConfig);
845
843
  }
846
844
  }
847
845
  }
@@ -962,7 +960,7 @@ function attachExtend(component, originalTag, base, config) {
962
960
  return extended;
963
961
  }
964
962
  component.extend = extendWithClasses;
965
- component.withVariants = (newConfig) => {
963
+ component.withVariants = ((newConfig) => {
966
964
  const existing = typeof config === "object" ? config : {};
967
965
  return createComponent(originalTag, {
968
966
  ...existing,
@@ -977,7 +975,7 @@ function attachExtend(component, originalTag, base, config) {
977
975
  ...newConfig.defaultVariants ?? {}
978
976
  }
979
977
  });
980
- };
978
+ });
981
979
  component.withSub = (() => component);
982
980
  return component;
983
981
  }